tinyrlibc
tinyrlibc copied to clipboard
Scope of future function implementations
Hi, I am working on binding against a C library compiled with Newlib headers. This requires implementations of some functions that:
- requires
extern crate alloc
such asmalloc
andfree
- are not part of libc, but part of the Newlib header such as
__errno()
,__assert_func()
- are just stubs for non-existent functions such as
fopen
,printf
- part of
math.h
(implementation of those are easy, just re-export the libm functions)
What is the scope of future function implementation in tinyrlibc?
It's not impossible, but you may find it easier to just link newlib.
Linking with Newlib does work, but offering a Rust version would significantly simplify the process for users. Currently, there's no official release of the GNU RISC-V toolchain, requiring users to either build the entire toolchain (which demands 8 GiB of disk space) or use various third-party prebuilt sources with different configurations. Following that, building Newlib from source with the compiler is necessary. Using Clang and tinyrlibc seems like a more straightforward option for crate user experience.
As long as it still does its original job (linking with the nrf9160 libraries) and it doesn't hit the new cargo feature limit, this seems fine to me.