Skip to content

0.3.0

Compare
Choose a tag to compare
@Hywan Hywan released this 16 Jul 08:33
· 860 commits to master since this release

Features

Extension

  • #56 Add the Memory.grow method (@Hywan)

  • #54 Bound slice to the size of the memory view —allow to write memory_view[0:] with no error— (@Hywan)

  • #51 Add wasmer.__core_version__ to get the runtime [Wasmer] version (@Hywan)

  • #48 Support module serialization with Module.serialize and Module.deserialize (@Hywan)

    from wasmer import Module
    
    # Get the Wasm bytes.
    wasm_bytes = open('my_program.wasm', 'rb').read()
    
    # Compile the bytes into a Wasm module.
    module1 = Module(wasm_bytes)
    
    # Serialize the module.
    serialized_module = module1.serialize()
    
    # Let's forget about the module for this example.
    del module1
    
    # Deserialize the module.
    module2 = Module.deserialize(serialized_module)
    
    # Instantiate and use it.
    result = module2.instantiate().exports.sum(1, 2)
  • #47 Introduce the Module class, with Module.validate and Module.instantiate (@Hywan)

    from wasmer import Module
    
    # Get the Wasm bytes.
    wasm_bytes = open('my_program.wasm', 'rb').read()
    
    # Compile the Wasm bytes into a Wasm module.
    module = Module(wasm_bytes)
    
    # Instantiate the Wasm module.
    instance = module.instantiate()
    
    # Call a function on it.
    result = instance.exports.sum(1, 2)
    
    print(result) # 3
  • #27 Add wasmer.__version__ to get the extension version (@Mec-iS)

Runtime

Bug/security fixes

Documentation

Chore