The following information is intended for contributers.
Go through the README.md and install Service Fabric Runtime on either Windows, Ubuntu, or Ubuntu on WSL.
To compile and run Rust examples, run the following from repo root:
# Compile Rust SDK
cargo build
# Run sample client executable in crates\samples\client\src\main.rs
cargo run -p samples_client
- Build tcp echo service fabric singlton application (part of default build).
cmake --build build --target build_rust_sample_echomain
- Test the echoapp in local cluster (Windows)
- Add app to cluster
.\scripts\echomain_ctl.ps1 -Action Add
- Run echo powershell to talk to the app
.\scripts\echomain_ctl.ps1 -Action Echo
- Remove app from cluster
.\scripts\echomain_ctl.ps1 -Action Remove
- Add app to cluster
- Build tcp echo stateful service fabric single partition application (part of default build).
cmake --build build --target build_rust_sample_echomain_stateful
Rust wrapper is generated by windows bindgen from winmd file, which is provided here ServiceFabric.winmd
- Generate Service Fabric Rust SDK code only (will build generate_winmd first)
cmake --build build --target generate_rust
# or run
cargo run -p tools_api
- GCC ld linker has problems with SF .so file so we use lld from LLVM/Clang which is configured in
.cargo/config.toml
fabric_pal.so
is needed to be able to provide Windows C functions needed by windows-rs. Code is checked-in in/bintemp
folder.