Rust: Difference between revisions

685 bytes added ,  28 days ago
m
Reverted edits by Melina148 (talk) to last revision by Adavis07
[unchecked revision][unchecked revision]
No edit summary
m (Reverted edits by Melina148 (talk) to last revision by Adavis07)
 
(12 intermediate revisions by 12 users not shown)
Line 7:
== Operating System Development ==
 
Rust has a comparable amount of runtime to C and C++, and has set up its standard library to be amenable towards OS development. Specifically, the standard library is(std) splitconsists intoof two smaller parts: core and stdalloc. Core isconsists of the lowestprimitive, platform-levelindependent aspectscomponents only,of andthe standard library. It doesn't include things like allocation, threading, and other higher-level features. Alloc is used for managing heap allocations, smart pointers, and simple data collections. Std builds on top of core and alloc to add themother OS dependent features, such as files and processes. Using only core and alloc instead of std is as easy as adding anthe '''no_std''' annotation into your main source file.
 
Every Rust compiler is a cross-compiler, which makes setup easier.
 
There are still some rough edges when doing OSDev, and they require using nightly-only features. These are currently being worked on.
 
== Active Projects ==
 
* [https://github.com/Andy-Python-Programmer/aero A mature POSIX OS]
* [https://os.phil-opp.com/ "Writing an OS in Rust"]
* [https://osblog.stephenmarz.com/ Tutorial: RISC-V OS using Rust]
* [https://github.com/thepowersgang/rust-barebones-kernel Meaty Bare-Bones]
* [https://github.com/skyzh/core-os-riscv core-os-riscv]
Line 30:
* [http://intermezzos.github.io/ intermezzOS]
** Small kernel + book, specifically for learning OSDev through Rust
** on hiatus indefinitely
* [https://github.com/ryanra/RustOS Ryanra's RustOS]
** Uses libcore/collections/alloc
Line 40 ⟶ 41:
* [https://github.com/theseus-os/Theseus Theseus]
** An experimental OS written in Rust
* [https://github.com/vinc/moros MOROS]
** A simple hobby OS with a text-based user interface
 
== Past Projects ==
 
Rust went through a long and public development process, and used to have a significantly larger runtime. There were lots of experiments pre-1.0, and sothus these projects are of historical interest, but mayaren't guaranteed to run or noteven build.
 
* [https://github.com/charliesome/rustboot RustBoot]
Line 58 ⟶ 61:
 
* [https://github.com/gz/rust-x86 libx86]: Library to program x86 hardware.
* [https://github.com/rust-osdev/x86_64 x86_64]: Library to program x86_64 hardware.
* [https://github.com/rust-osdev/bootloader bootloader]: A rust bootloader.
* <strike>[https://github.com/Tobba/libcpu libcpu]: Library to program CPUs.</strike> Now absorbed into libx86.
* [https://github.com/gz/rust-slabmalloc slabmalloc]: Low-level memory allocator for liballoc.
Line 73 ⟶ 78:
* [http://os.phil-opp.com/ Blog Series: Writing an OS in Rust]
* [http://www.randomhacks.net/2015/11/11/bare-metal-rust-custom-target-kernel-space/ Retarget your compiler so interrupts are not evil]
* [[BOOTBOOT]] loader has an example 64 bit higher half kernel in Rust
* [https://github.com/rust-osdev rust-osdev on GitHub]
 
[[Category:Languages]]
Anonymous user