Skip to content

Latest commit

 

History

History

c-sdk

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

This is Vanadium's C SDK. It can be compiled for both RISC-V and Linux native targets, and contains the interface to the ecalls that are exported by the VM (in particular, the ones allowing access to Bolos syscalls).

  • When compiled towards RISC-V target, direct ecalls are used.
  • When compiled towards Native target, the corresponding implementation from OpenSSL are used instead.

Compiling the C SDK is a pre-requisite for the Rust sdk, and for any app using Rust 🦀 SDK.

Build for RISC-V target

Build the Docker image to have a ready-to-use RISC-V toolchain

Linux x86_64 host

docker build -t riscv -f riscv.Dockerfile .

Apple M1/M2 host

Dockcross linux-riscv32 image shall be rebuilt locally

git clone [email protected]:dockcross/dockcross.git
cd dockcross
make base
make linux-riscv32
docker build -t riscv -f riscv.Dockerfile .

Build C-sdk

$ ./docker.sh riscv

Build for Native target

Build the Docker image

docker build -t native -f native.Dockerfile .

Build C-sdk

$ ./docker.sh native