corrode icon indicating copy to clipboard operation
corrode copied to clipboard

Use the libc crate to provide external functions and c-like types

Open software-opal opened this issue 7 years ago • 0 comments

I'm using this project to port a large C project and it is amazing.

I am however running into a few issues:

  • The use of u8 causes lots of cross compilation problems.
  • I would like to avoid large extern blocks at the top of each ported file.

To avoid the former I'd like to switch to using libc::c_char.

For the latter it would be nice to (via a flag, maybe) convert calls to C standard library functions like malloc and free into calls to their libc:: equivalents.

software-opal avatar Jan 12 '18 22:01 software-opal