Expand description
Rust source for generated glue crates.
Targets that link the engine and the session runtime into a product
generate a small crate around bern-ffi. These helpers write the IR’s
schema and session description as Rust expressions, so every target
describes the same session layer the same way.
Enums§
- Window
Presentation - How the target presents every window kind, as a
Presentationvariant.
Constants§
- RELEASE_
PROFILE - What the
[profile.release]of every generated crate sets: link-time optimization across all crates in one code generation unit, and programs without a symbol table. Packages ship release builds, and this keeps the command line and the MCP server beside an app small; debug builds keep Cargo’s defaults.
Functions§
- cli_rs
main.rsof the application CLI, derived from the command catalog.- descriptor_
expr - The expression giving the application catalog as a
&'static ProtocolDescriptor. - engine_
expr - The expression creating the application engine: the protocol adapter around the engine, or with modules the composite of the shell and every module engine.
- mcp_rs
main.rsof the MCP server, derived from the command catalog.- module_
dependencies - Cargo dependency lines for the modules’ protocol crates, their engine
crates when
enginesis set, andbernitself, which composes them. - path
- A path as generated manifests and sources write it, with
/between components on every system. - players_
expr vec![…]items for the application’s players and declared resources.- profiles
- The
[profile]tables of a generated crate. A generated crate is a workspace of its own, so the application’s profiles would not reach the programs a target builds: they are carried over from its workspace manifest. Release builds start fromRELEASE_PROFILE, take the application’s own release settings over it, and keepfixed, the lines the target cannot do without (unwinding across the FFI, say); the other profiles, such as optimized libraries in debug builds, are the application’s as they are. - program
- Name stem of the generated programs, for example
showcase. - resources_
expr - session_
spec - The
bern_ffi::runtime::SessionSpecof an application. - session_
spec_ with - The
bern_ffi::runtime::SessionSpecof an application whose window kinds present as the Rust expressionpresentationreturns for each, for targets that choose at run time. - type_
expr - types_
expr - value_
expr