From 863b0370ba7e57f7df5b908ada9e5b44809ccae9 Mon Sep 17 00:00:00 2001 From: Jonathan Woollett-Light Date: Thu, 9 Jun 2022 14:49:04 +0100 Subject: [PATCH] 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 --- README.md | 4 +++- build.rs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 build.rs diff --git a/README.md b/README.md index 7163a4c..68dccd6 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,14 @@ # micro-http -This is a minimal implementation of the +This is a minimal implementation of the [HTTP/1.0](https://tools.ietf.org/html/rfc1945) and [HTTP/1.1](https://www.ietf.org/rfc/rfc2616.txt) protocols. This HTTP implementation is stateless thus it does not support chunking or compression. 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 To contribute to micro-http, checkout the diff --git a/build.rs b/build.rs new file mode 100644 index 0000000..302808e --- /dev/null +++ b/build.rs @@ -0,0 +1,4 @@ +fn main() { + #[cfg(not(target_family = "unix"))] + std::compile_error!("This crate only supports Unix-like targets"); +}