Skip to content

cookf2/partial-runtime-rust-borrow-checker-implementation-in-cpp

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cpp
 
 
 
 
 
 

A Partial Runtime Implementation of The "Rust Borrow Checker" in C++ - Fred Cook (8463955)

This repository contains all code associated with my dissertation project. This includes:

  • my partial borrow checker implementation in C++
  • A series of tests, demonstrating standard C++ and my implementation's change on "equivalent" program behaviour
  • A series of Rust tests which demonstrate some rules set out by the Borrow Checker

Instructions for running (on linux)

C++

Requirements

  • Clang
  • Cmake
  • Google test (Gtest) library

Steps

  • cd ./cpp
  • mkdir build
  • cd build
  • cmake ..
  • make
  • ./internal_tests && ./tests

Notes

  • The C++ files follow the Microsoft style guides

Rust

Requirements

Steps

  • cd ./rust/borrow_checker
  • cargo t or cargo test (these two are equivalent)
  • Cargo will then pull all dependencies, handle the compilation process and run the test(s) located in ./rust/borrow_checker/src/lib.rs

Notes

  • Rust files format the standard Rust guidelines defined by rustfmt

Steps to make use of the C++ implementation in your own project

  • Simply #include it to your own project
  • e.g. #include "../lib/borrow_checker.hpp"
  • then compile as normal

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published