Skip to content

Latest commit

 

History

History
39 lines (32 loc) · 1.64 KB

DEVELOPMENT.md

File metadata and controls

39 lines (32 loc) · 1.64 KB

Development

The following information is intended for contributers.

Getting Started

Go through the README.md and install Service Fabric Runtime on either Windows, Ubuntu, or Ubuntu on WSL.

Rust Build

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

Other Targets

  • 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
  • Build tcp echo stateful service fabric single partition application (part of default build).
    • cmake --build build --target build_rust_sample_echomain_stateful

Rust Code Generation

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

Notes

  1. GCC ld linker has problems with SF .so file so we use lld from LLVM/Clang which is configured in .cargo/config.toml
  2. fabric_pal.so is needed to be able to provide Windows C functions needed by windows-rs. Code is checked-in in /bintemp folder.