mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-16 17:18:57 +00:00
Rename {native,typed} functions, reintroduce *_with_env variants
This commit is contained in:
@@ -212,35 +212,35 @@ mod js {
|
||||
// let module = Module::new(&store, wat).unwrap();
|
||||
// let imports = imports! {
|
||||
// "host" => {
|
||||
// "host_func1" => Function::new_native(&store, |p: u64| {
|
||||
// "host_func1" => Function::new_typed(&store, |p: u64| {
|
||||
// println!("host_func1: Found number {}", p);
|
||||
// assert_eq!(p, u64::max_value());
|
||||
// }),
|
||||
// "host_func2" => Function::new_native(&store, |p: u32| {
|
||||
// "host_func2" => Function::new_typed(&store, |p: u32| {
|
||||
// println!("host_func2: Found number {}", p);
|
||||
// assert_eq!(p, u32::max_value());
|
||||
// }),
|
||||
// "host_func3" => Function::new_native(&store, |p: i64| {
|
||||
// "host_func3" => Function::new_typed(&store, |p: i64| {
|
||||
// println!("host_func3: Found number {}", p);
|
||||
// assert_eq!(p, -1);
|
||||
// }),
|
||||
// "host_func4" => Function::new_native(&store, |p: i32| {
|
||||
// "host_func4" => Function::new_typed(&store, |p: i32| {
|
||||
// println!("host_func4: Found number {}", p);
|
||||
// assert_eq!(p, -1);
|
||||
// }),
|
||||
// "host_func5" => Function::new_native(&store, |p: i16| {
|
||||
// "host_func5" => Function::new_typed(&store, |p: i16| {
|
||||
// println!("host_func5: Found number {}", p);
|
||||
// assert_eq!(p, -1);
|
||||
// }),
|
||||
// "host_func6" => Function::new_native(&store, |p: u16| {
|
||||
// "host_func6" => Function::new_typed(&store, |p: u16| {
|
||||
// println!("host_func6: Found number {}", p);
|
||||
// assert_eq!(p, u16::max_value());
|
||||
// }),
|
||||
// "host_func7" => Function::new_native(&store, |p: i8| {
|
||||
// "host_func7" => Function::new_typed(&store, |p: i8| {
|
||||
// println!("host_func7: Found number {}", p);
|
||||
// assert_eq!(p, -1);
|
||||
// }),
|
||||
// "host_func8" => Function::new_native(&store, |p: u8| {
|
||||
// "host_func8" => Function::new_typed(&store, |p: u8| {
|
||||
// println!("host_func8: Found number {}", p);
|
||||
// assert_eq!(p, u8::max_value());
|
||||
// }),
|
||||
|
||||
Reference in New Issue
Block a user