TL;DR
Ferrite is a Rust library that embeds session types, supporting linear and shared types, enabling safe communication by encoding typing derivations as Rust functions with practical evaluation on Servo.
Contribution
Ferrite introduces a novel shallow embedding of session types in Rust that supports shared session types and encodes typing derivations as Rust functions.
Findings
Supports linear and shared session types in Rust
Successfully applied to safe communication in Servo
Demonstrates practical feasibility of session types in Rust
Abstract
This paper introduces Ferrite, a shallow embedding of session types in Rust. In contrast to existing session type libraries and embeddings for mainstream languages, Ferrite not only supports linear session types but also shared session types. Shared session types allow sharing (aliasing) of channels while preserving session fidelity (preservation) using type modalities for acquiring and releasing sessions. Ferrite adopts a propositions as types approach and encodes typing derivations as Rust functions, with the proof of successful type-checking manifesting as a Rust program. We provide an evaluation of Ferrite using Servo as a practical example, and demonstrate how safe communication can be achieved in the canvas component using Ferrite.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
