Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
RUSTDOCFLAGS: "-D warnings"
- run: cargo package --locked
- run: npm run check:wasm
env:
RUSTDOCFLAGS: "-D warnings"
- run: npm run build:wasm
# Upload the built pkg/ files for the cross-OS matrix.
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
Expand Down Expand Up @@ -94,6 +92,8 @@ jobs:
node-version-file: ".node-version"
cache: "npm"
- run: cargo build --locked --release
env:
RUSTFLAGS: "-D warnings"
# Check that Cargo built the native dynamic library for this OS.
- run: node --input-type=module -e "import assert from 'node:assert/strict'; import fs from 'node:fs'; const stat = fs.statSync(process.env.CDYLIB); assert.ok(stat.isFile() && stat.size > 0);"
env:
Expand Down
7 changes: 3 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ this file, rustdoc, code comments, TypeScript comments and commit messages.
Run these Cargo checks in a POSIX shell (`sh`, `bash` or `zsh`):

```sh
cargo build --locked --release
cargo rustc --locked --lib --release -- -D warnings
cargo fmt --check
cargo clippy --locked --lib -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --locked --no-deps
Expand All @@ -105,13 +105,12 @@ RUSTDOCFLAGS="-D warnings" cargo doc --locked --release --no-deps --target wasm3

If you run `cargo package --locked` before a commit, add `--allow-dirty`.

In PowerShell on Windows, set `RUSTDOCFLAGS` in the environment before `cargo doc` and `npm run check:wasm`:
In PowerShell on Windows, set `RUSTDOCFLAGS` in the environment before `cargo doc`:

```powershell
$env:RUSTDOCFLAGS = "-D warnings"
cargo doc --locked --no-deps
cargo doc --locked --release --no-deps --target wasm32-unknown-unknown --features wasm
npm run check:wasm
Remove-Item Env:RUSTDOCFLAGS
```

Expand All @@ -125,7 +124,7 @@ checks the `tunelet` and `@bytelandtechnology/tunelet` archives:

```sh
npm ci
RUSTDOCFLAGS="-D warnings" npm run check:wasm
npm run check:wasm
npm run verify:pack
```

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,10 @@ To build the crate and check the format, the lints, the documentation and
the archive, run these commands:

```sh
cargo build --locked --release
cargo rustc --locked --lib --release -- -D warnings
cargo fmt --check
cargo clippy --locked --lib -- -D warnings
cargo doc --locked --no-deps
cargo rustdoc --locked --lib -- -D warnings
cargo package --locked
```

Expand All @@ -630,7 +630,7 @@ these commands:
```sh
rustup target add wasm32-unknown-unknown
cargo clippy --locked --release --lib --target wasm32-unknown-unknown --features wasm -- -D warnings
cargo doc --locked --release --no-deps --target wasm32-unknown-unknown --features wasm
cargo rustdoc --locked --release --lib --target wasm32-unknown-unknown --features wasm -- -D warnings
```

Native Rust builds and these Wasm checks use Cargo and do not need Node.js
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"build": "npm run build:wasm && npm run build:ts",
"build:wasm": "wasm-pack build --target web --out-dir pkg --release --no-pack --features wasm --locked && node scripts/postbuild-wasm.mjs && node scripts/normalize-jsdoc.mjs",
"build:ts": "tsc",
"check:wasm": "cargo clippy --locked --release --lib --target wasm32-unknown-unknown --features wasm -- -D warnings && cargo doc --locked --release --no-deps --target wasm32-unknown-unknown --features wasm",
"check:wasm": "cargo clippy --locked --release --lib --target wasm32-unknown-unknown --features wasm -- -D warnings && cargo rustdoc --locked --release --lib --target wasm32-unknown-unknown --features wasm -- -D warnings",
"prepack": "npm run build",
"prepare": "git config core.hooksPath .githooks || true",
"verify:pack": "node scripts/verify-pack.mjs"
Expand Down
Loading