| Crates.io | c-types |
| lib.rs | c-types |
| version | 6.0.0 |
| created_at | 2015-11-21 13:17:16.561363+00 |
| updated_at | 2025-09-06 15:28:07.274301+00 |
| description | Re-exports of cross-platform types, gathered from libc and winapi |
| homepage | |
| repository | https://github.com/dimbleby/rust-c-types |
| max_upload_size | |
| id | 3467 |
| size | 9,909 |
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;
API documentation is here.
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.