@@ -17,8 +17,15 @@ We follow the conventions laid out in [Keep A CHANGELOG][kacl].
1717
1818## libc constants, functions and structs
1919
20- We do not define integer constants ourselves, but use or reexport them from the
21- [ libc crate] [ libc ] .
20+ We do not define ffi functions or their associated constants and types ourselves,
21+ but use or reexport them from the [ libc crate] [ libc ] , if your PR uses something
22+ that does not exist in the libc crate, you should add it to libc first. Once
23+ your libc PR gets merged, you can adjust our ` libc ` dependency to include that
24+ libc change. Use a git dependency if necessary.
25+
26+ ``` toml
27+ libc = { git = " https://github.com/rust-lang/libc" , rev = " the commit includes your libc PR" , ... }
28+ ```
2229
2330We use the functions exported from [ libc] [ libc ] instead of writing our own
2431` extern ` declarations.
@@ -40,7 +47,7 @@ When creating newtypes, we use Rust's `CamelCase` type naming convention.
4047## cfg gates
4148
4249When creating operating-system-specific functionality, we gate it by
43- ` #[cfg(target_os = ...)] ` . If more than one operating system is affected, we
50+ ` #[cfg(target_os = ...)] ` . If more than one operating system is affected, we
4451prefer to use the cfg aliases defined in build.rs, like ` #[cfg(bsd)] ` .
4552
4653## Bitflags
@@ -115,5 +122,5 @@ To deprecate an interface, put the following attribute on the top of it:
115122` <Version> ` is the version where this interface will be deprecated, in most
116123cases, it will be the version of the next release. And a user-friendly note
117124should be added. Normally, there should be a new interface that will replace
118- the old one, so a note should be something like: "<New Interface > should be
125+ the old one, so a note should be something like: "` <New Interface> ` should be
119126used instead".
0 commit comments