Use cargo rustc
to compile models as dynamic libraries
#938
Labels
good first issue
Good for newcomers
type: feature
New features and improvements to existing features
Milestone
Fornjot models are Rust packages that are compiled as dynamic libraries, then loaded into the Fornjot application at runtime. Right now, the user needs to add the following to their model's
Cargo.toml
to make that work:If they don't do that, this results in the following unfriendly error message:
It should be possible to use
cargo rustc
to compile models, and pass the--crate-type
argument (which has just been stabilized) to compile models as dynamic libraries. This should remove the need to specify the crate type inCargo.toml
.The code that compiles models lives in
fj-host
:https://github.com/hannobraun/Fornjot/blob/c5aee575fe443d2e0f91fd198a7b44b88ddff0fc/crates/fj-host/src/lib.rs#L91-L96
Labeling as https://github.com/hannobraun/Fornjot/labels/good%20first%20issue, as this should be a relatively small change, if it works out.
The text was updated successfully, but these errors were encountered: