pytket.wasm¶
Handler for wasm files in pytket
- class pytket.wasm.wasm.WasmFileHandler(filepath, check_file=True, int_size=32)[source]¶
Construct and optionally check a wasm module from a file for use in wasm Ops.
- class pytket.wasm.wasm.WasmModuleHandler(wasm_module, check=True, int_size=32)[source]¶
Construct and optionally check a wasm module for use in wasm Ops.
- check()[source]¶
Collect functions from the module that can be used with pytket.
Populates the internal list of supported and unsupported functions and marks the module as checked so that subsequent checking is not required.
- Return type:
- check_function(function_name, number_of_parameters, number_of_returns)[source]¶
Checks a given function name and signature if it is included and the module has previously been checked.
If the module has not been checked this function with will raise a ValueError.
- Parameters:
- Return type:
- Returns:
true if the signature and the name of the function is correct