Expand description
Core Rumpsteak library for session-typed communication.
This crate provides session types (Send, Receive, Select, Branch, End) and channel abstractions for safe multiparty communication.
§Modules
types- Core session type definitions (GlobalType, LocalTypeR, Label)channel- Channel abstractions for communication
§Feature Flags
§Core Features
| Feature | Description |
|---|---|
serialize | Enable serialization support for session types |
test-utils | Testing utilities (random generation, etc.) |
wasm | WebAssembly support |
§Theory Features
| Feature | Description |
|---|---|
theory | Session type algorithms (projection, merge, duality, etc.) |
theory-async-subtyping | POPL 2021 asynchronous subtyping algorithm |
theory-bounded | Bounded recursion strategies |
§Meta Features
| Feature | Description |
|---|---|
full | Enable all optional features |
Re-exports§
pub use rumpsteak_types as types;
Modules§
- channel
- Channel abstractions for asynchronous communication.
- prelude
- Prelude module for convenient imports.
Structs§
- Branch
- A protocol state where this role receives one of several branch choices.
- End
- This structure represents a terminated protocol.
- Label
- A message label with its payload sort.
- Receive
- This structure represents a protocol which next action is to receive .
- Select
- A protocol state where this role selects one of several branches.
- Send
- This structure represents a protocol which next action is to send.
- State
- This structure is mainly a placeholder for a
Roleand for types. Typically, each each state (in the sense of automata state) of the protocol, e.g. aSend, aReceive, etc, contains aState, as well as some type bounds. When an action is taken (e.g. whensendis called on aSend), theSendwill take it state and convert it into the continuation.
Enums§
- Global
Type - Global types describe protocols from the bird’s-eye view.
- Local
TypeR - Core local type matching Lean’s
LocalTypeR. - Payload
Sort - Payload sort types for message payloads.
- Receive
Error - Error that can occur during a session receive operation.
- Session
Error - Error that can occur during a session send operation.
Traits§
- Choice
- Maps a choice label to its continuation session type.
- Choices
- Trait for an enum of possible branch choices.
- From
State - Trait for session types that can be constructed from a state.
- Into
Session - Trait for types that can be converted into a session.
- Message
- This trait represents a message to be exchanged between two participants. The generic type L is the type of the label (i.e. the content of the message).
- Role
- A participant in a session-typed protocol.
- Route
- Provides a route to another role for communication.
- Sealable
- Trait for types that can be sealed to prevent further use
- Session
- Marker trait for session types in a protocol.
Functions§
- session
- Run a session-typed protocol that cannot fail.
- try_
session - Runs a session that may fail, returning a result.
Type Aliases§
- Send
Error - Error type for send operations, specialized to the channel’s error type.
Attribute Macros§
- session
- Attribute macro for session type definitions.