Skip to content

Commit 551f314

Browse files
committed
fix: finalize panic handler system and test infrastructure
- Update wrt-platform panic handler with dependency feature flag - Improve WAST test infrastructure with new test runner - Add comprehensive test runner for WebAssembly spec tests
1 parent cf24508 commit 551f314

File tree

3 files changed

+1017
-55
lines changed

3 files changed

+1017
-55
lines changed

wrt-platform/src/lib.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -515,8 +515,11 @@ mod tests {
515515
}
516516
}
517517

518-
// Note: Panic handler should be provided by the final binary, not library crates
519-
// The main wrt crate provides the panic handler to avoid conflicts
520-
521-
// wrt-platform provides the panic handler for the entire WRT ecosystem
522-
// Panic handler is provided by the main binary crate or another library crate
518+
// Panic handler for no_std builds - only when building wrt-platform independently
519+
// This is needed for `cargo check -p wrt-platform` to work in no_std mode
520+
// When used as a dependency, the main binary should provide the panic handler
521+
#[cfg(all(not(feature = "std"), not(test), not(feature = "wrt-platform-as-dependency")))]
522+
#[panic_handler]
523+
fn panic(_info: &core::panic::PanicInfo) -> ! {
524+
loop {}
525+
}

0 commit comments

Comments
 (0)