scala-native
scala-native copied to clipboard
Provide bindings for libc
For sake of having nice interop with C we need to have access to all the same base libraries. The full list of header files is given below:
- [x] assert.h (not useable without C-style macros.)
- [x] complex.h
- [x] ctype.h
- [x] errno.h
- [x] fenv.h
- [x] float.h
- [x] inttypes.h
- [ ] iso646.h
- [ ] limits.h
- [x] locale.h
- [x] math.h
- [ ] setjmp.h
- [x] signal.h
- [ ] stdalign.h
- [ ] stdarg.h
- [x] stdatomic.h
- [ ] stdbool.h
- [ ] stddef.h
- [ ] stdint.h
- [x] stdio.h
- [x] stdlib.h
- [ ] stdnoreturn.h
- [x] string.h
- [x] tgmath.h
- [ ] threads.h
- [ ] time.h
- [ ] uchar.h
- [ ] wchar.h
- [ ] wctype.h
Each header would map to a single extern object in scala.scalanative.libc
package. Some of the headers might not map directly or need some additional compiler magic, we need to discover those cases sooner rather than later.