Rename {native,typed} functions, reintroduce *_with_env variants

This commit is contained in:
Wolfgang Silbermayr
2022-08-03 11:45:31 +02:00
parent 663f922f78
commit 7df3e3ca23
42 changed files with 1327 additions and 1305 deletions

View File

@@ -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());
// }),