Skip to content

Commit

Permalink
Add feature for building with std support
Browse files Browse the repository at this point in the history
  • Loading branch information
CliffHan committed Nov 2, 2023
1 parent 1dd88a3 commit 82b28d6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,4 @@ jobs:
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
RUSTFLAGS: "${{ matrix.rustflags }}"
run: cargo clippy --target ${{ matrix.target }} --all-features -- -D clippy::all
run: cargo clippy --target ${{ matrix.target }} --no-default-features --features "no_std" -- -D clippy::all
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ debug = true
opt-level = "z"

[features]
default = ["std"]
no_std = ["esp-idf-hal/critical-section"]
std = ["esp-idf-svc/std", "esp-idf-hal/std", "critical-section/std"]

[dependencies]
log = { version = "0.4", default-features = false }
esp-idf-sys = { version = "0.33", default-features = false }
esp-idf-hal = { version = "0.42", default-features = false, features = ["critical-section", "embassy-sync"] }
esp-idf-hal = { version = "0.42", default-features = false, features = ["embassy-sync"] }
esp-idf-svc = { version = "0.47", default-features = false, features = ["alloc"] }
embedded-svc = { version = "0.26", default-features = false }

Expand Down

0 comments on commit 82b28d6

Please sign in to comment.