1b8a62b91Sopenharmony_ci# Contributing to rustix
2b8a62b91Sopenharmony_ci
3b8a62b91Sopenharmony_ciRustix is a [Bytecode Alliance] project. It follows the Bytecode Alliance's
4b8a62b91Sopenharmony_ci[Code of Conduct] and [Organizational Code of Conduct].
5b8a62b91Sopenharmony_ci
6b8a62b91Sopenharmony_ci## Testing
7b8a62b91Sopenharmony_ci
8b8a62b91Sopenharmony_ciTo keep compile times low, most features in rustix's API are behind cargo
9b8a62b91Sopenharmony_cifeatures. A special feature, `all-apis` enables all APIs, which is useful
10b8a62b91Sopenharmony_cifor testing.
11b8a62b91Sopenharmony_ci
12b8a62b91Sopenharmony_ci```
13b8a62b91Sopenharmony_cicargo test --features=all-apis
14b8a62b91Sopenharmony_ci```
15b8a62b91Sopenharmony_ci
16b8a62b91Sopenharmony_ciAnd, rustix has two backends, linux_raw and libc, and only one is used in
17b8a62b91Sopenharmony_ciany given build. To test with the libc backend explicitly, additionally
18b8a62b91Sopenharmony_cienable the `use-libc` feature:
19b8a62b91Sopenharmony_ci
20b8a62b91Sopenharmony_ci```
21b8a62b91Sopenharmony_cicargo test --features=all-apis,use-libc
22b8a62b91Sopenharmony_ci```
23b8a62b91Sopenharmony_ci
24b8a62b91Sopenharmony_ciBeyond that, rustix's CI tests many targets and configurations. Asking for
25b8a62b91Sopenharmony_cihelp is always welcome, and it's especially encouraged when the issue is
26b8a62b91Sopenharmony_cigetting all the `cfg`s lined up to get everything compiling on all the
27b8a62b91Sopenharmony_ciconfigurations on CI.
28