You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of now, this is what happens when you try to load a model (via fj-app -m path/to/model) that doesn't build a dynamic library:
thread 'main' panicked at 'Error reloading model: LibLoading(DlOpen { desc: "target/debug/liberror.so: cannot open shared object file: No such file or directory" })', crates/fj-host/src/lib.rs:279:25
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
This should result in a nice error message that explains what it wrong and how to fix it. The fix would be to add the following to the model's Cargo.toml:
[lib]
crate-type = ["cdylib"]
The text was updated successfully, but these errors were encountered:
hannobraun
changed the title
Handle model package not being a dynamic library
Emit good error message, if model package is not a dynamic library
Jul 20, 2022
As an alternative to emitting a good error message, it might be possible to circumvent this problem completely, and not require the crate-type in the model's Cargo.toml. This could be done by using cargo rustc to compile models, and pass the --crate-type argument. This argument was just stabilized: rust-lang/cargo#10838
As of now, this is what happens when you try to load a model (via
fj-app -m path/to/model
) that doesn't build a dynamic library:This should result in a nice error message that explains what it wrong and how to fix it. The fix would be to add the following to the model's
Cargo.toml
:The text was updated successfully, but these errors were encountered: