-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rust: run sample .fsx via cargo-script (?) #3472
Comments
@jkone27 Unfortunately comments are not available in the Fable AST. We could add a Perhaps using a //! ```cargo
//! [dependencies]
//! fable_library_rust = { path = "./fable_modules/fable-library-rust" }
//! ```
#![allow(unused_imports)]
#{prelude}
extern crate fable_library_rust;
#{script} (although I wasn't able to make templates work, but perhaps I'm not doing something right). Anyway, it's all about the dependency on Personally I don't see much difference between using |
cannot find that lib on crates.io, is it still there?
|
was trying to follow the sample here, but then had to modify toml to include a different bin,
and eventually ended up with this build error ..
|
is it related to this one? rust-num/num-bigint#218. |
@jkone27 Could be, not sure. I haven't encountered it cause I usually run
I just tried |
i will update my rustc, i have : rustc 1.69.0 (84c898d65 2023-04-16) |
same error with latest stable from rustup (1.70)...
ok sorry it worked after cargo clean and cargo run, but not when using fable clean and fable run commands... i get error only when running via (error above with this script sequence) as in the fable rust test project
this gives that error, but if i simply compile with fable to rust, and run instead
then it works fine! |
@jkone27 Yes, I'm glad it works, feel free to close this, or rename to a more specific issue if you have one. |
Description
trying to run a sample .fsx and have it executed by cargo script but i get some errors,
maybe we should have a way to keep/compile also comments, so that
cargo script
can still read comments in the output?i have checked this: https://github.com/alfonsogarciacaro/fable-rust-sample/blob/main/Cargo.toml, not clear though how to do it with cargo script if possible..
Repro code
Expected and actual results
we are able to execute some F# code as Rust code
Related information
dotnet fable --version
: 4.1.4The text was updated successfully, but these errors were encountered: