diff --git a/cargo/Cargo.toml b/cargo/Cargo.toml index b939f2b..301fb33 100644 --- a/cargo/Cargo.toml +++ b/cargo/Cargo.toml @@ -18,22 +18,13 @@ debug = true # Symbols are nice and they don't increase the size on Flash opt-level = "z" [features] -{%- if std %} -default = ["std", "embassy", "esp-idf-svc/native"] -{%- else %} -default = ["alloc", "embassy", "esp-idf-svc/native", "esp-idf-svc/panic_handler", "esp-idf-svc/alloc_handler", "esp-idf-svc/libstart"] -{%- endif %} +default = [] -pio = ["esp-idf-svc/pio"] -std = ["alloc", "esp-idf-svc/binstart", "esp-idf-svc/std"] -alloc = ["esp-idf-svc/alloc"] -nightly = ["esp-idf-svc/nightly"] experimental = ["esp-idf-svc/experimental"] -embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"] [dependencies] -log = { version = "0.4", default-features = false } -esp-idf-svc = { version = "0.49", default-features = false } +log = "0.4" +esp-idf-svc = { version = "0.49", features = ["critical-section", "embassy-time-driver", "embassy-sync"] } [build-dependencies] -embuild = "0.32.0" \ No newline at end of file +embuild = "0.32.0" diff --git a/cmake/cargo-generate.toml b/cmake/cargo-generate.toml index f579cc8..ec8351f 100644 --- a/cmake/cargo-generate.toml +++ b/cmake/cargo-generate.toml @@ -1,23 +1,8 @@ [template] cargo_generate_version = ">=0.17.4" -[placeholders.advanced] -type = "bool" -prompt = "Configure advanced template options?" -default = false - -[conditional.'advanced'.placeholders.toolchain] +[placeholders.toolchain] type = "string" prompt = "Rust toolchain (beware: nightly works only for riscv MCUs!)" choices = ["esp", "nightly"] default = "esp" - -[conditional.'advanced'.placeholders.hal] -type = "bool" -prompt = "Enable HAL support?" -default = true - -[conditional.'advanced'.placeholders.std] -type = "bool" -prompt = "Enable STD support?" -default = true diff --git a/cmake/components/rust-{{project-name}}/Cargo.toml b/cmake/components/rust-{{project-name}}/Cargo.toml index 8d93085..1516d5c 100644 --- a/cmake/components/rust-{{project-name}}/Cargo.toml +++ b/cmake/components/rust-{{project-name}}/Cargo.toml @@ -17,25 +17,13 @@ opt-level = "s" debug = true # Symbols are nice and they don't increase the size on Flash opt-level = "z" -{%- if hal %} [features] -{%- if std %} -default = ["std", "embassy", "esp-idf-svc/native"] -{%- else %} -default = ["alloc", "embassy", "esp-idf-svc/native", "esp-idf-svc/panic_handler", "esp-idf-svc/alloc_handler"] -{%- endif %} - -pio = ["esp-idf-svc/pio"] -std = ["alloc", "esp-idf-svc/std"] -alloc = ["esp-idf-svc/alloc"] -nightly = ["esp-idf-svc/nightly"] +default = [] experimental = ["esp-idf-svc/experimental"] -embassy = ["esp-idf-svc/embassy-sync", "esp-idf-svc/critical-section", "esp-idf-svc/embassy-time-driver"] [dependencies] -log = { version = "0.4", default-features = false } -esp-idf-svc = { version = "0.49", default-features = false } +log = "0.4" +esp-idf-svc = { version = "0.49", default-features = false, features = ["std", "critical-section", "embassy-time-driver", "embassy-sync"] } [build-dependencies] embuild = "0.32.0" -{%- endif %}