Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_validate():
assert Module.validate(TEST_BYTES)
def test_validate_invalid():
assert not Module.validate(INVALID_TEST_BYTES)
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