Clarifying unix-like support

Added `build.rs` to  produce a compile error when attempting to build on a
non-Unix-like system, and clarified support in `readme.md`.

Signed-off-by: Jonathan Woollett-Light <jcawl@amazon.co.uk>
This commit is contained in:
Jonathan Woollett-Light
2022-06-09 14:49:04 +01:00
committed by Luminita Voicu
parent a730d86940
commit 863b0370ba
2 changed files with 7 additions and 1 deletions

View File

@@ -7,6 +7,8 @@ implementation is stateless thus it does not support chunking or compression.
The micro-http implementation is used in production by Firecracker. The micro-http implementation is used in production by Firecracker.
As micro-http uses [`std::os::unix`](https://doc.rust-lang.org/std/os/unix/index.html) this crates only supports Unix-like targets.
## Contributing ## Contributing
To contribute to micro-http, checkout the To contribute to micro-http, checkout the

4
build.rs Normal file
View File

@@ -0,0 +1,4 @@
fn main() {
#[cfg(not(target_family = "unix"))]
std::compile_error!("This crate only supports Unix-like targets");
}