Skip to content

Commit

Permalink
Merge branch 'main' into dev/wasm-threads
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 committed Oct 25, 2024
2 parents 3fcf5f5 + 4cf9d5a commit 57e49c8
Show file tree
Hide file tree
Showing 350 changed files with 11,128 additions and 3,820 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
[alias]
update-api = "run --manifest-path ./crates/api-desc/crates/update/Cargo.toml"
wasefire = "run --manifest-path ./crates/cli/Cargo.toml --features=_dev --"
xtask = "run --manifest-path ./crates/xtask/Cargo.toml --"

[build]
Expand Down
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
*.bin -textreview
*.pdf -textreview
*.png -textreview
*.wasm -textreview
# Submodules are not reviewed in printed form.
/third_party/** -textreview
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
* @ia0
/crates/runner-host/crates/web-client/ @chris-dietz @ia0 @ia0-review
/.github/CODEOWNERS @ia0
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
run: ./scripts/hwci.sh host
shell: bash
- if: ${{ contains(fromJSON(inputs.checks), 'book') }}
run: ./scripts/ci-book.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/ci-footprint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
- run: mv footprint.toml footprint-${{ github.event_name }}.toml
shell: bash
- if: github.event_name == 'push' && inputs.upload == 'true'
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: footprint
path: footprint-push.toml
Expand Down
5 changes: 5 additions & 0 deletions .github/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
annotations:
- checks:
- sast
reasons:
- reason: not-supported # we use cargo clippy
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@897ed5eab6ed058a474202017ada7f40bfa52940 # v1.0.0
- 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
8 changes: 4 additions & 4 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ 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@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
- uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
- uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # v3.25.13
- uses: github/codeql-action/upload-sarif@e2b3eafc8d227b0241d48be5f425d47c2d750a13 # v3.26.10
with:
sarif_file: results.sarif
27 changes: 11 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,17 @@ Guidelines](https://opensource.google/conduct/).

## Contribution process

If you don't have a specific contribution in mind, feel free to browse the list of existing issues
to find something you would be interested to help with. All issues are open for contribution. If you
are new to the project or would prefer something reasonably ambitious, you can filter to only show
the [good first
issues](https://github.com/google/wasefire/issues?q=is:issue+is:open+label:"good+first+issue"). Then
simply reply to the issue mentioning your interest and how much mentoring you would like. You may as
well directly open a pull request for that issue if you don't need any mentoring or clarifications.

If you have a specific change ready, feel free to send the pull request for review. If the pull
request is not fixing an existing issue or a typo, describing the motivation for the change would
accelerate the review. And if the pull request is complex to understand, a high-level design in the
description would also help the review.

In all other cases, feel free to open a new issue for discussion. Depending on the type of issue,
the initial comment would describe a specific problem you encountered, the motivation for a change
or feature request you would like, possible design or implementation ideas you have, etc.
**If you don't have a specific contribution in mind**, feel free to browse the list of [good first
issues](https://github.com/google/wasefire/contribute) to find something you like. Then simply reply
on the issue mentioning your interest, or open a pull request directly.

**If you have a specific change ready**, feel free to send the pull request for review. Make sure
you follow the steps for [creating a pull request](docs/contributing/pull-request.md) in this
repository.

**In all other cases**, feel free to open a new issue for discussion. Depending on the type of
issue, the initial comment would describe a specific problem you encountered, the motivation for a
change or feature request you would like, possible design or implementation ideas you have, etc.

You can find more information on how to [open an
issue](https://help.github.com/articles/about-issues) or [create a pull
Expand Down
12 changes: 11 additions & 1 deletion crates/api-desc/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.2.1-git

### Minor

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

### Patch

- Update dependencies

## 0.2.0

### Major
Expand Down Expand Up @@ -69,7 +79,7 @@
### Minor

- Add `scheduling::abort()`
- Require the `U32` type to implement `bytemuck::Pod`.
- Require the `U32` type to implement `bytemuck::Pod`
- Add `debug::time()`, `debug::perf()`, and `debug::Perf` for simple performance
measurement

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

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

8 changes: 4 additions & 4 deletions crates/api-desc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "wasefire-applet-api-desc"
version = "0.2.0"
version = "0.2.1-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
Expand All @@ -14,9 +14,9 @@ categories = ["embedded", "no-std", "wasm"]
[dependencies]
data-encoding = { version = "2.6.0", default-features = false }
data-encoding-macro = { version = "0.1.15", default-features = false }
proc-macro2 = { version = "1.0.83", default-features = false }
quote = { version = "1.0.36", default-features = false }
syn = { version = "2.0.66", default-features = false, features = ["printing"] }
proc-macro2 = { version = "1.0.0", default-features = false }
quote = { version = "1.0.0", default-features = false }
syn = { version = "2.0.0", default-features = false, features = ["printing"] }

[features]
# API features.
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "update-api"
name = "update"
version = "0.1.0"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
Expand All @@ -9,7 +9,7 @@ edition = "2021"
[dependencies]
anyhow = { version = "1.0.86", default-features = false, features = ["std"] }
clap = { version = "4.5.4", default-features = false, features = ["derive", "std"] }
wasefire-applet-api-desc = { path = "../../../api-desc" }
wasefire-applet-api-desc = { path = "../.." }

[lints]
clippy.unit-arg = "allow"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ struct Flags {
lang: Lang,
}

#[test]
fn flags() {
<Flags as clap::CommandFactory>::command().debug_assert();
}

#[derive(Copy, Clone, ValueEnum)]
pub enum Lang {
C,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ set -e

test_helper

cargo check --bin=update-api
cargo test --bin=update
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 })
}
10 changes: 10 additions & 0 deletions crates/api-macro/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.7.0-git

### Major

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

### Patch

- Update dependencies

## 0.6.1

### Minor
Expand Down
4 changes: 2 additions & 2 deletions crates/api-macro/Cargo.lock

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

4 changes: 2 additions & 2 deletions 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.1"
version = "0.7.0-git"
authors = ["Julien Cretin <[email protected]>"]
license = "Apache-2.0"
publish = true
Expand All @@ -15,7 +15,7 @@ categories = ["embedded", "no-std", "wasm"]
proc-macro = true

[dependencies]
wasefire-applet-api-desc = { version = "=0.2.0", path = "../api-desc" }
wasefire-applet-api-desc = { version = "=0.2.1-git", path = "../api-desc" }

[features]
api-button = ["wasefire-applet-api-desc/api-button"]
Expand Down
13 changes: 12 additions & 1 deletion crates/api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## 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

### Minor
Expand Down Expand Up @@ -87,4 +98,4 @@

## 0.1.0

<!-- Increment to skip CHANGELOG.md test: 0 -->
<!-- Increment to skip CHANGELOG.md test: 2 -->
Loading

0 comments on commit 57e49c8

Please sign in to comment.