@imp/rules/c/host

Module: @imp/rules/c/host.

default_graph_toolchain()

The host C compiler record on macOS, or nil on another platform.

Returns { kind, tool, clang_tool, ar_tool }. tool is cc. Odin's darwin link step runs clang, and cc-rs build scripts run ar.

Source: rules/c/host/index.luau:21.

is_host_toolchain(value)

True when value is a host C compiler record.

Source: rules/c/host/index.luau:34.

The rustflags and environment that make rustc and cc-rs use the host compiler. Declare tool and ar_tool of the record as task inputs.

Returns { rustflags, env, path_dirs }, the shape of gcc.rust_link_driver_env. The tools are on PATH, so path_dirs is empty. With kache_active, CC and CXX run the compiler through kache.

Source: rules/c/host/index.luau:44.