deno_bindgen
This tool aims to simply types & glue code generation for FFI libraries written in Rust.
Usage
Add serde
and deno_bindgen
dependency to your crate.
use deno_bindgen;
Generated bindings will look like this:
// bindings/binding.ts
// ... <init code here>
type Input = ;
export async function say_hello
These bindings contain nessecary code to open the shared library, define symbols and expose type definitions. They can be simply imported into Deno code:
import "./bindings/bindings.ts";
await say_hello
from