https://github.com/etcdevteam/sputnikvm-ffi
C and golang bindings for SputnikVM.
https://github.com/etcdevteam/sputnikvm-ffi
Last synced: about 2 months ago
JSON representation
C and golang bindings for SputnikVM.
- Host: GitHub
- URL: https://github.com/etcdevteam/sputnikvm-ffi
- Owner: ETCDEVTeam
- License: apache-2.0
- Created: 2017-11-23T09:01:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-16T21:41:59.000Z (over 6 years ago)
- Last Synced: 2025-04-12T02:13:28.634Z (about 2 months ago)
- Language: Rust
- Homepage:
- Size: 1.24 MB
- Stars: 8
- Watchers: 7
- Forks: 10
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SputnikVM FFI Bindings
This repo contains C and Go bindings for the SputnikVM core
library.## Usage
### C
In `c` folder, run `make build`. It will generate an object file
`libsputnikvm.so`, and you can use the header file `sputnikvm.h` to
interact with it. You can find the generated documentation file for
`sputnikvm.h`
[here](https://ETCDEVTeam.github.io/sputnikvm-ffi/sputnikvm_8h.html).### Go
Import the `sputnikvm` library to your application:
```
import "github.com/ETCDEVTeam/sputnikvm-ffi/go/sputnikvm"
```Build a static library for the C FFI, which will give you an
`libsputnikvm.a` file:```
cd c
make build
```When building your Go application, pass `CGO_LDFLAGS` to link the C
library.```
CGO_LDFLAGS="/path/to/libsputnikvm.a -ldl" go build .
```Refer to
[GoDoc](https://godoc.org/github.com/ETCDEVTeam/sputnikvm-ffi/go/sputnikvm)
for documentation of the Go bindings.