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
17 changes: 17 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,25 @@ on:
branches: [main]

jobs:
format:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Check Rust formatting
shell: pwsh
run: |
cargo fmt --all -- --check
if ($LASTEXITCODE -ne 0) {
Write-Error "Rust formatting failed. Run 'cargo fmt --all' and commit the changes."
exit 1
}

# Tests
test:
needs: format
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ or re-check an existing report tree without rerunning tests via `-ValidateOnly`.
### Code Style

- Run `cargo clippy` before submitting PRs
- Run `cargo fmt` to format code
- Run `cargo fmt --all` to format code; CI enforces `cargo fmt --all -- --check`
- Follow standard Rust conventions

## Filing Issues
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/js/static-rust/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

fn main() {
// Link against node.lib so N-API symbols resolve at load time.
// node-gyp puts node.lib in the node-gyp cache; napi-build finds it.
napi_build::setup();
// Link against node.lib so N-API symbols resolve at load time.
// node-gyp puts node.lib in the node-gyp cache; napi-build finds it.
napi_build::setup();
}
Loading
Loading