Skip to content

SchrodingerZhu/rura

Repository files navigation

Rura

RUst way for Reuse Analysis.

Rura is a purely functional Rust dialect, optimized through reuse analysis and more.

Features

  1. Seamless interpolation with Rust via code generation, while reusing other useful constructs like the trait system
  2. Rust-native reference counting for memory management
  3. Frame-limited reuse analysis, eliminating many of the allocations and other slow paths
  4. Uniqueness types (new!) could boost the performance by getting rid of unnecessary refcount
  5. More scalar types are available without any boxing

Motivation

In Koka and Lean, reuse analysis is supported by a lightweight runtime with reference counting and type-erased objects. This project attempts to create a functional programming language that directly lowers into Rust. In this way, we can explore the possibility to embed reuse analysis into higher-level languages.

References

We implement the reuse analyzer based on:

  1. Perceus
  2. Frame-limited reuse
  3. Fully in-place Function Programming

Uniqueness type and its linearity checking from:

  1. Linear type can change the world

Additionally, the idea of reduce duplication and improve sharing has also been discussed in some other situations:

  1. HVM
  2. Optimal Sharing

Tours

  1. Surface Syntax Specification (TODO)
  2. Types
  3. Ownership Model
  4. Linearity/Exclusivity
  5. Closures
  6. Lowering

About

RUst way for Reuse Analysis

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages