Loom C API
Public Loom compiler C API
Toggle main menu visibility
Loading...
Searching...
No Matches
config.h
Go to the documentation of this file.
1
// Copyright 2026 The IREE Authors
2
//
3
// Licensed under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7
#ifndef LOOMC_CONFIG_H_
8
#define LOOMC_CONFIG_H_
9
10
#include "
loomc/base.h
"
11
42
43
#ifdef __cplusplus
44
extern
"C"
{
45
#endif
46
52
typedef
struct
loomc_config_binding_t
{
54
loomc_string_view_t
key
;
55
57
loomc_string_view_t
value
;
58
}
loomc_config_binding_t
;
59
61
typedef
enum
loomc_config_policy_flag_bits_e {
63
LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED
= 1u << 0,
64
}
loomc_config_policy_flag_bits_t
;
65
67
typedef
uint32_t
loomc_config_policy_flags_t
;
68
78
typedef
struct
loomc_config_options_t
{
80
const
loomc_config_binding_t
*
bindings
;
81
83
loomc_host_size_t
binding_count
;
84
86
loomc_string_view_t
json_object
;
87
89
loomc_config_policy_flags_t
flags
;
90
}
loomc_config_options_t
;
91
92
#ifdef __cplusplus
93
}
// extern "C"
94
#endif
95
96
#endif
// LOOMC_CONFIG_H_
base.h
Base types, descriptors, spans, and host allocation helpers.
loomc_host_size_t
size_t loomc_host_size_t
Host allocation and container size type.
Definition
base.h:45
loomc_config_policy_flag_bits_t
loomc_config_policy_flag_bits_t
Configuration validation and resolution policy bit values.
Definition
config.h:61
LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED
@ LOOMC_CONFIG_POLICY_FLAG_REQUIRE_RESOLVED
Require all final operation config values to be resolved.
Definition
config.h:63
loomc_config_policy_flags_t
uint32_t loomc_config_policy_flags_t
Bitmask of loomc_config_policy_flag_bits_t values.
Definition
config.h:67
loomc_config_binding_t
Single configuration key/value binding.
Definition
config.h:52
loomc_config_binding_t::key
loomc_string_view_t key
Config key, with a leading @ accepted by normalization.
Definition
config.h:54
loomc_config_binding_t::value
loomc_string_view_t value
Config value spelling.
Definition
config.h:57
loomc_config_options_t
Text configuration bindings and resolution policy shared by API operations.
Definition
config.h:78
loomc_config_options_t::json_object
loomc_string_view_t json_object
Optional JSON/JSONC object string normalized into the same binding set.
Definition
config.h:86
loomc_config_options_t::bindings
const loomc_config_binding_t * bindings
Plain key/value bindings.
Definition
config.h:80
loomc_config_options_t::flags
loomc_config_policy_flags_t flags
Config validation and resolution policy flags.
Definition
config.h:89
loomc_config_options_t::binding_count
loomc_host_size_t binding_count
Number of entries in bindings.
Definition
config.h:83
loomc_string_view_t
Non-owning string view over bytes that need not be NUL-terminated.
Definition
base.h:63
loomc
config.h
Generated by
1.17.0