From da4e618e122bae3d3ce33e8ca6b76ba2aee1ff7a Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 31 Mar 2020 18:24:59 -0700 Subject: [PATCH 1/2] Remove dist folder causing issues --- homepage/dist | 1 - 1 file changed, 1 deletion(-) delete mode 160000 homepage/dist diff --git a/homepage/dist b/homepage/dist deleted file mode 160000 index 9a8c9b8..0000000 --- a/homepage/dist +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9a8c9b82f90d74d97b41fd855a6fc615786d7107 From de71edeb0f77c8e0fe632868fc723dff361ce47f Mon Sep 17 00:00:00 2001 From: Irakli Gozalishvili Date: Tue, 31 Mar 2020 18:35:58 -0700 Subject: [PATCH 2/2] Update crate / repo names --- docs/README_CN.md | 6 +++--- homepage/public/readme.html | 2 +- homepage/public/readme.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/README_CN.md b/docs/README_CN.md index ab77441..d26c809 100644 --- a/docs/README_CN.md +++ b/docs/README_CN.md @@ -45,8 +45,8 @@ ##### 从`Github`下载 ```toml -[dependencies.commander_rust] -git = "https://github.com/MSDimos/commander_rust" +[dependencies.commander-rust] +git = "https://github.com/MSDimos/commander-rust" branch = "master" ``` @@ -54,7 +54,7 @@ branch = "master" ```toml [dependencies] -commander_rust = "1.1.3" # 指定其他任意你需要的版本 +commander-rust = "1.1.3" # 指定其他任意你需要的版本 ``` #### 使用它 diff --git a/homepage/public/readme.html b/homepage/public/readme.html index f2fd190..f1bc553 100644 --- a/homepage/public/readme.html +++ b/homepage/public/readme.html @@ -303,7 +303,7 @@

other languages

中文文档

why this ?

For a long time, developing cli in Rust is difficult. The community offers a wide range of solutions. Yes, they're excellent, but they're not very simple.

Inspired by commander.js & rocket.rs, the crate was born.

features

  • API friendly
  • easy to use
  • support for approximate dynamic language
  • low performance loss
  • automatically support for --version & --help
  • automatically run corresponding commands

limit

If you want to use this crate, please guarantee that you have follow rules below:

  • using Rust 2018 (full proc macro support is required, including [proc_macro] & [proc_macro_attribute])
  • using cargo (cargo will produce some environment variable according to Cargo.toml, we need that)
  • be familiar with Rust (because it's developed for Rust )

As a reference, my versions are:

  • cargo: cargo 1.35.0-nightly (95b45eca1 2019-03-06)
  • rustc: rustc 1.35.0-nightly (e68bf8ae1 2019-03-11)
  • Linux kernal: 4.15.0-47-generic
  • Ubuntu: 16.04

usage

install commander-rust

Two ways supported: from Github or crates.io. -The difference between them is that Github is latest but unstable and crates.io is stable but might not be latest.

install from Github

install from crates.io

using it

We offer a simple but complete example, you can learn all through it. +The difference between them is that Github is latest but unstable and crates.io is stable but might not be latest.

install from Github

install from crates.io

using it

We offer a simple but complete example, you can learn all through it. Yes, That's all. Very easy!

try it

try to input [pkg-name] --help.

version & description & cli-name?

version, description, cli-name of application are from Cargo.toml.

For instance:

direct

If you don't want to define a sub-command, you can use #[direct]. What's direct? In some situations, for instance, if you want to develop a CLI which could be called like rm ./* -rf. diff --git a/homepage/public/readme.md b/homepage/public/readme.md index 7a8432c..e1d2c36 100644 --- a/homepage/public/readme.md +++ b/homepage/public/readme.md @@ -41,8 +41,8 @@ The difference between them is that `Github` is latest but unstable and `crates. ##### install from `Github` ```toml -[dependencies.commander_rust] -git = "https://github.com/MSDimos/commander_rust" +[dependencies.commander-rust] +git = "https://github.com/MSDimos/commander-rust" branch = "master" ``` @@ -50,7 +50,7 @@ branch = "master" ```toml [dependencies] -commander_rust = "1.1.3" # or other version you want to install +commander-rust = "1.1.3" # or other version you want to install ``` #### using it