Hi Julia

There’s a couple different options depending on your use case.

If you just need basic non-OS libc functionality (memcpy, string operations 
etc) then newlibc [1] should work.
This can be quicker to setup as it is distributed with embedded toolchains. For 
example on ARM, the
aarch64-none-elf- toolchain contains libc pre-compiled [2] and just requires a 
couple functions to be provided
by the user, which can be left empty, see [3] for an example of that. I’m not 
sure to what extent newlibc provides
POSIX functionality.

For something closer to what you would see on something like Linux, musllibc is 
probably your best option
that is what we use with LionsOS right now. The main caveat is that to get that 
kind of functionality you need a
decent amount of OS services, which Microkit does not provide (hence why we 
only use musllibc within LionsOS).
In LionsOS we used libnfs to get a network file system (NFS) working, which 
required POSIX functionality.
To see what it looks like to get that working with musllibc and our OS 
services, have a look at [4].

Hope this helps.

Ivan

[1]: https://sourceware.org/newlib/
[2]: https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads
[3]: https://github.com/au-ts/sddf/blob/main/util/newlibc.c
[4]: https://github.com/au-ts/lionsos/blob/main/components/fs/nfs/posix.c

On 5 May 2025, at 22:12, Julia Royer via Devel <devel@sel4.systems> wrote:

Hello,

I'm currently developing a simple communication application to explore seL4 and 
Microkit, and I'd like to use a C standard library (libc) in my project.

I came across libsel4muslcsys and the seL4/musllibc repository.
Are there any other components I should be aware of?
Also, is there a specific way to integrate these into my project?

Thank you for your help.

Best regards,
Julia Royer
_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

_______________________________________________
Devel mailing list -- devel@sel4.systems
To unsubscribe send an email to devel-leave@sel4.systems

Reply via email to