Skip to content

1.0.0-beta1

Compare
Choose a tag to compare
@jubianchi jubianchi released this 03 Dec 22:02
· 244 commits to master since this release
067e683

Python Packages:

Changed

  • The whole API changed to better match Wasmer and Wasm C API

    from wasmer import engine, wat2wasm, ImportObject, Module, Store, Instance
    from wasmer_compiler_cranelift import Compiler
    
    # Create an Engine
    jit = engine.JIT(Compiler)
    
    # Create a store.
    store = Store(jit)
    
    # Let's compile the Wasm module.
    module = Module(store, wasm_bytes)
    
    # Create an empty import object.
    import_object = ImportObject()
    
    # Let's instantiate the Wasm module.
    instance = Instance(module, import_object)

    Please refer to the examples and
    documentation to learn more about the changes.