跳到主要内容
版本:dev

Development

How to build Fory

Please checkout the source tree from https://github.com/apache/fory.

Build Fory Java

cd java
mvn clean compile -DskipTests

Environment Requirements

  • java 1.8+
  • maven 3.6.3+

Build Fory Python

cd python
# Uninstall numpy first so that when we install pyarrow, it will install the correct numpy version automatically.
# For Python versions less than 3.13, numpy 2 is not currently supported.
pip uninstall -y numpy
# Install necessary environment for Python < 3.13.
pip install pyarrow==15.0.0 Cython wheel pytest
# For Python 3.13, pyarrow 18.0.0 is available and requires numpy version greater than 2.
# pip install pyarrow==18.0.0 Cython wheel pytest
pip install -v -e .

Environment Requirements

  • python 3.6+

Build Fory C++

Build fory row format:

pip install pyarrow==15.0.0
bazel build //cpp/fory/row:fory_row_format

Build fory row format encoder:

pip install pyarrow==15.0.0
bazel build //cpp/fory/encoder:fory_encoder

Environment Requirements

  • compilers with C++17 support
  • bazel 6.3.2

Build Fory GoLang

cd go/fory
# run test
go test -v
# run xlang test
go test -v fory_xlang_test.go

Environment Requirements

  • go 1.13+

Build Fory Rust

cd rust
# build
cargo build
# run test
cargo test

Environment Requirements

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Build Fory JavaScript

cd javascript
npm install

# run build
npm run build
# run test
npm run test

Environment Requirements

  • node 14+
  • npm 8+

Lint Markdown Docs

# Install prettier globally
npm install -g prettier

# Fix markdown files
prettier --write "**/*.md"

Environment Requirements

  • node 14+
  • npm 8+