Static library builds of ziskos for RISC-V 64-bit architecture with IMA extensions, suitable for Nethermind's bflat compiler. Additionally it includes a thin layer with C# bindings.
This project provides pre-built static libraries for the zisk zkVM runtime, compiled for RISC-V 64-bit targets. The builds are specifically configured for:
- ISA: RV64IMAD (Integer, Multiplication, Atomic, Double-precision FP)
- ABI: LP64D
- Target OS: zkvm
- Vendor: zisk
The reason for choosing this target over rv64im is pretty simple. It is much more compatible with dotnet-riscv images already used in bflat. Still, these binaries are normally guaranteed to have no C, A, D instructions.
Each release includes:
lib.a- static library with ziskos functionality (precompiles) and direct system call wrappers (zisk_syscalls.Sassembled for rv64ima).lib.dll- .NET managed library.
Use bflat's ability to link to external libraries and provide the link to this repository.
- Docker
- Git
- Bash
- Clone this repository:
git clone https://github.com/nethermindeth/bflat-libziskos.git
cd bflat-libziskos- Set the zisk version tag you want to build:
export ZISK_TAG=v0.15.0- Run the build script:
./build.sh- Find the built libraries in the
output/directory:
ls -lh output/The build process:
- Clones the zisk repository at the specified tag
- Applies minimal patches:
- Adds
crate-type = ["staticlib", "rlib"]toCargo.toml - Skips C++ library compilation for zkvm target in
lib-c/build.rs
- Adds
- Builds Rust library using a custom RISC-V target specification (
riscv64imad-zisk-zkvm-elf) - Assembles system call wrappers from
zisk_syscalls/zisk_syscalls.Swithriscv64-linux-gnu-as --march=rv64ima --mabi=lp64 - Adds syscalls to lib.a using
arto merge the object file into the static library - Builds .NET library if the project exists in the zisk repository
The final lib.a contains:
- ziskos core functionality (precompiles, runtime)
- Direct system call wrappers for zkVM syscalls
Contributions are welcome! Please feel free to submit issues or pull requests.