redox-os / relibc
Mirror of https://gitlab.redox-os.org/redox-os/relibc
AI Architecture Analysis
This repository is indexed by RepoMind. By analyzing redox-os/relibc in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler viewRedox C Library (relibc) relibc is a portable C standard library written in Rust and is under heavy development, this library contain the following items: • C, Linux, BSD functions and extensions • POSIX compatibility layer • Interfaces for system components The motivation for this project is twofold: Reduce issues that the Redox developers were having with newlib, and create a more stable and safe alternative to C standard libraries written in C. It is mainly designed to be used under Redox, as an alternative to newlib, but it also supports Linux via the sc crate. Currently Redox and Linux are supported. is a runtime library that provides much of the code that enables POSIX on Redox, like , , signal handling, etc. Relibc uses it as backend in , and it's intended to eventually be usable independently, without relibc. Repository Layout • - Header files (mostly macros and variadic functions can't generate) • - Source files • - C code • - Runtime code • - Runtime code • - Runtime code • - Header files implementation • - Each folder has a file, it generates a C-to-Rust interface and header files • - Dynamic loader code • - Platform-specific and common code • - Redox-specific code • - Linux-specific code • - pthread implementation • - Synchronization primitives • - C tests (each MR needs to give success in all of them) Download the sources To download the relibc sources run the following command: Build Instructions To build relibc out of the Redox build system, do the following steps: Dependencies • Install Install the tool • Debian, Ubuntu and PopOS: • Fedora: • Arch Linux: Build Relibc To build the relibc library objects, run the following command: • Clean old library objects and tests Build relibc inside the Redox build system Inside of your Redox build system, run: If you need to rebuild for testing a Cookbook recipe, run: Touching (changing the "last modified time" of) the folder is needed to trigger recompilation for . Replace with your desired recipe name. Note: Do not edit inside folder! Do your work on folder directly inside your Redox build system instead. Tests Relibc has a test suite that also runs every time a new commit get pushed. You can see to see how it's being executed. That being said, is the recommended way to run tests. Here's few examples: • - Run build, without running the test • - Run all tests in x86_64 Redox using Redoxer • - Run all tests in host (Linux) • - Run all tests in specified arch • Arch can be , , , or • - Run a single test • Can be combined with or • Will run statically linked test in Linux, dynamically linked in Redox Couple of notes: • Relibc and its tests will rebuild if files changed, however switching between arch or host requires you to run • Redoxer is needed to run tests for Redox. You can install it using • Tests can hangs, the test runner can anticipate this, assuming the kernel doesn't hang too. Issues I'm building for my own platform which I run, and am getting (or similar) The Makefile expects GNU compiler tools prefixed with the platform specifier, as would be present when you installed a cross compiler. Since you are building for your own platform, some Linux distributions (like Manjaro) don't install/symlink the prefixed executables. An easy fix would be to replace the corresponding lines in , e.g. Contributing Before starting to contribute, read this document. Supported OSes • Redox OS • Linux Supported architectures • i586 (Intel/AMD) • x86_64 (Intel/AMD) • aarch64 (ARM64) • riscv64gc (RISC-V) Funding - _Unix-style Signals and Process Management_ This project is funded through NGI Zero Core, a fund established by NLnet with financial support from the European Commission's Next Generation Internet program. Learn more at the NLnet project page.