Crates implementing Rust interfaces for the vAccel C library:
- The
vaccel-bindingscrate provides Rust bindings for vAccel - The
vaccel-rpc-proto,vaccel-rpc-agentandvaccel-rpc-clientcrates implement RPC-based transport for vAccel operations. They can be used directly, to interact with vAccel from Rust, or through the C interface, to implement transport plugins for vAccel.
Install vAccel with:
wget https://s3.nbfc.io/nbfc-assets/github/vaccel/rev/main/x86_64/release/vaccel_latest_amd64.deb
sudo dpkg -i vaccel_latest_amd64.debFirst clone the repo:
git clone git@github.com:nubificus/vaccel-rust
cd vaccel-rustAll Rust components can be used as dependencies and be built with Cargo as usual. This repo is structured as a Cargo workspace so all crates can be compiled from the root directory.
cargo buildwill build the vaccel-rpc-agent (and dependencies)
Crates can also be built separately, ie.:
cargo build -p vaccel-bindingswill build vaccel-bindings (and dependencies).
A Meson build is also provided for ease of integration with vAccel. The Meson
implementation uses Cargo for the actual build and provides build targets for
vaccel-rpc-agent and vaccel-rpc-client. To build with Meson:
meson setup build
meson compile -C buildThis will build vaccel-rpc-agent (and dependencies) using sync
ttrpc.
To also build vaccel-rpc-client use:
meson setup -Drpc-client=enabled build
meson compile -C buildThere is experimental support for a Rust RPC agent/client based on async
ttrpc and a streaming implementation of the vAccel genop operation. To
compile with these features you can configure the project with:
# async ttrpc
meson setup -Dasync=enabled build
# async ttrpc with streaming genop
meson setup -Dasync-stream=enabled build