Skip to main content

Module glue

Module glue 

Source
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§

WindowPresentation
How the target presents every window kind, as a Presentation variant.

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.rs of 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.rs of the MCP server, derived from the command catalog.
module_dependencies
Cargo dependency lines for the modules’ protocol crates, their engine crates when engines is set, and bern itself, 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 from RELEASE_PROFILE, take the application’s own release settings over it, and keep fixed, 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::SessionSpec of an application.
session_spec_with
The bern_ffi::runtime::SessionSpec of an application whose window kinds present as the Rust expression presentation returns for each, for targets that choose at run time.
type_expr
types_expr
value_expr