Start here
Rust SDK quickstart
Build a private approval tally that opens only an aggregate yes-vote count, then maps it into a normal Rust launch decision.
Build a private matchmaking service
Compute matches from private feature and preference vectors without exposing raw vectors, scores, rankings, or rejection paths. This is the best next step if you want to see the full Rust service boundary around a Stoffel computation.
Deepen the mental model
Private lottery
Reveal the winner without exposing eligibility bits, ticket values, losing order, or comparison trace.
N-party Battleship
Update hidden state while revealing only the shot result each recipient is allowed to see.
Privacy boundary
Decide what is private, public, opened, routed, or never revealed before adapting the tutorial pattern.
Run the source
The runnable projects live in the Stoffel tutorials repository. From the repository root:cargo run, stoffel check, stoffel build, and stoffel run commands.
What to copy into your app
Copy the boundary pattern, not the sample domain:- Keep public product data in ordinary application code.
- Give each logical client an explicit client slot and private payload type.
- Put only the private computation boundary in StoffelLang.
- Attach client inputs with one
with_client_input(slot, values)call per logical client slot. - Validate the client input shape before running local MPC.
- Open only the authorized output your product needs.
- Map the opened result back into a typed Rust domain object.