|
Loom C API
Public Loom compiler C API
|
Reusable command compilation over one immutable source catalog. More...
Go to the source code of this file.
Data Structures | |
| struct | loomc_cmd_compiler_options_t |
| Command compiler storage policy. More... | |
Typedefs | |
| typedef struct loomc_cmd_compiler_t | loomc_cmd_compiler_t |
| Concurrent command compiler retaining a frozen index and prepared native sources and staged plans. | |
Functions | |
| loomc_status_t | loomc_cmd_compiler_create (loomc_link_index_t *link_index, const loomc_cmd_compiler_options_t *options, loomc_allocator_t allocator, loomc_cmd_compiler_t **out_compiler) |
| Creates a compiler retaining |link_index|. | |
| void | loomc_cmd_compiler_retain (loomc_cmd_compiler_t *compiler) |
| Retains a compiler. | |
| void | loomc_cmd_compiler_release (loomc_cmd_compiler_t *compiler) |
| Releases a compiler. | |
Reusable command compilation over one immutable source catalog.
| typedef struct loomc_cmd_compiler_t loomc_cmd_compiler_t |
Concurrent command compiler retaining a frozen index and prepared native sources and staged plans.
Each invocation supplies its own workspace, roots, configuration, targets, and publication sink. Published products and requests own their contents independently of the compiler.
| loomc_status_t loomc_cmd_compiler_create | ( | loomc_link_index_t * | link_index, |
| const loomc_cmd_compiler_options_t * | options, | ||
| loomc_allocator_t | allocator, | ||
| loomc_cmd_compiler_t ** | out_compiler ) |
Creates a compiler retaining |link_index|.
Creation inspects no source bodies. Passing NULL options selects the default storage policy.
The compiler supports concurrent invocations with independent workspaces; callers hold a reference until each synchronous invocation has returned.
| link_index | Immutable source index retained by the compiler. |
| options | Storage policy, or NULL for defaults. Borrowed for this call. |
| allocator | Host allocator used for compiler and retained source storage. |
| out_compiler | Receives one owned compiler reference on success and NULL on failure. Release it with loomc_cmd_compiler_release. |
| void loomc_cmd_compiler_release | ( | loomc_cmd_compiler_t * | compiler | ) |
Releases a compiler.
Passing NULL is allowed. Thread-safe. The final release destroys staged plans and prepared sources before releasing their index and context.
| compiler | Compiler reference to release, or NULL. |
| void loomc_cmd_compiler_retain | ( | loomc_cmd_compiler_t * | compiler | ) |
Retains a compiler.
Passing NULL is allowed. Thread-safe.
| compiler | Compiler to retain, or NULL. |