diff --git a/README.md b/README.md index 06af400..310efd6 100644 --- a/README.md +++ b/README.md @@ -23,35 +23,12 @@ console.log(await response.text()); See `client/demo.js` for more examples. ## Using the server -``` -$ cargo r -r --bin epoxy-server -- --help -Implementation of the Wisp protocol in Rust, made for epoxy. - -Usage: epoxy-server [OPTIONS] - -Options: - --prefix [default: ] - -p, --port [default: 4000] - -b, --host [default: 0.0.0.0] - -u, --unix-socket - -h, --help Print help - -V, --version Print version -``` - -You can listen on a unix socket by passing the `--unix-socket` flag and the unix socket path in the `--host` flag. Example: -``` -cargo r -r -- -u -b "/home/user/epoxy-socket" -``` +See the [server readme](server/README.md). ## Building -> [!IMPORTANT] -> Rust nightly is required. ### Server -``` -cargo b -r --bin epoxy-server -``` -The executable will be placed at `target/release/epoxy-server`. +See the [server readme](server/README.md). ### Client > [!IMPORTANT] diff --git a/server/README.md b/server/README.md index 28d2f78..dbcedfd 100644 --- a/server/README.md +++ b/server/README.md @@ -3,6 +3,16 @@ Performant server implementation of the Wisp protocol in Rust, made for epoxy. You can view a recent flamegraph of the server under load [here](flamegraph.svg?raw=true). +## Building +> [!IMPORTANT] +> Rust nightly is required. + +``` +cargo b -r +``` +The executable will be placed at `target/release/epoxy-server`. +You can optionally add the environment variable `RUSTFLAGS="-C target-cpu=native"` to optimize for the current CPU. + ## Configuration `epoxy-server` is configured through a configuration file in either TOML, JSON, or YAML. Pass the configuration file's path as an argument to `epoxy-server`.