- 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.git
cd RedisJSON
Edit Cargo.toml
and change debug = 1
to debug = 0
as shown below.
[profile.release]
debug = 0
Add below snippet in .cargo/config.toml
[target.x86_64-unknown-freebsd]
rustflags = [
"-C", "link-arg=-Wl,-z,nostart-stop-gc"
]
cargo build --release
Use binary generated in target/release/librejson.so
.