Rust target is in alpha meaning that not everything is supported and breaking changes can happen.
Rust
Create a
Cargo.tomlfile with the following content:[package] name = "fable-rust-sample" version = "0.1.0" edition = "2021" [[bin]] name = "program" path = "Program.fs.rs" [dependencies] fable_library_rust = { path = "./fable_modules/fable-library-rust" }Change
Program.fsto the following:[<EntryPoint>] let main args = printfn "Hello from F#" 0Compile your code using Fable and run it using Rust.
dotnet fable --lang rust cargo runYou should see
Hello from F#in your terminal.