Skip to content

Commit

Permalink
Merge branch 'main' into dev/fast-interp
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Oct 17, 2024
2 parents 52f5998 + c967655 commit 15b120f
Show file tree
Hide file tree
Showing 219 changed files with 3,530 additions and 1,760 deletions.
4 changes: 2 additions & 2 deletions .github/actions/ci-checks/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
- if: >-
${{ contains(fromJSON(inputs.checks), 'changelog')
|| contains(fromJSON(inputs.checks), 'sync') }}
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- if: inputs.use-cache == 'true'
Expand Down Expand Up @@ -69,7 +69,7 @@ runs:
run: ./scripts/ci-tests.sh 3 4
shell: bash
- if: ${{ contains(fromJSON(inputs.checks), 'hw-host') }}
run: ./scripts/hwci.sh host --no-default-features --features=unix
run: ./scripts/hwci.sh host
shell: bash
- if: ${{ contains(fromJSON(inputs.checks), 'book') }}
run: ./scripts/ci-book.sh
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Compute the checks for ${{ github.event_name }}
id: checks
run: |
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
runs-on: ubuntu-latest
needs: checks
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- if: github.event_name != 'schedule'
id: cache
name: Restore and save the cache
Expand All @@ -84,7 +84,7 @@ jobs:
check: ${{ fromJSON(needs.checks.outputs.checks) }}
name: ${{ matrix.check }}
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Run the ${{ matrix.check }} check
uses: ./.github/actions/ci-checks
with:
Expand All @@ -104,9 +104,9 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- run: ./scripts/artifacts.sh
- uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
- uses: actions/attest-build-provenance@1c608d11d69870c2092266b3f9a6f3abbf17002c # v1.4.3
id: attest
with:
subject-path: 'artifacts/*'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- run: sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
# Needed to publish results and get a badge (see publish_results below).
id-token: write
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
persist-credentials: false
- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
Expand All @@ -31,6 +31,6 @@ jobs:
name: SARIF file
path: results.sarif
retention-days: 5
- uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
- uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
with:
sarif_file: results.sarif
4 changes: 4 additions & 0 deletions crates/api-desc/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## 0.2.1-git

### Minor

- Remove `debug::exit()` and add `scheduling::exit()` instead

### Patch

- Update dependencies
Expand Down
10 changes: 0 additions & 10 deletions crates/api-desc/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,6 @@ pub(crate) fn new() -> Item {
ptr: *mut u8,
} -> ()
},
item! {
/// Exits the platform with an error code.
///
/// This is used by test applets to terminate the platform and propagate the test
/// result.
fn exit "de" {
/// 0 for success, 1 for failure.
code: usize,
} -> !
},
];
Item::Mod(Mod { docs, name, items })
}
4 changes: 4 additions & 0 deletions crates/api-desc/src/scheduling.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ pub(crate) fn new() -> Item {
/// Aborts the applet.
fn abort "sa" {} -> !
},
item! {
/// Exits the applet.
fn exit "se" {} -> !
},
];
Item::Mod(Mod { docs, name, items })
}
6 changes: 5 additions & 1 deletion crates/api-macro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## 0.6.2-git
## 0.7.0-git

### Major

- Update `wasefire-applet-api-desc` version

### Patch

Expand Down
2 changes: 1 addition & 1 deletion crates/api-macro/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/api-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasefire-applet-api-macro"
version = "0.6.2-git"
version = "0.7.0-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
Expand Down
9 changes: 7 additions & 2 deletions crates/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Changelog

## 0.6.2-git
## 0.7.0-git

### Major

- Update `wasefire-applet-api-macro` version

### Patch

- Make sure at compile-time that exactly one `host` or `wasm` feature is enabled
- Update dependencies

## 0.6.1
Expand Down Expand Up @@ -93,4 +98,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 1 -->
<!-- Increment to skip CHANGELOG.md test: 2 -->
11 changes: 8 additions & 3 deletions crates/api/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions crates/api/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasefire-applet-api"
version = "0.6.2-git"
version = "0.7.0-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
Expand All @@ -18,9 +18,10 @@ features = ["full-api", "wasm"]
[dependencies]
bytemuck = { version = "1.16.0", default-features = false, features = ["derive"] }
sealed = { version = "0.5.0", default-features = false, optional = true }
wasefire-applet-api-macro = { version = "0.6.2-git", path = "../api-macro" }
wasefire-applet-api-macro = { version = "0.7.0-git", path = "../api-macro" }
wasefire-error = { version = "0.1.2-git", path = "../error" }
wasefire-logger = { version = "0.1.5", path = "../logger", optional = true }
wasefire-logger = { version = "0.1.6-git", path = "../logger", optional = true }
wasefire-one-of = { version = "0.1.0-git", path = "../one-of" }

