From 68270e9b6141692b252e74bf486b09e7f6982524 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Sun, 4 Jul 2021 17:09:50 +0800 Subject: [PATCH] Revert no-std profile changes and fix README. --- Cargo.toml | 4 ++-- no_std/no_std_test/Cargo.toml | 12 +++++++++++- no_std/no_std_test/README.md | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e02cca73..834c4e29 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,11 @@ categories = ["no-std", "embedded", "wasm", "parser-implementations"] smallvec = { version = "1.6", default-features = false, features = ["union"] } ahash = { version = "0.7", default-features = false } num-traits = { version = "0.2", default-features = false } -smartstring = { version = "0.2.7", default-features = false } +smartstring = { version = "0.2.6", default-features = false } rhai_codegen = { version = ">=0.4.0", path = "codegen", default-features = false } [features] -default = ["ahash/std", "num-traits/std", "smartstring/std"] +default = ["smartstring/std", "ahash/std", "num-traits/std"] # remove 'smartstring/std' when smartstring is updated to support no-std unchecked = [] # unchecked arithmetic sync = [] # restrict to only types that implement Send + Sync no_position = [] # do not track position in the parser diff --git a/no_std/no_std_test/Cargo.toml b/no_std/no_std_test/Cargo.toml index 0aa875f2..6a85b79d 100644 --- a/no_std/no_std_test/Cargo.toml +++ b/no_std/no_std_test/Cargo.toml @@ -23,6 +23,16 @@ opt-level = "z" # optimize for size debug = false rpath = false debug-assertions = false -panic = "abort" codegen-units = 1 +panic = "abort" + +[profile.unix] +inherits = "release" lto = true + +[profile.windows] +inherits = "release" + +[profile.macos] +inherits = "release" +lto = "fat" diff --git a/no_std/no_std_test/README.md b/no_std/no_std_test/README.md index 5e33d4a5..1c89b11f 100644 --- a/no_std/no_std_test/README.md +++ b/no_std/no_std_test/README.md @@ -12,7 +12,7 @@ To Compile The nightly compiler is required: ```bash -cargo +nightly build --release +cargo +nightly build --profile unix -Z unstable-options ``` Available profiles are: `unix`, `windows` and `macos`.