Skip to content

Commit 70f3cf5

Browse files
committed
Add cargo-spellcheck and Typos
1 parent 9a52443 commit 70f3cf5

27 files changed

Lines changed: 529 additions & 137 deletions

File tree

.config/spellcheck.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
dev_comments = true
2+
3+
[Hunspell]
4+
extra_dictionaries = ["topic.dic"]
5+
search_dirs = ["."]
6+
skip_os_lookups = true
7+
use_builtin = true
8+
9+
[Hunspell.quirks]
10+
transform_regex = ["^v[0-9]+$", "^https://[^ ]+$"]

.config/topic.dic

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
47
2+
allocator
3+
API
4+
APIs
5+
ASM
6+
backtrace
7+
builtins
8+
Builtins
9+
CLI
10+
destructors
11+
DOM
12+
E2E
13+
Emscripten/M
14+
getters
15+
GC/M
16+
interoperability
17+
JS/M
18+
JSON
19+
LLVM
20+
LTO
21+
MSRV
22+
multivalue
23+
namespaces
24+
parsers
25+
resizable
26+
rAF
27+
rfcs
28+
stacktraces
29+
startup
30+
Stdin
31+
Stdout
32+
substring
33+
TODO
34+
toolchain/S
35+
tuple
36+
WABT
37+
Wasm
38+
Wasm32
39+
Wasm64
40+
Wasmtime
41+
WAT
42+
WebDriver/S
43+
whitelist
44+
wishlist
45+
<
46+
>

.github/workflows/audit.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
env:
1515
CARGO_INCREMENTAL: 0
1616
CARGO_TERM_COLOR: always
17+
CLICOLOR_FORCE: ""
1718

1819
jobs:
1920
rust-sec:
@@ -47,7 +48,7 @@ jobs:
4748
run: cargo audit
4849

4950
npm:
50-
name: NPM - `${{ matrix.package.name }}`
51+
name: NPM Audit - `${{ matrix.package.name }}`
5152

5253
runs-on: ubuntu-slim
5354

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
env:
1515
CARGO_INCREMENTAL: 0
1616
CARGO_TERM_COLOR: always
17+
CLICOLOR_FORCE: ""
1718
XWIN_ARCH: x86_64
1819

1920
jobs:

.github/workflows/dependency-submission.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313
env:
1414
CARGO_INCREMENTAL: 0
1515
CARGO_TERM_COLOR: always
16+
CLICOLOR_FORCE: ""
1617

1718
jobs:
1819
crates-io:

.github/workflows/fmt.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
env:
1515
CARGO_INCREMENTAL: 0
1616
CARGO_TERM_COLOR: always
17+
CLICOLOR_FORCE: ""
1718

1819
jobs:
1920
rustfmt:

.github/workflows/lint.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ concurrency:
1414
env:
1515
CARGO_INCREMENTAL: 0
1616
CARGO_TERM_COLOR: always
17+
CLICOLOR_FORCE: ""
1718

1819
jobs:
1920
cargo-shim:

.github/workflows/spellcheck.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Spellcheck
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
permissions: {}
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref_name }}
12+
cancel-in-progress: true
13+
14+
env:
15+
CARGO_INCREMENTAL: 0
16+
CARGO_TERM_COLOR: always
17+
CLICOLOR_FORCE: ""
18+
19+
jobs:
20+
cargo-spellcheck:
21+
name: "`cargo-spellcheck`"
22+
23+
runs-on: ubuntu-latest
24+
25+
timeout-minutes: 20
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v6
30+
with:
31+
persist-credentials: false
32+
- name: Install `cargo-spellcheck`
33+
uses: taiki-e/install-action@v2
34+
with:
35+
tool: cargo-spellcheck
36+
- name: Run `cargo-spellcheck`
37+
run: cargo spellcheck -m 1
38+
39+
typos:
40+
name: Typos
41+
42+
runs-on: ubuntu-slim
43+
44+
timeout-minutes: 20
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v6
49+
with:
50+
persist-credentials: false
51+
- name: Install Typos
52+
uses: taiki-e/install-action@v2
53+
with:
54+
tool: typos-cli
55+
- name: Run Typos
56+
run: typos

TODO.md

Lines changed: 43 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
# Critical Priority
22

