Skip to content

Commit

Permalink
display transport feature in help
Browse files Browse the repository at this point in the history
  • Loading branch information
zephyrchien committed Apr 17, 2022
1 parent fc03263 commit 50c7682
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "realm"
version = "2.0.0"
version = "2.0.1"
authors = ["zhboner <[email protected]>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Or have a look at [Cross](https://github.com/cross-rs/cross), it makes things ea
## Usage

```shell
Realm 2.0.0 [udp][zero-copy][trust-dns][proxy-protocol][multi-thread]
Realm 2.x [udp][zero-copy][trust-dns][proxy-protocol][transport][multi-thread]
A high efficiency relay tool

USAGE:
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ pub mod conf;
pub mod utils;
pub mod relay;

pub const VERSION: &str = "2.0.0";
pub const VERSION: &str = "2.0.1";
pub const ENV_CONFIG: &str = "REALM_CONF";
4 changes: 4 additions & 0 deletions src/utils/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def_feat!(FEATURE_PROXY_PROTOCOL, "proxy-protocol");
def_feat!(FEATURE_MIMALLOC, "mi-malloc");
def_feat!(FEATURE_JEMALLOC, "jemalloc");
def_feat!(FEATURE_MULTI_THREAD, "multi-thread");
def_feat!(FEATURE_TRANSPORT, "transport");

pub struct Features {
pub udp: bool,
Expand All @@ -52,6 +53,7 @@ pub struct Features {
pub jemalloc: bool,
pub multi_thread: bool,
pub proxy_protocol: bool,
pub transport: bool,
}

pub const FEATURES: Features = Features {
Expand All @@ -63,6 +65,7 @@ pub const FEATURES: Features = Features {
jemalloc: FEATURE_JEMALLOC,
multi_thread: FEATURE_MULTI_THREAD,
proxy_protocol: FEATURE_PROXY_PROTOCOL,
transport: FEATURE_TRANSPORT,
};

impl Display for Features {
Expand All @@ -79,6 +82,7 @@ impl Display for Features {
disp_feat!(zero_copy, "zero-copy");
disp_feat!(trust_dns, "trust-dns");
disp_feat!(proxy_protocol, "proxy-protocol");
disp_feat!(transport, "transport");
disp_feat!(multi_thread, "multi-thread");
disp_feat!(mimalloc, "mimalloc");
disp_feat!(jemalloc, "jemalloc");
Expand Down

0 comments on commit 50c7682

Please sign in to comment.