• Stars
    star
    122
  • Rank 284,300 (Top 6 %)
  • Language
    OCaml
  • License
    GNU General Publi...
  • Created almost 7 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The essence of Rust.

Oxide

An implementation of Oxide as described in Oxide: The Essence of Rust.

Background

To get a sense of the terminology and why the semantics is structured how it is (i.e. into levels), I highly recommend reading Niko's post about observational equivalence in Rust. This should at least be sufficient to understand why we're talking about levels of Rust, but it may well provide other useful insights as well. Niko's recent work on non-lexical lifetimes features some key similarities to our approach, and may aid in its understanding.

Terminology

  • Safe Rust — the core of Rust, without any unsafe code.
  • Language level — a combination of safe Rust and a set of unsafe abstractions that increase the overall expressivity of the language, e.g. Rust1 is safe Rust + Vec<T>.
  • Unsafe abstraction — an abstraction that cannot be implemented in safe Rust (absolute) or the current language level (relative) without the use of Rust's unsafe block.
  • Lifetime — the span of time from when a value is allocated to when it is deallocated.
  • Region — the space on the stack where a value is allocated for its lifetime (see also: why-regions.md).

Navigating this repository

This repository is split into six parts:

  1. history/ — largely-iterative prior attempts at building & designing Oxide
    • ownershipv1 and ownershipv2 both have some notes included that might be insightful to some degree. Evidently, I got lazy afterward and stopped writing actual prose in the models. Afterward, I switched to LaTeX.
  2. history/notes/ — an assorted selection of my old notes
  3. history/examples/ — a collection of old examples (and counter-examples) at each level
    • Each example is in "proper" Rust syntax for that level and its corresponding oxide form at the time.
  4. oxide/ — an implementation of Oxide in OCaml
    • Currently, it's just the type checker, but we will eventually have an interpreter too.
    • We require OCaml 4.08 for user-defined binding form support.
  5. reducer/ — a desugarer (simple compiler) from (a subset of) Rust to Oxide
    • Run reducer with RUSTFLAGS='--cfg procmacro2_semver_exempt' for source filename tracking.
  6. runner/ — a test harness for driving the reducer/typechecker.
    • This requires the following opam packages: opam install opam shexp stdio yojson utop ppx_deriving

Related Works

More Repositories

1

irc

the irc crate – usable, async IRC for Rust
Rust
517
star
2

Orpheus

Open Source MapleStory Server Emulator (v83)
Java
97
star
3

markov

A generic markov chain implementation in Rust.
Rust
85
star
4

alectro

A terminal IRC client in Rust.
Rust
68
star
5

OpenMaple

A fast MapleStory emulator aiming to bring openness back to the private server community.
Java
21
star
6

pkgnx

Blazing fast binary data format for video games – PKG4 for Java
Java
12
star
7

spilo

A minimalistic IRC bouncer in Rust.
Rust
10
star
8

diet-coke

A small functional language with effect inference based on Koka.
Scala
9
star
9

cube.idr

An implementation of the Lambda Cube in Idris.
Idris
7
star
10

meep

A simple pasting service with syntax highlighting support.
Rust
6
star
11

Ultimate-Ascent

FIRST Team 1923's official repository for the 2013 game, Ultimate Ascent.
Java
5
star
12

awebot

An IRC bot in Rust.
Rust
5
star
13

tokio-mockstream

A fake stream for testing network applications backed by buffers.
Rust
5
star
14

Team-1923-Rebound-Rumble

Team 1923's software for the FIRST Robotics Competition for 2012.
Java
4
star
15

life-sim

An artificial life simulator in Rust.
Rust
4
star
16

tomato

Java MapleStory Server Emulator - v111
Java
4
star
17

amomentoflove.org

Share your appreciation with someone you love.
HTML
3
star
18

irc-services

A unified IRC services bot in Rust, used long ago by PdgnCo but replaced with anope.
Rust
3
star
19

dotfiles

My configuration files and whatnot.
Emacs Lisp
3
star
20

dnd

An IRC bot in Rust for playing Dungeons and Dragons.
Rust
3
star
21

sanguinello

🍊
Rust
2
star
22

libjinx2

A Java library for the NX file format.
Java
2
star
23

rip

Rest in peace.
Rust
2
star
24

Tupelo

A (work-in-progress) IRC client for the 21st Century.
JavaScript
2
star
25

weiss.city

The latest in a long line of personal websites.
CSS
2
star
26

reasoning-with-types

Corresponding example code from my blog post "Reasoning with Types in Rust"
Rust
2
star
27

awebot-plugins

A collection of plugins for awebot.
Rust
1
star
28

critters

A modern, extensible Creatures clone.
C++
1
star
29

hamelin.rs

An implementation of Hamelin in Rust.
Rust
1
star
30

chipster

A fast CHIP-8 emulator with indie cred.
C
1
star
31

minuet

A simple, lightweight utility library for C.
1
star
32

srcerror

An exercise in data modelling and frustration.
Java
1
star
33

pixalia

The worst, best MMO client ever.
Java
1
star
34

vr.pyv

A specification of Viewstamped Replication in mypvy.
1
star
35

theraphosa

Snakes on the web? I think they're getting eaten.
JavaScript
1
star
36

pixalia-server

The worst, best MMO server ever.
Java
1
star
37

hacl-rs

Rusty bindings for HACL*, a formally verified cryptographic library written in F*.
Rust
1
star
38

heuler

Project Euler problems in (poor) Haskell.
Haskell
1
star