Skip to main content

Crate ferrocad

Crate ferrocad 

Source
Expand description

§ferrocad

The base FerroCAD application. The binary (cargo install ferrocad) boots an embedded CPython interpreter and opens the bite-gpui shell; the engine is ferrocad_core and the shell library is ferrocad_gpui.

§The payload

The app is useless without its Python facade and workbenches. A development checkout has them in the workspace; cargo install does not, so the payload is embedded into the binary and unpacked on first run. See payload for the resolution order and the packaging story in docs/architecture/distribution.md.

§Editions

run_as is the entry point an edition (a thin binary that links extra workbench modules and brands the window) calls. An edition registers its own built-in modules first, then delegates here; see docs/architecture/repackaging.md.

Modules§

payload
Locating (and, when needed, unpacking) the app’s Python payload.

Structs§

Contributions
The workbench contributions an edition registers (its manipulators). The manipulators an edition contributes, in registration order.
EditionArgs
The flags an edition accepts in both its windowed and headless modes.
RenderReport
What a headless run produced, for the caller to print.

Functions§

base_contributions
The general edition’s contributions: the generic transform handle.
check_init
Boot the interpreter and the payload, then exit without opening a window.
edition_args
Parse --render, --size, --script and --open from the process arguments.
register_core_module
Register the core ferrocad PyO3 extension as a built-in module, so import ferrocad resolves without a separate ferrocad.abi3.so on disk. #[pymodule] expands ferrocad_py::ferrocad into a hidden module, which the macro needs in scope by name.
render_edition_headless
Render an edition’s sample document headlessly to out.
run
Boot the embedded interpreter and open the shell window (the base app).
run_as
Like run, but with an edition’s app_name (the window title) and its Python entry module.
run_edition
run_as with an explicit entry module (the edition’s app script).
run_edition_with
run_edition with the workbench contributions the edition registers.
run_edition_with_document
run_edition_with with a document to open at boot (--open).