From c152ced34ca8910fc844e9026362ae4f2e33d6bc Mon Sep 17 00:00:00 2001 From: Saber Haj Rabiee Date: Tue, 30 Aug 2022 12:31:43 -0700 Subject: [PATCH] feat: explicitly define toolchain by adding `rust-toolchain.toml` --- readme.md | 30 ++++++++++++++++++++++-------- rust-toolchain.toml | 2 ++ 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/readme.md b/readme.md index d34dfe0..39e4052 100644 --- a/readme.md +++ b/readme.md @@ -29,14 +29,34 @@ A simple, high performance relay server written in rust. Realm can be run in a container with OCI (like Docker, Podman, Kubernetes, etc), see guides [here](readme.container.md). -## Build Guides +## Install Guides -Install **nightly** rust-toolchain with [rustup](https://rustup.rs/): +Install rust toolchain with [rustup](https://rustup.rs/): ```shell curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` +Install Realm: + +```shell +# Make sure you are using the latest release tag +cargo install --git=https://github.com/zhboner/realm --tag=v2.4.2 +``` + +You can also pass `target_cpu=native` to allow more possible optimizations: + +```shell +# Make sure you are using the latest release tag +RUSTFLAGS='-C target_cpu=native' cargo install --git=https://github.com/zhboner/realm --tag=v2.4.2 +``` + +Or try to build by cloning this repository: + +```shell +git clone https://github.com/zhboner/realm +``` + Clone this repository: ```shell @@ -49,12 +69,6 @@ Enter the directory and build: cd realm && cargo build --release ``` -Pass `target_cpu=native` to allow more possible optimizations: - -```shell -RUSTFLAGS='-C target_cpu=native' cargo build --release -``` - ### Build Options - ~~udp: enable udp relay~~ builtin. diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..5d56faf --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "nightly"