Change wasm_module_new to use Module::from_binary.

This commit changes the C API function `wasm_module_new` to use the Rust API
`Module::from_binary` which performs verification of the module, as per the C
API spec.

This also introduces a `EngineBuilder` type to the C# API that can be used to
construct an `Engine` with the various Wasmtime configuration options.  This
is required to get the C# tests passing since they use reference types and
multi-value.

Fixes #859.
This commit is contained in:
Peter Huene
2020-02-27 13:38:08 -08:00
parent 588cdd47f9
commit 7dfb6ebdb6
6 changed files with 341 additions and 4 deletions

View File

@@ -8,7 +8,10 @@ namespace Wasmtime.Tests
{
public ModuleFixture()
{
Engine = new Engine();
Engine = new EngineBuilder()
.WithMultiValue(true)
.WithReferenceTypes(true)
.Build();
Store = Engine.CreateStore();
Module = Store.CreateModule(Path.Combine("Modules", ModuleFileName));
}