From 37581cfc9bc1a40fa9d14ad9ae9b1577a010ba04 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Thu, 7 Nov 2024 05:05:01 -0800 Subject: [PATCH] Version 0.1.0 (#41) * Use `stable` toolchain * Additional cargo metadata, update dependencies * Add `clippy` check to the CI workflow * Add `repository` key to cargo manifest * Add `include` key to cargo manifest to make publish dry-run pass * Update `README.md` --- .github/workflows/ci.yml | 20 ++++++++++- Cargo.lock | 71 ++++++++++++++++++++++------------------ Cargo.toml | 23 ++++++++++--- README.md | 2 +- build.rs | 2 +- rust-toolchain.toml | 2 ++ 6 files changed, 82 insertions(+), 38 deletions(-) create mode 100644 rust-toolchain.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d0876e2..af554f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: workflow_dispatch: inputs: all_combinations: - description: 'Checks all combinations of options' + description: "Checks all combinations of options" required: true type: boolean @@ -31,6 +31,9 @@ concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: + # -------------------------------------------------------------------------- + # Verify + verify: name: "Check ${{ matrix.chip }}" runs-on: ubuntu-latest @@ -68,6 +71,8 @@ jobs: if: github.event_name == 'schedule' || inputs.all_combinations run: cd xtask && cargo run -- check ${{ matrix.chip }} --all-combinations + # -------------------------------------------------------------------------- + # Test test: runs-on: ubuntu-latest @@ -78,3 +83,16 @@ jobs: - name: Run tests run: cargo test + + # -------------------------------------------------------------------------- + # Lint + + clippy: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + + - name: Run clippy + run: cargo clippy -- -D warnings diff --git a/Cargo.lock b/Cargo.lock index 10b84fe..0877cd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,6 +1,6 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 4 +version = 3 [[package]] name = "ahash" @@ -33,9 +33,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "anstream" -version = "0.6.15" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", @@ -48,43 +48,43 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.8" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" +checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" [[package]] name = "anstyle-parse" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" +checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" +checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.4" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] name = "anyhow" -version = "1.0.90" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37bf3594c4c988a53154954629820791dde498571819ae4ca50ca811e060cc95" +checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" [[package]] name = "autocfg" @@ -170,9 +170,9 @@ checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" [[package]] name = "colorchoice" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" +checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "compact_str" @@ -331,9 +331,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" +checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" dependencies = [ "allocator-api2", "equivalent", @@ -474,6 +474,9 @@ name = "once_cell" version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +dependencies = [ + "portable-atomic", +] [[package]] name = "parking_lot" @@ -504,11 +507,17 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "portable-atomic" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" + [[package]] name = "proc-macro2" -version = "1.0.88" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c3a7fc5db1e57d5a779a352c8cdb57b29aa4c40cc69c3a68a7fedc815fbf2f9" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -583,9 +592,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rhai" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61797318be89b1a268a018a92a7657096d83f3ecb31418b9e9c16dcbb043b702" +checksum = "8867cfc57aaf2320b60ec0f4d55603ac950ce852e6ab6b9109aa3d626a4dd7ea" dependencies = [ "ahash", "bitflags", @@ -611,9 +620,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "375116bee2be9ed569afe2154ea6a99dfdffd257f533f187498c2a8f5feaf4ee" dependencies = [ "bitflags", "errno", @@ -651,18 +660,18 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "serde" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ac55e59090389fb9f0dd9e0f3c09615afed1d19094284d0b200441f13550793" +checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.211" +version = "1.0.214" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54be4f245ce16bc58d57ef2716271d0d4519e0f6defa147f6e081005bcb278ff" +checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" dependencies = [ "proc-macro2", "quote", @@ -752,9 +761,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.82" +version = "2.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index d747fc3..a0f48c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,22 @@ [package] -name = "esp-generate" -version = "0.1.0" -edition = "2021" +name = "esp-generate" +version = "0.1.0" +edition = "2021" +rust-version = "1.74" +description = "Template generation tool to create no_std applications targeting Espressif's chips" +repository = "https://github.com/esp-rs/esp-generate" +license = "MIT OR Apache-2.0" +keywords = ["esp32", "template"] +categories = ["command-line-utilities", "template-engine"] + +include = [ + "Cargo.toml", + "LICENSE-APACHE", + "LICENSE-MIT", + "README.md", + "src", + "template", +] [dependencies] clap = { version = "4.5.20", features = ["derive"] } @@ -10,7 +25,7 @@ env_logger = "0.11.5" esp-metadata = { version = "0.4.0", features = ["clap"] } log = "0.4.22" ratatui = { version = "0.29.0", features = ["crossterm"] } -rhai = "1.19.0" +rhai = "1.20.0" [build-dependencies] quote = "1.0.37" diff --git a/README.md b/README.md index 57ae59d..746d069 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ To generate a proect using this template: 1. Install `esp-generate`: ``` -cargo install esp-generate --git https://github.com/esp-rs/esp-generate.git +cargo install esp-generate ``` 2. Generate a project. There are two options: diff --git a/build.rs b/build.rs index 2b9c6df..8f12e1d 100644 --- a/build.rs +++ b/build.rs @@ -49,5 +49,5 @@ fn main() { }; std::fs::write("src/template_files.rs", code.to_string().as_bytes()).unwrap(); - println!("cargo::rerun-if-changed=template"); + println!("cargo:rerun-if-changed=template"); } diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..292fe49 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,2 @@ +[toolchain] +channel = "stable"