Skip to content

Simple library for serializing complex types to the wasmtime runtime using serde

License

Unlicense, MIT licenses found

Licenses found

Unlicense
UNLICENSE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

Heraclito-Q-Saldanha/wasmtime_serde

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wasmtime serde

Simple library for serializing complex types to the wasmtime runtime using serde

using

// guest
use wasmtime_serde_guest::*;

#[export_fn]
fn add(a: i32, b: i32) -> i32 {
    a + b
}

// host
use wasmtime_serde_host::*;

fn main(){
    let runtime = Runtime::from_file("file.wasm", &[]).unwrap();
    let add_fn = runtime.get_func::<(i32, i32), i32>("add").unwrap();
    let result = add_fn.call(&(1, 2));
    println!("{result}");
}

See the example code

Dual-licensed under MIT or the UNLICENSE.

About

Simple library for serializing complex types to the wasmtime runtime using serde

Topics

Resources

License

Unlicense, MIT licenses found

Licenses found

Unlicense
UNLICENSE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages