Move Wasmtime for .NET to the Wasmtime repo.

This moves the Wasmtime for .NET implementation to the Wasmtime repo.

Wasmtime for .NET is a binding of the Wasmtime API for use in .NET.
This commit is contained in:
Peter Huene
2019-11-22 17:11:00 -08:00
parent bbe2a797ba
commit 9fdf5bce8e
100 changed files with 6391 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,26 @@
(module
(func $no_params_no_results)
(func $one_i32_param_no_results (param i32))
(func $one_i64_param_no_results (param i64))
(func $one_f32_param_no_results (param f32))
(func $one_f64_param_no_results (param f64))
(func $one_param_of_each_type (param i32 i64 f32 f64))
(func $no_params_one_i32_result (result i32) i32.const 0)
(func $no_params_one_i64_result (result i64) i64.const 0)
(func $no_params_one_f32_result (result f32) f32.const 0)
(func $no_params_one_f64_result (result f64) f64.const 0)
(func $one_result_of_each_type (result i32 i64 f32 f64) i32.const 0 i64.const 0 f32.const 0 f64.const 0)
(func $one_param_and_result_of_each_type (param i32 i64 f32 f64) (result i32 i64 f32 f64) i32.const 0 i64.const 0 f32.const 0 f64.const 0)
(export "no_params_no_results" (func $no_params_no_results))
(export "one_i32_param_no_results" (func $one_i32_param_no_results))
(export "one_i64_param_no_results" (func $one_i64_param_no_results))
(export "one_f32_param_no_results" (func $one_f32_param_no_results))
(export "one_f64_param_no_results" (func $one_f64_param_no_results))
(export "one_param_of_each_type" (func $one_param_of_each_type))
(export "no_params_one_i32_result" (func $no_params_one_i32_result))
(export "no_params_one_i64_result" (func $no_params_one_i64_result))
(export "no_params_one_f32_result" (func $no_params_one_f32_result))
(export "no_params_one_f64_result" (func $no_params_one_f64_result))
(export "one_result_of_each_type" (func $one_result_of_each_type))
(export "one_param_and_result_of_each_type" (func $one_param_and_result_of_each_type))
)

Binary file not shown.

View File

@@ -0,0 +1,27 @@
(module
(type $t0 (func))
(type $t1 (func (param i32)))
(type $t2 (func (param i64)))
(type $t3 (func (param f32)))
(type $t4 (func (param f64)))
(type $t5 (func (param i32 i64 f32 f64)))
(type $t6 (func (result i32)))
(type $t7 (func (result i64)))
(type $t8 (func (result f32)))
(type $t9 (func (result f64)))
(type $t10 (func (result i32 i64 f32 f64)))
(type $t11 (func (param i32 i64 f32 f64) (result i32 i64 f32 f64)))
(import "" "no_params_no_results" (func $.f0 (type $t0)))
(import "" "one_i32_param_no_results" (func $.f1 (type $t1)))
(import "" "one_i64_param_no_results" (func $.f2 (type $t2)))
(import "" "one_f32_param_no_results" (func $.f3 (type $t3)))
(import "" "one_f64_param_no_results" (func $.f4 (type $t4)))
(import "" "one_param_of_each_type" (func $.f5 (type $t5)))
(import "" "no_params_one_i32_result" (func $.f6 (type $t6)))
(import "" "no_params_one_i64_result" (func $.f7 (type $t7)))
(import "" "no_params_one_f32_result" (func $.f8 (type $t8)))
(import "" "no_params_one_f64_result" (func $.f9 (type $t9)))
(import "" "one_result_of_each_type" (func $.f10 (type $t10)))
(import "" "one_param_and_result_of_each_type" (func $.f11 (type $t11)))
(import "other" "function_from_module" (func $.f12 (type $t0)))
)

Binary file not shown.

View File

@@ -0,0 +1,18 @@
(module
(global $g1 i32 (i32.const 0))
(global $g2 (mut i32) (i32.const 1))
(global $g3 i64 (i64.const 2))
(global $g4 (mut i64) (i64.const 3))
(global $g5 f32 (f32.const 4))
(global $g6 (mut f32) (f32.const 5))
(global $g7 f64 (f64.const 6))
(global $g8 (mut f64) (f64.const 7))
(export "global_i32" (global $g1))
(export "global_i32_mut" (global $g2))
(export "global_i64" (global $g3))
(export "global_i64_mut" (global $g4))
(export "global_f32" (global $g5))
(export "global_f32_mut" (global $g6))
(export "global_f64" (global $g7))
(export "global_f64_mut" (global $g8))
)

View File

