scala-native/scala-native

Provide bindings for libc

Open

#104 opened on May 18, 2016

View on GitHub
 (24 comments) (0 reactions) (0 assignees)Scala (4,654 stars) (386 forks)batch import
component:nativelibfeaturegood first issueinterop

Description

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:

  • assert.h (not useable without C-style macros.)
  • complex.h
  • ctype.h
  • errno.h
  • fenv.h
  • float.h
  • inttypes.h
  • iso646.h
  • limits.h
  • locale.h
  • math.h
  • setjmp.h
  • signal.h
  • stdalign.h
  • stdarg.h
  • stdatomic.h
  • stdbool.h
  • stddef.h
  • stdint.h
  • stdio.h
  • stdlib.h
  • stdnoreturn.h
  • string.h
  • 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.

Contributor guide