v1.0.0-beta1
jubianchi
released this
03 Dec 20:22
·
222 commits
to master
since this release
Changed
-
The whole API changed to better match Wasmer and Wasm C API
// Create an Engine engine := wasmer.NewEngine() // Create a Store store := wasmer.NewStore(engine) fmt.Println("Compiling module...") module, err := wasmer.NewModule(store, wasmBytes) if err != nil { fmt.Println("Failed to compile module:", err) } // Create an empty import object. importObject := wasmer.NewImportObject() fmt.Println("Instantiating module...") // Let's instantiate the Wasm module. instance, err := wasmer.NewInstance(module, importObject) if err != nil { panic(fmt.Sprintln("Failed to instantiate the module:", err)) }
Please refer to the examples and documentation to learn more about the changes.