#libc #winapi

c-types

Re-exports of cross-platform types, gathered from libc and winapi

11 releases (6 stable)

Uses old Rust 2015

2.0.2 Apr 7, 2018
2.0.0 Jan 4, 2018
1.2.0 Aug 14, 2017
1.1.1 Feb 3, 2017
0.1.2 Nov 21, 2015

#1080 in Rust patterns

Download history 407/week @ 2022-08-15 599/week @ 2022-08-22 459/week @ 2022-08-29 341/week @ 2022-09-05 391/week @ 2022-09-12 436/week @ 2022-09-19 536/week @ 2022-09-26 621/week @ 2022-10-03 634/week @ 2022-10-10 663/week @ 2022-10-17 467/week @ 2022-10-24 504/week @ 2022-10-31 518/week @ 2022-11-07 287/week @ 2022-11-14 406/week @ 2022-11-21 472/week @ 2022-11-28

1,698 downloads per month
Used in 14 crates (3 directly)

MIT license

5KB

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;

Build Status Build status crates.io

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

~61KB