sidlc is the Strata Interface Definition Language compiler. It is built as
part of the host tools graph and installed by the folisdk-host package.
The CMake integration module is installed as UseSIDLC.cmake.
- The active compiler is the C++20 executable in
sidlc/coreandsidlc/lang. - The compiler uses subcommands:
compile,decompile, andgenerate. .sidlis the human-authored source format..sifis the compiled Strata InterFace artifact used for code generation and ABI history extension..sifuses theSIF\0magic value and stores a binary tree representation of the parsed interface, with 4-byte-aligned strings, mandatory UUID identity/prefix metadata, a root revision hash, and a per-revision hash table. It does not embed the original.sidlsource text.- The only implemented output language is C (
generate --lang=c). - The only architecture ABI currently registered in
sidlcisx86_64(generate --arch=x86_64), with an 8-byte pointer size and six register argument slots. - Supported SIDL declarations include
interface, contiguousabirevisionblocks starting at0,struct,bitfield<T>,enum<T>, andfunction. - Supported parameter directions are
in,out, andinout. - Supported type forms include built-ins, user-defined types,
ptr<T>,array<T>, andconst. - Built-in C type mappings include
opaque,u8/u16/u32/u64,s8/s16/s32/s64,handle, andstatus. - Interface source annotations
@prefix("...")and@uuid("namespace-uuid", "name")are required and are stored as SIF header metadata after compilation. - Struct
@align_size(...)is recognized and emits an aligned struct attribute. generate --weakemits weak client binding symbols.
Compile a source interface into a SIF artifact:
sidlc compile -o byte_stream.sif byte_stream.sidlExtend an existing ABI history:
sidlc compile -b byte_stream.sif -o byte_stream.next.sif byte_stream.next.sidlDecompile a SIF artifact into canonical SIDL source:
sidlc decompile -o byte_stream.sidl byte_stream.sifGenerate C bindings:
sidlc generate \
--arch=x86_64 \
--lang=c \
--mode=client \
--header-dir=gen/sidl \
--source-path=gen/sidl/byte_stream.c \
byte_stream.sifThe C generator can emit:
*.types.h: shared constants, UUID macros, ABI revision metadata, enums, bitfields, and structs.*.h/*.client.c: client-sideOpen,Query, and function wrappers usingStHandle_Query,StHandle_Call*, andStHandle_CallN.*.server.h/*.server.c: server vtable declarations andServerDispatchArgsdispatch glue.*.server-client.h/*.server-client.c: client-callable wrappers without theOpen/Queryhandle binding helpers.
include(UseSIDLC)
sidlc_compile(
OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/sidl"
SIFS_VAR SIDL_SIFS
FILES "${SIDLC_INTERFACE_DIRECTORY}/byte_stream.sidl"
)
sidlc_generate(
CLIENT
HEADER_DIR "${CMAKE_CURRENT_BINARY_DIR}/sidl"
SRCS_VAR SIDL_SRCS
HDRS_VAR SIDL_HDRS
SIFS ${SIDL_SIFS}
)sidlc_compile() creates .sif artifacts from .sidl sources.
sidlc_generate() creates source/header bindings from those .sif artifacts.
Pass the generated SIF list to later build steps when they need the compiled
interface artifacts, such as sma_add_module(PROVIDES ...).