#kernel #libos #syscalls

no-std safa-api

A high-level API over SafaOS's syscalls

14 releases

new 0.2.8 Apr 21, 2025
0.2.7 Apr 20, 2025
0.1.7 Mar 25, 2025

#94 in Operating systems

Download history 359/week @ 2025-03-19 133/week @ 2025-03-26 766/week @ 2025-04-02 143/week @ 2025-04-09 328/week @ 2025-04-16

1,416 downloads per month

MIT license

56KB
1.5K SLoC

A high-level API over SafaOS's syscalls

for example self::alloc is a high-level userspace allocator which internally uses the self::syscalls::syssbrk syscall

This crate also exposes raw SafaOS syscalls (see self::syscalls) and raw SafaOS abi structures (see self::raw)


safa-api

An API that exposes SafaOS's syscalls, and provides a higher-level interface over some syscalls.

crates.io docs.rs

Usage

Using in your rust project

simply run

cargo add safa-api

if you have std then you can also add the feature std

cargo add safa-api --features std

if you want to use it in any other project which is written in a language that has a C FFi (such as C, C++, etc.) proceed to the next section

Compiling to static library

there is a script build.sh which builds the library and the crt0 object to ./out directory.

run

./build.sh

and then link it to your project

Dependencies

~17–265KB