How to use the wasmer.Module.validate function in wasmer

To help you get started, we’ve selected a few wasmer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wasmerio / python-ext-wasm / tests / test_module.py View on Github external
def test_validate():
    assert Module.validate(TEST_BYTES)
github wasmerio / python-ext-wasm / tests / test_module.py View on Github external
def test_validate_invalid():
    assert not Module.validate(INVALID_TEST_BYTES)
github pannous / angle / angle / extensions.py View on Github external
def wasm(file='/me/dev/wasm/main42.wasm'):
	import wasmer
	bytes=open(file,'rb').read()
	wasmer.Module.validate(bytes)
	instance=wasmer.Instance(bytes)
	view = instance.memory.uint8_view(offset=0)
	result = instance.exports.main()
	print(result)
	print(wasm_string(result))
	return result