@@ -0,0 +1,22 @@
(module
(import "" "global_i32_mut" (global $global_i32_mut (mut i32)))
(import "" "global_i32" (global $global_i32 i32))
(import "" "global_i64_mut" (global $global_i64_mut (mut i64)))
(import "" "global_i64" (global $global_i64 i64))
(import "" "global_f32_mut" (global $global_f32_mut (mut f32)))
(import "" "global_f32" (global $global_f32 f32))
(import "" "global_f64_mut" (global $global_f64_mut (mut f64)))
(import "" "global_f64" (global $global_f64 f64))
(func (export "get_global_i32_mut") (result i32) (global.get $global_i32_mut))
(func (export "get_global_i32") (result i32) (global.get $global_i32))
(func (export "set_global_i32_mut") (param i32) (global.set $global_i32_mut (local.get 0)))
(func (export "get_global_i64_mut") (result i64) (global.get $global_i64_mut))
(func (export "get_global_i64") (result i64) (global.get $global_i64))
(func (export "set_global_i64_mut") (param i64) (global.set $global_i64_mut (local.get 0)))
(func (export "get_global_f32_mut") (result f32) (global.get $global_f32_mut))
(func (export "get_global_f32") (result f32) (global.get $global_f32))
(func (export "set_global_f32_mut") (param f32) (global.set $global_f32_mut (local.get 0)))
(func (export "get_global_f64_mut") (result f64) (global.get $global_f64_mut))
(func (export "get_global_f64") (result f64) (global.get $global_f64))
(func (export "set_global_f64_mut") (param f64) (global.set $global_f64_mut (local.get 0)))
)

Binary file not shown.

View File

@@ -0,0 +1,11 @@
(module
(global $g1 (import "" "global_i32") i32)
(global $g2 (import "" "global_i32_mut") (mut i32))
(global $g3 (import "" "global_i64") i64)
(global $g4 (import "" "global_i64_mut") (mut i64))
(global $g5 (import "" "global_f32") f32)
(global $g6 (import "" "global_f32_mut") (mut f32))
(global $g7 (import "" "global_f64") f64)
(global $g8 (import "" "global_f64_mut") (mut f64))
(global $g9 (import "other" "global_from_module") i32)
)

Binary file not shown.

View File

@@ -0,0 +1,11 @@
(module
(memory (export "mem") 1 2)
(data (i32.const 0) "Hello World")
(data (i32.const 20) "\01")
(data (i32.const 21) "\02\00")
(data (i32.const 23) "\03\00\00\00")
(data (i32.const 27) "\04\00\00\00\00\00\00\00")
(data (i32.const 35) "\00\00\a0\40")
(data (i32.const 39) "\00\00\00\00\00\00\18\40")
(data (i32.const 48) "\07\00\00\00\00\00\00\00")
)

View File

@@ -0,0 +1,39 @@
(module
(import "" "mem" (memory 1))
(data (i32.const 0) "Hello World")
(data (i32.const 20) "\01")
(data (i32.const 21) "\02\00")
(data (i32.const 23) "\03\00\00\00")
(data (i32.const 27) "\04\00\00\00\00\00\00\00")
(data (i32.const 35) "\00\00\a0\40")
(data (i32.const 39) "\00\00\00\00\00\00\18\40")
(data (i32.const 48) "\07\00\00\00\00\00\00\00")
(func (export "ReadByte") (result i32)
i32.const 20
i32.load8_s
)
(func (export "ReadInt16") (result i32)
i32.const 21
i32.load16_s
)
(func (export "ReadInt32") (result i32)
i32.const 23
i32.load
)
(func (export "ReadInt64") (result i64)
i32.const 27
i64.load
)
(func (export "ReadFloat32") (result f32)
i32.const 35
f32.load
)
(func (export "ReadFloat64") (result f64)
i32.const 39
f64.load
)
(func (export "ReadIntPtr") (result i64)
i32.const 48
i64.load
)
)

View File

@@ -0,0 +1,3 @@
(module
(import "js" "mem" (memory 1 2))
)

View File

@@ -0,0 +1,3 @@
(module
(import "" "mem" (memory 1))
)

View File

@@ -0,0 +1,3 @@
(module
(import "" "mem" (memory 10 100))
)

Binary file not shown.

View File

@@ -0,0 +1,8 @@
(module
(table $t0 1 10 funcref)
(table $t1 10 anyref)
(table $t2 100 1000 funcref)
(export "table1" (table $t0))
(export "table2" (table $t1))
(export "table3" (table $t2))
)

Binary file not shown.

View File

@@ -0,0 +1,5 @@
(module
(import "" "table1" (table $t1 10 funcref))
(import "" "table2" (table $t2 15 anyref))
(import "other" "table3" (table $t3 1 funcref))
)