Service Fabric Rust Community SDK.
Build Service Fabric Reliable Services in Rust.
Service Fabric is open sourced on github: https://github.com/microsoft/service-fabric
.
The latest open sourced version of SF is 6.4
.
This SDK only provides 6.4
functionalities. New functionalities in newer versions is are not accessible in this SDK.
The Fabric runtime and client are accessible from the dlls installed from service fabric runtime. The c headers are generated from open sourced idls in repo service-fabric
This lib is developed for educational purposes, and not ready for production. Linux is not supported.
- Install service fabric runtime. See get-started
- rust compiler
- Visual Studio msvc tool chain.
lld
from llvm
- service-fabric-cpp (fetched automatically by cmake) and its dependencies
Build all rust lib and examples.
cmake . -B build
cmake --build build
- For linux, vscode devcontainer is maintained for development.
- cmake configure
cmake . -B build
- This downloads idl files. (TODO: optimize this.)
- cmake build
cmake --build build
- Generates fabric import libs for fabric dlls from fabric dlls installed with fabric runtime.
- Build all rust examples.
You can use cargo to do rust only targets.
- Compile or run rust example
- compile rust sdk
cargo build
- run sample client executable
cargo run -p samples_client
. source code is incrates\samples\client\src\main.rs
- compile rust sdk
- 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
If you are a user of this lib you can ignore this section. 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 runcargo run -p tools_api
MIT license
Auto generated code from service fabric idl files have Microsoft MIT license.