Loom C API
Public Loom compiler C API
Loading...
Searching...
No Matches
wasm.h File Reference

WebAssembly compiler package. More...

Go to the source code of this file.

Macros

#define LOOMC_ARTIFACT_FORMAT_WASM_BINARY   "wasm-binary"
 WebAssembly binary module artifact format.

Functions

loomc_status_t loomc_target_environment_create_wasm (loomc_allocator_t allocator, loomc_target_environment_t **out_target_environment)
 Creates a target environment containing the WebAssembly compiler and emitter.

Detailed Description

WebAssembly compiler package.

The package compiles functions for WebAssembly SIMD128 and emits canonical WebAssembly binary modules. Compilation and emission require no live device or platform runtime.

Function Documentation

◆ loomc_target_environment_create_wasm()

loomc_status_t loomc_target_environment_create_wasm ( loomc_allocator_t allocator,
loomc_target_environment_t ** out_target_environment )

Creates a target environment containing the WebAssembly compiler and emitter.

Parameters
allocatorHost allocator used for target-environment storage.
out_target_environmentReceives one retained environment on success.
Returns
OK when the target environment was created.
Ownership
The caller releases the returned reference with loomc_target_environment_release. The environment may be shared across compiler instances and worker threads.