From be21772ee97d78bc654c6898a0fb7fa447db8a1f Mon Sep 17 00:00:00 2001 From: Tomas Tauber Date: Sat, 4 Mar 2023 13:59:44 +0800 Subject: [PATCH] doc: added a note regarding the no_std support ref: https://github.com/pest-parser/pest/issues/795#issuecomment-1454494160 --- README.md | 23 +++++++++++++++++++++++ debugger/Cargo.toml | 8 ++++---- derive/Cargo.toml | 6 +++--- generator/Cargo.toml | 6 +++--- grammars/Cargo.toml | 6 +++--- meta/Cargo.toml | 4 ++-- pest/Cargo.toml | 2 +- vm/Cargo.toml | 6 +++--- 8 files changed, 42 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index da30ab74..9d38afa4 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,29 @@ mod b { This library should always compile with default features on **Rust 1.56.1** or **Rust 1.61** with `const_prec_climber`. +## no_std support + +The `pest` and `pest_derive` crates can be built without the Rust standard +library and target embedded environments. To do so, you need to disable +their default features. In your `Cargo.toml`, you can specify it as follows: + +```toml +[dependencies] +# ... +pest = { version = "2", default-features = false } +pest_derive = { version = "2", default-features = false } +``` + +If you want to build these crates in the pest repository's workspace, you can +pass the `--no-default-features` flag to `cargo` and specify these crates using +the `--package` (`-p`) flag. For example: + +```bash +$ cargo build --target thumbv7em-none-eabihf --no-default-features -p pest +$ cargo bootstrap +$ cargo build --target thumbv7em-none-eabihf --no-default-features -p pest_derive +``` + ## Special thanks A special round of applause goes to prof. Marius Minea for his guidance and all diff --git a/debugger/Cargo.toml b/debugger/Cargo.toml index e8c931b7..921a7703 100644 --- a/debugger/Cargo.toml +++ b/debugger/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_debugger" description = "pest grammar debugger" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice ", "Tomas Tauber "] homepage = "https://pest.rs/" @@ -14,9 +14,9 @@ readme = "_README.md" rust-version = "1.56" [dependencies] -pest = { path = "../pest", version = "2.5.5" } -pest_meta = { path = "../meta", version = "2.5.5" } -pest_vm = { path = "../vm", version = "2.5.5" } +pest = { path = "../pest", version = "2.5.6" } +pest_meta = { path = "../meta", version = "2.5.6" } +pest_vm = { path = "../vm", version = "2.5.6" } reqwest = { version = "0.11", default-features = false, features = ["blocking", "json", "default-tls"] } rustyline = "10" serde_json = "1" diff --git a/derive/Cargo.toml b/derive/Cargo.toml index 3ea06f5d..9c4e6948 100644 --- a/derive/Cargo.toml +++ b/derive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_derive" description = "pest's derive macro" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" @@ -23,5 +23,5 @@ std = ["pest/std", "pest_generator/std"] [dependencies] # for tests, included transitively anyway -pest = { path = "../pest", version = "2.5.5", default-features = false } -pest_generator = { path = "../generator", version = "2.5.5", default-features = false } +pest = { path = "../pest", version = "2.5.6", default-features = false } +pest_generator = { path = "../generator", version = "2.5.6", default-features = false } diff --git a/generator/Cargo.toml b/generator/Cargo.toml index ab98cb2a..7b4757ca 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_generator" description = "pest code generator" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" @@ -18,8 +18,8 @@ default = ["std"] std = ["pest/std"] [dependencies] -pest = { path = "../pest", version = "2.5.5", default-features = false } -pest_meta = { path = "../meta", version = "2.5.5" } +pest = { path = "../pest", version = "2.5.6", default-features = false } +pest_meta = { path = "../meta", version = "2.5.6" } proc-macro2 = "1.0" quote = "1.0" syn = "1.0" diff --git a/grammars/Cargo.toml b/grammars/Cargo.toml index 11bcb155..ffaa8267 100644 --- a/grammars/Cargo.toml +++ b/grammars/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_grammars" description = "pest popular grammar implementations" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" @@ -14,8 +14,8 @@ readme = "_README.md" rust-version = "1.56" [dependencies] -pest = { path = "../pest", version = "2.5.5" } -pest_derive = { path = "../derive", version = "2.5.5" } +pest = { path = "../pest", version = "2.5.6" } +pest_derive = { path = "../derive", version = "2.5.6" } [dev-dependencies] criterion = "0.3" diff --git a/meta/Cargo.toml b/meta/Cargo.toml index accc3038..e5828b46 100644 --- a/meta/Cargo.toml +++ b/meta/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_meta" description = "pest meta language parser and validator" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" @@ -16,7 +16,7 @@ include = ["Cargo.toml", "src/**/*", "src/grammar.rs", "_README.md", "LICENSE-*" rust-version = "1.56" [dependencies] -pest = { path = "../pest", version = "2.5.5" } +pest = { path = "../pest", version = "2.5.6" } once_cell = "1.8.0" [build-dependencies] diff --git a/pest/Cargo.toml b/pest/Cargo.toml index a2683211..dc3080c2 100644 --- a/pest/Cargo.toml +++ b/pest/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest" description = "The Elegant Parser" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" diff --git a/vm/Cargo.toml b/vm/Cargo.toml index 0a75a94e..87d2d8b7 100644 --- a/vm/Cargo.toml +++ b/vm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pest_vm" description = "pest grammar virtual machine" -version = "2.5.5" +version = "2.5.6" edition = "2021" authors = ["Dragoș Tiselice "] homepage = "https://pest.rs/" @@ -14,5 +14,5 @@ readme = "_README.md" rust-version = "1.56" [dependencies] -pest = { path = "../pest", version = "2.5.5" } -pest_meta = { path = "../meta", version = "2.5.5" } +pest = { path = "../pest", version = "2.5.6" } +pest_meta = { path = "../meta", version = "2.5.6" }