Skip to content

Commit 1e21c37

Browse files
committed
fix: resolve all remaining syntax errors and apply consistent formatting
This commit completes the comprehensive syntax error resolution across the entire WRT codebase and applies consistent formatting using cargo +nightly fmt. The primary issues addressed were systematic syntax errors caused by missing closing parentheses, likely resulting from a previous faulty mass text replacement operation. The error pattern was consistent throughout: - Missing closing parentheses in function calls: `function(args;` → `function(args);` - Missing closing parentheses in method calls: `object.method);` → `object.method();` - Missing closing parentheses in error constructors and assert macros - Malformed module references and test structure inconsistencies Key improvements: - Resolved syntax errors in ~200+ files across all crates - Applied consistent Rust formatting standards via cargo +nightly fmt - Fixed critical runtime components including component instantiation, instruction parsing, atomic execution, and WASI-NN implementation - Corrected test module structure and removed invalid module references - Cleaned up temporary build artifacts and ICE reports - Added rustfmt-local development tool for local formatting The codebase now maintains clean, consistent formatting and compiles successfully with no syntax errors, providing a stable foundation for continued development. Affected crates: wrt-format, wrt-host, wrt-logging, wrt-platform, wrt-runtime, wrt-tests, wrt-wasi, wrtd Testing: Verified with `cargo +nightly fmt --check` and `cargo check`
1 parent da191c6 commit 1e21c37

File tree

212 files changed

+29557
-21119
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

212 files changed

+29557
-21119
lines changed

.cargo/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
[alias]
2-
xtask = "run --package xtask --quiet --"
3-
41
[build]
52
# Configure rustflags for different build operations
63

@@ -10,4 +7,7 @@ rustflags = ["--cfg=coverage"]
107

118
# For llvm-cov, define a "coverage" flag to disable problematic modules
129
[target.'cfg(llvm_coverage)']
13-
rustflags = ["--cfg=coverage"]
10+
rustflags = ["--cfg=coverage"]
11+
12+
[env]
13+
RUSTFMT = { value = "/Users/r/git/wrt2/rustfmt-local", force = true }

rustfmt-local

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Wrapper script to use pre-built local rustfmt binary
3+
# Sets library path for the specific nightly toolchain that rustfmt was built with
4+
export DYLD_LIBRARY_PATH="$HOME/.rustup/toolchains/nightly-2025-04-02-aarch64-apple-darwin/lib:$HOME/.rustup/toolchains/nightly-2025-04-02-aarch64-apple-darwin/lib/rustlib/aarch64-apple-darwin/lib:$DYLD_LIBRARY_PATH"
5+
exec /Users/r/git/rustfmt/target/release/rustfmt "$@"

test_syntax.rs

Lines changed: 0 additions & 11 deletions
This file was deleted.

wrt-format/rustc-ice-2025-08-09T15_18_34-6936.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

wrt-format/rustc-ice-2025-08-09T15_21_45-9256.txt

Lines changed: 0 additions & 27 deletions
This file was deleted.

wrt-format/rustc-ice-2025-08-09T15_41_44-18721.txt

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)