- LLVM : 20+
- Rust : latest
pkg install -y curl bash devel/llvm-devel
curl https://sh.rustup.rs -sSf > rustup.sh
bash rustup.sh -y
. $HOME/.cargo/env
git clone --recursive --branch v2.6.11 --depth 1 https://github.com/RedisJSON/RedisJSON.gitcd RedisJSONEdit Cargo.toml and change debug = 1 to debug = 0 as shown below.
[profile.release]
debug = 0Add below snippet in .cargo/config.toml
[target.x86_64-unknown-freebsd]
rustflags = [
"-C", "link-arg=-Wl,-z,nostart-stop-gc"
]cargo build --releaseUse binary generated in target/release/librejson.so.