14 releases (9 stable)

Uses old Rust 2015

4.0.0 Aug 2, 2024
3.0.2 Aug 2, 2024
3.0.1 Dec 1, 2023
3.0.0 Oct 21, 2023
0.1.2 Nov 21, 2015

#501 in Rust patterns

Download history 813/week @ 2024-05-16 751/week @ 2024-05-23 700/week @ 2024-05-30 775/week @ 2024-06-06 832/week @ 2024-06-13 842/week @ 2024-06-20 600/week @ 2024-06-27 709/week @ 2024-07-04 615/week @ 2024-07-11 879/week @ 2024-07-18 981/week @ 2024-07-25 1322/week @ 2024-08-01 903/week @ 2024-08-08 1273/week @ 2024-08-15 922/week @ 2024-08-22 737/week @ 2024-08-29

4,064 downloads per month
Used in 13 crates (3 directly)

MIT license

6KB

rust-c-types

Re-exports types defined in both libc and winapi, to reduce the amount of conditional compilation required in your code. Stop having to write code like this:

#[cfg(unix)]
use libc::some_type;

#[cfg(windows)]
use winapi::some_type;

Instead, write code like this:

use c_types::some_type;

Crates.io Build Status

Documentation

API documentation is here.

Contributing

This crate is non-exhaustive - I add types to it as and when I need them for my own projects.

If there's a type that could be included but isn't, there should be no problem adding it. Please open an issue or, even better, send a pull request.

Dependencies

~0–8.5MB
~63K SLoC