repr_c 0.0.0

#[repr(C)] equivalents of stdlib pervasive types for easier FFI
Documentation
  • Coverage
  • 0%
    0 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 24.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 957 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • danielhenrymantilla

::repr_c

A crate to expose #[repr(C)] (and thus FFI-compatible) types equivalent to the standard library's, such as:

  • RefSlice<'lt, T>, a &'lt [T] whose layout in C is guaranteed to be struct { T const * ptr; size_t len; } (but with ptr != NULL: wrap it in an Option if you want to support the NULL case).

  • MutSlice<'lt, T>, a &'lt mut [T] whose layout in C is guaranteed to be struct { T * ptr; size_t len; } (but with ptr != NULL: wrap it in an Option if you want to support the NULL case).

  • BoxedSlice<T>, a Box<[T]> whose layout in C is guaranteed to be struct { T * ptr; size_t len; } (but with ptr != NULL: wrap it in an Option if you want to support the NULL case).

⚠️ WIP ⚠️

This is currently still being developed and in an experimental stage, hence its not being published to crates.io yet.