Ferrite: A Judgmental Embedding of Session Types in Rust

Ruofei Chen, Stephanie Balzer, Bernardo Toninho
9/28/2020
19 citations
cs.PL

Official code: ferrite-rs/ferrite (110 stars, Rust, Apache-2.0, Rust, last commit 2022-06-29).

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

ferrite-rs/ferriteOfficial100%
RustApache-2.0

Session Type EDSL for Rust

11011Rust, NixMay 30, 20204 years agoApache-2.0

Similar Papers

Cite this paper

@article{chen2020ferrite,
  title  = {Ferrite: A Judgmental Embedding of Session Types in Rust},
  author = {Ruofei Chen and Stephanie Balzer and Bernardo Toninho},
  year   = {2020},
  eprint = {2009.13619},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2009.13619}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2009.13619.svg)](https://codeofpaper.com/paper/2009.13619)

Discussion