* Fix the tests to run on 1.48.
This puts the benchmarks behind a `criterion` cfg, so add
`--cfg=criterion` to RUSTFLAGS when running cargo bench.
An MSRV of 1.48 enables us to support users such as async-io, which also
has an MSRV of 1.48.
* Add a rust-version field.
This prints a warning under Rust 1.48, but only when rustix is the
top-level build; when rustix is a dependency, it doesn't warn, so this
seems ok.
Add a tier-3 CI check for x86_64-unknown-dragonfly, and fix the
compilation errors needed to compile with --features=all-apis.
This builds on top of #409!
* Introduce API features.
* Don't use doc_cfg on internal modules.
* Don't compile the net code when the "net" feature is not present.
* Don't compile the runtime code when the "runtime" feature is not present.
* Don't compile the thread code when the "thread" feature is not present.
* Don't compile the time code when the "time" feature is not present.
* Don't compile the fs code when the "fs" feature is not present.
* Don't compile the rand code when the "rand" feature is not present.
* Split an "mm" feature out of the "io" module.
* Make some parts of "process"' implementation conditional.
* "Inline" the use declarations in src/imp/linux_raw/fs/mod.rs.
* Export `Timespec` and `ClockId` in `crate::thread`.
* io_uring depends on types from fs and net.
* Re-export Timespec etc. in crate::fs and crate::thread.
This makes it easier to disable crate::time when the time module is not
enabled.
* Ensure that tests and examples compile when features are disabled.
* Fix compilation.
In the linux_raw backend, split out the time, process, io, thread, and
rand syscalls from the large central syscalls.rs, into separate files.
The libc backend already had most of these these split out into separate
files, so in the libc backend this just splits out the rand syscalls,
so that the two backends have the same structure.
This also tidyies up `use` statements across all the syscalls.rs files.
Make `Pid` a non-zero type and use `Option<Pid>` in places where a pid
value can be zero. This lets `fork`'s API use an `Option` instead of a
sentry value, which is cleaner.
Inspired by [nix's similar feature], this extends the idea of hiding
plain integer values when they represent mostly meaningless identifiers.
[nix's similar feature]: https://docs.rs/nix/0.22.1/nix/unistd/struct.Pid.html