Skip to content

Commit

Permalink
Clarifying unix-like support
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Jonathan Woollett-Light authored and luminitavoicu committed Jun 13, 2022
1 parent a730d86 commit 863b037
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 4 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
fn main() {
#[cfg(not(target_family = "unix"))]
std::compile_error!("This crate only supports Unix-like targets");
}

0 comments on commit 863b037

Please sign in to comment.