[features]
# Compiles for host or wasm (choose exactly one).
Expand Down
3 changes: 3 additions & 0 deletions crates/api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ extern crate alloc;
#[cfg(feature = "host")]
pub use host::*;
use wasefire_error as _;
use wasefire_one_of::exactly_one_of;

#[cfg(feature = "host")]
mod host;
#[cfg(feature = "wasm")]
pub(crate) mod wasm;

exactly_one_of!["host", "wasm"];

#[cfg(feature = "wasm")]
wasefire_applet_api_macro::wasm!();

Expand Down
8 changes: 7 additions & 1 deletion crates/board/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@

### Major

- Remove `platform::protocol::Api::disable()` in favor of locking
- Add `Api::Applet` as a required API for simple applet management
- Remove `debug::Api::exit()`
- Remove `api-platform{,-protocol,-update}` features making those APIs required
- (Only when `api-platform-protocol` is used) Change `platform::protocol::Api::{enable,disable}()`
to also control whether requests are accepted
- (Only when `api-storage` is used) The reexported `wasefire-store::Storage` now uses
`wasefire-error` for errors

### Minor

- Add `usb::serial::Serial::{read,write,flush,enable,disable}()` to bypass `HasSerial`
- Implement `defmt::Format` for `Event` when `defmt` is enabled

### Patch

- Fix documentation of `crypto::aead::Api`
- Use `derive-where` instead of `derivative`
- Update dependencies
- Remove workaround lint false positive
Expand Down Expand Up @@ -155,4 +161,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 0 -->
<!-- Increment to skip CHANGELOG.md test: 2 -->
11 changes: 8 additions & 3 deletions crates/board/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 2 additions & 9 deletions crates/board/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ typenum = { version = "1.17.0", default-features = false, optional = true }
usb-device = { version = "0.3.2", default-features = false, optional = true }
usbd-serial = { version = "0.2.2", default-features = false, optional = true }
wasefire-error = { version = "0.1.2-git", path = "../error" }
wasefire-logger = { version = "0.1.5", path = "../logger" }
wasefire-logger = { version = "0.1.6-git", path = "../logger" }
wasefire-store = { version = "0.3.0-git", path = "../store", optional = true }

[dependencies.wasefire-applet-api]
version = "0.6.2-git"
version = "0.7.0-git"
path = "../api"
features = ["host"]
optional = true
Expand All @@ -62,9 +62,6 @@ api-crypto-sha256 = ["internal-api-crypto-hash"]
api-crypto-sha384 = ["internal-api-crypto-hash"]
api-gpio = ["bytemuck/derive"]
api-led = []
api-platform = ["internal-api-platform"]
api-platform-protocol = ["internal-api-platform"]
api-platform-update = ["internal-api-platform"]
api-radio-ble = ["internal-api-radio", "wasefire-applet-api/api-radio-ble"]
api-rng = []
api-storage = ["dep:wasefire-store"]
Expand All @@ -84,9 +81,6 @@ full-api = [
"api-crypto-sha384",
"api-gpio",
"api-led",
"api-platform",
"api-platform-protocol",
"api-platform-update",
"api-radio-ble",
"api-rng",
"api-storage",
Expand Down Expand Up @@ -132,7 +126,6 @@ internal-api-crypto-aead = ["dep:crypto-common", "dep:typenum", "internal-api-cr
internal-api-crypto-ecc = ["dep:crypto-common", "dep:typenum", "internal-api-crypto"]
internal-api-crypto-hash = ["dep:crypto-common", "dep:digest", "dep:typenum", "internal-api-crypto"]
internal-api-crypto-hmac = ["dep:crypto-common", "dep:typenum", "digest/mac", "internal-api-crypto"]
internal-api-platform = []
internal-api-radio = []
internal-api-usb = []
internal-software-crypto = [
Expand Down
Loading

0 comments on commit 15b120f

Please sign in to comment.