No description
Find a file
2025-08-24 17:32:29 +02:00
.cargo Remove redudant abort config 2025-08-24 17:32:29 +02:00
libc Make sure VaList is exported as va_list 2025-08-24 06:45:01 +02:00
linker Add linker crate 2025-08-24 17:22:48 +02:00
startup Add envp parsing and more sanity checks 2025-08-24 00:55:34 +02:00
.gitignore Ignore temporary folders 2025-07-16 14:07:24 +02:00
Cargo.lock Add linker crate 2025-08-24 17:22:48 +02:00
Cargo.toml Add linker crate 2025-08-24 17:22:48 +02:00
cbindgen.toml Add cbindgen config 2025-07-14 22:45:05 +02:00
LICENSE Add license file 2025-07-15 18:25:13 +02:00
README.md Add a simple readme 2025-07-15 18:33:30 +02:00
rust-toolchain.toml Update toolchain 2025-08-20 20:58:44 +02:00

🍁 Maple

An experimental Linux environment in Rust

What is this?

Maple is a from-scratch reimplementation of a Linux environment with the goal of creating an OS-like targetable system. The goal is for this to not be a distro but something you can actually target directly, kinda like Android but smaller and more personal. The target in fact is x86_64-linux-maple.

The goal rn is to create a crt0, libc and dynamic linker. The project will also include its own bespoke RAM init. For obvious reasons everything is highly opinionated since it's meant to be a battery-included system; everything you need bundled together nicely.

One of the design goals is to provide interfaces for modern languages. Direct syscalls are forbidden for non-privileged programs, but libsystem provides interfaces that more closely resemble what a modern programming language expects. A libc implementation is also provided for other languages, although they are encouraged to use the libsystem since it's designed to be friendlier.

A basic allocator is currently in progress as well as a dynamic linker. While still being in a POC phase, everything is linked statically. Fully static executables will be completely forbidden in the future as everyone has to at the very least link to the crt0 and either libc or libsystem if they wanna interact with the system. The dynamic linker must be included in the interp section of the file.

I don't claim that all the goals have been achieved yet, but those are what they should be. Feel free to provide feedback; an architecture file will be provided soon-ish.

What's working so far

Libc currently implements:

  • Printf family functions (printf, fprintf, etc.)
  • Basic I/O operations
  • Standard streams (stdin, stdout, stderr)
  • Program startup (_start)

This is very basic but it's enough to write a full-standing C binary that will run on Linux without any additional tools required. The goal is to create our own target that will eventually support std to write programs.

Building

Building requires nightly Rust for various unstable features. You should use rustup to use the version pinned by the project - any other version is not supported and might cause issues.

cargo build --release

Building in debug mode should be avoided at least for the time being.

License

This project is licensed under the EUPL. For more information, please see the LICENSE file.