3-
- Replace `clang` with `wasm-tools`. See [bytecodealliance/wasm-tools#2405].
3+
- Replace `clang` with `wasm-tools`. See [`bytecodealliance/wasm-tools#2405`].
44
- Compatibility with `wasm-bindgen`.
55
- Do we agree with the new name `js-bindgen`? Maybe `web-bindgen` is the most accurate?
66
- `#[js_sys]` is probably also not the ideal name.
77
- Stub implementation for non-supported targets.
88
- Add ourselves to the tool-conventions tool list.
99

10-
[bytecodealliance/wasm-tools#2405]: https://github.com/bytecodealliance/wasm-tools/issues/2405
10+
[`bytecodealliance/wasm-tools#2405`]: https://github.com/bytecodealliance/wasm-tools/issues/2405
1111

1212
# High Priority
1313

1414
- Test Runner:
1515
- Consider moving environment variables to CLI arguments.
1616
- Lint and format TS files and minimize JS files.
17-
- Add support for `--test-threads` and multithread tests where possible for `panic = "abort"`.
17+
- Add support for `--test-threads` and multi-threaded tests where possible for `panic = "abort"`.
1818
- Add support for `panic = "unwind"`.
1919
- Add support for `--force-run-in-process`.
2020
- Add support for `--skip`, `--quiet`, `--show-output`, `--color` and `--format pretty`.
2121
- E2E testing including output comparison with regular `cargo test`. Test output on failure
2222
especially carefully.
2323
- Design a way to let users set the default driver, overwrite and whitelist drivers globally or
2424
for specific tests.
25-
- Add multithread support when running with `target_feature = "atomics"` where possible.
25+
- Add multi-threading support when running with `target_feature = "atomics"` where possible.
2626
- Crate feature to switch to `native-tls`.
2727
- Add environment variable to set driver startup timeout.
2828
- Properly emit errors when WebDrivers fail between startup and finish. Make sure we don't wait
@@ -63,7 +63,7 @@
6363
- Version all names to make packages compatible with other versions of itself.
6464
- Embed crate version to make linker capable of detecting unsupported versions.
6565
- We still need to look into what happens with old files. We might need to delete them ourselves.
66-
- Evaluate the output directory of our ASM objet files. Some ideas:
66+
- Evaluate the output directory of our ASM object files. Some ideas:
6767
- Store them next to the output file.
6868
- Pass an environment variable from a `build.rs` pointing to the target directory and go from
6969
there. This seems to have failed. No build script instruction can reach the linker on Wasm.
@@ -104,47 +104,48 @@ This is a list of upstream issues that could make our lives significantly easier
104104

105105
- LLVM v22 delivers support for the GC proposal, with which we can implement the `externref` table
106106
much more efficiently.
107-
- LLVM has incomplete GC support for our needs: [llvm/llvm-project#136594].
108-
- Stable `asm!` support for Wasm: [rust-lang/rust#136382].
109-
- `asm!` support with target features: [rust-lang/rust#113221]
110-
- Verbatim `asm!` parameters: [rust-lang/rust#132083].
107+
- LLVM has incomplete GC support for our needs: [`llvm/llvm-project#136594`].
108+
- Stable `asm!` support for Wasm: [`rust-lang/rust#136382`].
109+
- `asm!` support with target features: [`rust-lang/rust#113221`]
110+
- Verbatim `asm!` parameters: [`rust-lang/rust#132083`].
111111
- Better stable proc-macro support:
112-
- `quote!`: [rust-lang/rust#54722].
113-
- Diagnostics: [rust-lang/rust#54140].
114-
- Execution in non-proc-macro crates: [rust-lang/rust#130856].
115-
- Elevate `wasm64-unknown-unknown` to tier 2: [rust-lang/rust#146944].
116-
- A way to flag proc-macros as `unsafe`: [rust-lang/rfcs#3715].
117-
- Link internal functions without exporting them: [rust-lang/rust#29603] or [rust-lang/rfcs#3834].
118-
- Our linker warnings should show up for users: [rust-lang/rust#136096].
112+
- `quote!`: [`rust-lang/rust#54722`].
113+
- Diagnostics: [`rust-lang/rust#54140`].
114+
- Execution in non-proc-macro crates: [`rust-lang/rust#130856`].
115+
- Elevate `wasm64-unknown-unknown` to tier 2: [`rust-lang/rust#146944`].
116+
- A way to flag proc-macros as `unsafe`: [`rust-lang/rfcs#3715`].
117+
- Link internal functions without exporting them: [`rust-lang/rust#29603`] or
118+
[`rust-lang/rfcs#3834`].
119+
- Our linker warnings should show up for users: [`rust-lang/rust#136096`].
119120
- `TextDe/Encoder` could support `SharedArrayBuffer`s:
120121
- [Chrome Bug](https://issues.chromium.org/issues/40102463)
121122
- [Firefox Bug](https://bugzilla.mozilla.org/show_bug.cgi?id=1561594)
122-
- `TextDe/Encoder` could support resizable buffers: [whatwg/encoding#344].
123-
- `wasm-encoder` `io::Write` support: [bytecodealliance/wasm-tools#778]
124-
- Improved test coverage data merging: [llvm/llvm-project#121194]
125-
- Cargo support for local development pre-processing: [rust-lang/cargo#12552] or
126-
[rust-lang/cargo#4511]
123+
- `TextDe/Encoder` could support resizable buffers: [`whatwg/encoding#344`].
124+
- `wasm-encoder` `io::Write` support: [`bytecodealliance/wasm-tools#778`]
125+
- Improved test coverage data merging: [`llvm/llvm-project#121194`]
126+
- Cargo support for local development pre-processing: [`rust-lang/cargo#12552`] or
127+
[`rust-lang/cargo#4511`]
127128
- Rust has an issue with duplicate symbols during tests. E.g. this prevents us from having unit
128-
tests in `js-sys`. [rust-lang/rust#145616]
129+
tests in `js-sys`. [`rust-lang/rust#145616`]
129130
- Currently `cargo metadata` doesn't list `build-std` dependencies. This is an issue for caching in
130-
the CI, significantly increasing our build and test times. [rust-lang/wg-cargo-std-aware#20]
131+
the CI, significantly increasing our build and test times. [`rust-lang/wg-cargo-std-aware#20`]
131132

132-
[llvm/llvm-project#136594]: https://github.com/llvm/llvm-project/issues/136594
133-
[rust-lang/rust#136382]: https://github.com/rust-lang/rust/issues/136382
134-
[rust-lang/rust#113221]: https://github.com/rust-lang/rust/issues/113221
135-
[rust-lang/rust#132083]: https://github.com/rust-lang/rust/issues/132083
136-
[rust-lang/rust#54722]: https://github.com/rust-lang/rust/issues/54722
137-
[rust-lang/rust#54140]: https://github.com/rust-lang/rust/issues/54140
138-
[rust-lang/rust#130856]: https://github.com/rust-lang/rust/issues/130856
139-
[rust-lang/rust#146944]: https://github.com/rust-lang/rust/issues/146944
140-
[rust-lang/rfcs#3715]: https://github.com/rust-lang/rfcs/pull/3715
141-
[rust-lang/rust#29603]: https://github.com/rust-lang/rust/issues/29603
142-
[rust-lang/rfcs#3834]: https://github.com/rust-lang/rfcs/pull/3834
143-
[rust-lang/rust#136096]: https://github.com/rust-lang/rust/issues/136096
144-
[whatwg/encoding#344]: https://github.com/whatwg/encoding/issues/344
145-
[bytecodealliance/wasm-tools#778]: https://github.com/bytecodealliance/wasm-tools/issues/778
146-
[llvm/llvm-project#121194]: https://github.com/llvm/llvm-project/pull/121194
147-
[rust-lang/cargo#12552]: https://github.com/rust-lang/cargo/issues/12552
148-
[rust-lang/cargo#4511]: https://github.com/rust-lang/cargo/issues/4511
149-
[rust-lang/rust#145616]: https://github.com/rust-lang/rust/issues/145616
150-
[rust-lang/wg-cargo-std-aware#20]: https://github.com/rust-lang/wg-cargo-std-aware/issues/20
133+
[`llvm/llvm-project#136594`]: https://github.com/llvm/llvm-project/issues/136594
134+
[`rust-lang/rust#136382`]: https://github.com/rust-lang/rust/issues/136382
135+
[`rust-lang/rust#113221`]: https://github.com/rust-lang/rust/issues/113221
136+
[`rust-lang/rust#132083`]: https://github.com/rust-lang/rust/issues/132083
137+
[`rust-lang/rust#54722`]: https://github.com/rust-lang/rust/issues/54722
138+
[`rust-lang/rust#54140`]: https://github.com/rust-lang/rust/issues/54140
139+
[`rust-lang/rust#130856`]: https://github.com/rust-lang/rust/issues/130856
140+
[`rust-lang/rust#146944`]: https://github.com/rust-lang/rust/issues/146944
141+
[`rust-lang/rfcs#3715`]: https://github.com/rust-lang/rfcs/pull/3715
142+
[`rust-lang/rust#29603`]: https://github.com/rust-lang/rust/issues/29603
143+
[`rust-lang/rfcs#3834`]: https://github.com/rust-lang/rfcs/pull/3834
144+
[`rust-lang/rust#136096`]: https://github.com/rust-lang/rust/issues/136096
145+
[`whatwg/encoding#344`]: https://github.com/whatwg/encoding/issues/344
146+
[`bytecodealliance/wasm-tools#778`]: https://github.com/bytecodealliance/wasm-tools/issues/778
147+
[`llvm/llvm-project#121194`]: https://github.com/llvm/llvm-project/pull/121194
148+
[`rust-lang/cargo#12552`]: https://github.com/rust-lang/cargo/issues/12552
149+
[`rust-lang/cargo#4511`]: https://github.com/rust-lang/cargo/issues/4511
150+
[`rust-lang/rust#145616`]: https://github.com/rust-lang/rust/issues/145616
151+
[`rust-lang/wg-cargo-std-aware#20`]: https://github.com/rust-lang/wg-cargo-std-aware/issues/20

client/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ unexpected_cfgs = { level = "allow", check-cfg = [
5656
'cfg(js_sys_assume_endianness, values("big", "little"))',
5757
] }
5858

59+
[workspace.metadata.spellcheck]
60+
config = "../.config/spellcheck.toml"
61+
5962
[[example]]
6063
crate-type = ["cdylib"]
6164
name = "basic"

0 commit comments

Comments
 (0)