An educational git clone written in Rust.

Overview

rat

rat is a simple version control system written in Rust designed primarily to be easy to understand and modify, with as few external dependencies as is practical. The final version implements a (very) minimal subset of git.

Git can often end up being a sort of magic box, even to many who use it on a daily basis. rat is intended to demystify its internals so you can develop a better mental model of git, and understand how elegant it really is.

Secondarily, it also demonstrates a fairly idiomatic Rust program, so you can improve your understanding of how large Rust programs can be structured one step at a time.

All the material here assumes a decent amount of familiarity with Rust, but only a surface-level one with git. If you want to learn Rust, the book is a great place to start, and the git tutorial has the basics you need for git.

You can use the crate documentation for any version to find what you're looking for, which is useful as the code gets larger.

cargo doc --open

Run rat with:

cargo run <COMMAND> <ARGUMENTS>

Questions

If you have any questions about the source code or the explanations surrounding it, feel free to ask them on the Discussions page.

Before you ask about the name, though, it's just "Rust + Git" = "rit", but then I thought of the absurd pun of calling the repo a "nest", so now it's called rat.

License

rat is intended to be a purely educational tool released freely into the public domain wherever possible. See the license for the full terms.

Credits

rat owes a profound debt of inspiration and guidance from many sources, but most especially Write Yourself a Git and The Git Parable.

Contributing

If you find a problem at any point, whether technical or educational, I'd appreciate if you opened an issue about it. Pull requests are also greatly appreciated, though make sure to explicitly specify that you agree to have your contribution released into the public domain.

By contributing, you agree to adhere to the Code of Conduct.

You might also like...
🍒 Small, simple, and fast kernel written in Rust. 🌸
🍒 Small, simple, and fast kernel written in Rust. 🌸

🍒 Small, simple, and fast kernel written in Rust. 🌸

Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure
Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure

Revons Os is a new OS written from scratch in Rust to experiment with novel OS structure, better state management, and how to leverage intralingual design principles to shift OS responsibilities like resource management into the compiler.

RevonsOs is a new OS written from scratch in Rust to experiment with novel OS structure, better state management
RevonsOs is a new OS written from scratch in Rust to experiment with novel OS structure, better state management

RevonsOs is a new OS written from scratch in Rust to experiment with novel OS structure, better state management, and how to leverage intralingual design principles to shift OS responsibilities like resource management into the compiler.

Xrs is a POSIX-subset operating system kernel written in Rust.

XRS-OS ( 🚧 WIP) Xrs is a POSIX-subset operating system kernel written in Rust. Current project team members 0x5459 core developer (he/him) 0x5457 cor

Linux kernel modules written in Rust

Linux kernel modules written in Rust A collection of in-progress experimental Linux kernel modules written for the Rust for Linux project To run the o

An attempt at an operating system written in Rust

Rust Operating System An attempt at a simple operating system in Rust and a semester project for the Operating Systems course at CS@UCU. Documentation

An UEFI application that unlocks a SED and starts an OS from it. Written in Rust

opal-uefi-greeter This is an UEFI application written in Rust that unlocks a SED and then launches another UEFI application from the unlocked drive -

Rux - An x86_64 toy operating system kernel written in Rust
Rux - An x86_64 toy operating system kernel written in Rust

Rux - An x86_64 toy operating system kernel written in Rust. Rux is a port of the Hux kernel, my x86 32-bit single-CPU toy kernel written in C, following the OSTEP book structure and terminology.

This project is based on code from freertos.rs and some additions to simplify the usage of FreeRTOS in embedded applications written in Rust

FreeRTOS-rust This project is based on code from freertos.rs and some additions to simplify the usage of FreeRTOS in embedded applications written in

A custom kernel for educational reasons

A custom kernel for educational reasons

TornaxO7 16 Dec 25, 2022
A lightweight microkernel/IPC based operating system built with Rust which is not a clone of any existing operating system

Noble Operating System Noble is a lightweight microkernel and IPC based operating system built with Rust which is not a clone of any existing operatin

Revolution Xenon 3 Jan 10, 2022
A comparison of operating systems written in Rust

Rust OS comparison A comparison of operating systems written in Rust. There are several open source operating systems written in Rust. Most of them ar

Markus Kohlhase 492 Jan 8, 2023
An OS kernel written in rust. Non POSIX

"Tifflin" Experimental Kernel (and eventually Operating System) This is an experiment in writing an OS Kernel in rust (http://rust-lang.org). Mostly t

John Hodge (Mutabah) 618 Jan 8, 2023
A tiny 32 bit kernel written in Rust

rustboot A tiny 32 bit kernel written in Rust. I was inspired to download Rust and try to do this after seeing zero.rs - a stub that lets Rust program

Charlie Somerville 1.5k Dec 30, 2022
Experimental kernel for embedded devices written in Rust

bkernel is an experimental kernel for embedded devices written in Rust. I'm mostly trying out Rust now to see how it applies to kernel development. Pr

Alexey Shmalko 84 Dec 13, 2022
A new operating system kernel with Linux binary compatibility written in Rust.

Kerla Kerla is a monolithic operating system kernel from scratch in Rust which aims to be compatible with the Linux ABI, that is, runs Linux binaries

Seiya Nuta 3.1k Jan 1, 2023
Minimal x86_64 OS kernel written in Rust

rkernel A minimal x86_64 Rust OS kernel. Multiboot2 VGA driver PIC PIT PS/2 Keyboard driver PS/2 Mouse driver TSC RTC Allocator ATA PIO (In progress..

Divy Srivastava 36 Apr 26, 2022
Operating system written in Rust for NumWorks calculator (model n0110)

RustWorks An OS (eventually) for the Numworks calculator (model n0110). Setup First install Rust by following these instuctions then: rustup target ad

null 30 Nov 10, 2022
SteinsOS is an operating system written in Rust

SteinsOS is an operating system featuring non-preemptive kernel targeting on single-core armv8 architecture.

Sheng 84 Dec 15, 2022