Reusable Loom API context.
A context owns process-local Loom language registration state used by parsing, bytecode indexing, linking, and compilation. Embedders normally create one context for a process or toolchain instance and share it with prepared linkers, compilers, and link-index builders.
- Example
- Create a context once, then reuse it while building persistent indexes:
if (!loomc_status_is_ok(status)) {
return status;
}
loomc_allocator_t loomc_allocator_system(void)
Returns a process-global system allocator.
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition base.h:55
struct loomc_context_t loomc_context_t
Immutable Loom API context.
Definition context.h:47
loomc_status_t loomc_context_create(const loomc_context_options_t *options, loomc_allocator_t allocator, loomc_context_t **out_context)
Creates a reusable Loom API context.
void loomc_context_release(loomc_context_t *context)
Releases context from one owner.