Welcome to CRTL! This project attempts to provide a basic and portable implementation of an ANSI C runtime library. It is not the intention of this project to provide 100% of the ANSCI C RTL. The primary support will be the most commonly used C library functions. For example, C locale support is not planned at this time.
The CRTL project development and testing is mainly done on Windows and Mac OSX. Linux support is an additional goal. The primary architectures supported are x86, x64, and ARM64.
This project has a small set of defined goals. These are:
- Provide implementations of the most common ANSI C runtime functions
- Prioritize correctness and portability
- Pursue performance where practical
- Support Windows, MacOS and Linux
There are also some explicit non-goals for the project. These are:
- Implement every single function
- Guarantee optimal performance
- Support every OS / hardware configuration
There are several known/open issues at this time. Not all open issues are listed here, these are just some key examples.
- varargs and therefore syscall() on OSX x64 are not yet working
- Not all syscall() functions implemented
- File IO is not yet implemented
- printf() does not yet support float (%f) and a few other formats
A very simple test harness and a range of unit tests are included with the library. This enables quick validation of implementation across various platforms. Unit test coverage is growing but not yet complete.
This is primarily an educational exercise. I find that you really come to understand the C programming language and its library functions in a deep and meaningful way when you've actually done the work to implement a core library of functions.
At some point I also hope to be able to use this library with tiny C compilers that I write for microcontrollers that I use.
Contributions are welcome, particularly bug fixes and enhancements! Refer to our Contribution Guidelines for details.
Please note that Project owners reserve the right to accept or reject any PR for any reason.
Before contributing or participating to this community please be sure to familiarize yourself with our project CODE OF CONDUCT. These guidelines are intended to govern interactions with and within the community.
You may use this library with the understanding that doing so is AT YOUR OWN RISK. No warranty, express or implied, is made with regards to the fitness or safety of this code for any purpose.