Name Date Size #Lines LOC

..--

.cargo/H--22

.vscode/H--2423

core_io/H--154,744141,142

include/H--1,4911,112

openlibm/H--49,92028,777

posix-regex/H--1,3871,213

pthreads-emb/H--50,94525,835

ralloc/H--5,0702,845

src/H--39,76930,452

tests/H--8,4696,920

.editorconfigH A D07-Aug-202091 86

.gitignoreH A D02-Aug-202379 109

.gitlab-ci.ymlH A D01-Mar-20231,016 5748

.gitmodulesH A D05-Aug-2023786 2019

CONTRIBUTING.mdH A D22-Feb-20194.8 KiB12489

Cargo.tomlH A D24-Oct-20231.4 KiB6148

LICENSEH A D08-Mar-20181 KiB2217

MakefileH A D13-May-20237.6 KiB239174

README.mdH A D01-Apr-20231.6 KiB4533

Xargo.tomlH A D28-May-202021 21

bindgen_transform.shH A D09-Mar-2018186 54

build.rsH A D17-Apr-20232.5 KiB8065

ci.shH A D18-Feb-2020115 129

fmt.shH A D27-Aug-201868 41

init_dragonos_toolchain.shH A D11-May-20231.8 KiB6859

redoxer.shH A D01-Mar-2023272 1913

renamesyms.shH A D19-Aug-2022748 2819

rust-toolchain.tomlH A D11-Feb-202369 43

rustfmt.tomlH A D28-Jul-2019574 2524

README.md

1# relibc ![build](https://travis-ci.org/redox-os/relibc.svg?branch=master)
2relibc is a portable POSIX C standard library written in Rust. It is under heavy development, and currently supports Redox, Linux and DragonOS.
3
4The motivation for this project is twofold: Reduce issues the redox crew was having with newlib, and create a safer alternative to a C standard library written in C. It is mainly designed to be used under redox, as an alternative to newlib, but it also supports linux syscalls via the [sc](https://crates.io/crates/sc) crate.
5
6## Building
7Just run `make all`.
8
9### Build for DragonOS
10
11You can follow the instructions to build relibc for DragonOS:
12
13```bash
14mkdir -p sysroot/usr
15make -j $(nproc) && DESTDIR=sysroot/usr make install -j $(nproc)
16```
17
18### Issues
19#### I'm building for my own platform which I run, and am getting `x86_64-linux-gnu-ar: command not found` (or similar)
20The Makefile expects the gnu compiler tools prefixed with the platform specifier, as would be present when you'd install a cross compiler. Since you are building for your own platform, some distros (like Manjaro) don't install/symlink the prefixed executables.
21An easy fix would be to replace the corresponding lines in the Makefile, e.g.
22```diff
23 ifeq ($(TARGET),x86_64-unknown-linux-gnu)
24        export CC=x86_64-linux-gnu-gcc
25-       export LD=x86_64-linux-gnu-ld
26-       export AR=x86_64-linux-gnu-ar
27+       export LD=ld
28+       export AR=ar
29        export OBJCOPY=x86_64-linux-gnu-objcopy
30 endif
31```
32
33### [Contributing](CONTRIBUTING.md)
34
35## Supported OSes
36
37 - Redox OS
38 - Linux
39 - DragonOS
40
41## Supported architectures
42
43 - x86\_64
44 - Aarch64
45