Skip to content

Conversation

jsmaxi
Copy link
Contributor

@jsmaxi jsmaxi commented Oct 12, 2025

Fixes #367

Migrate target from wasm32-unkown-unkown to wasmv1-none.

This change migrates to wasm32v1-none target by mainly updating test-utils packages (default-impl-macro-test and event-assertion) to handle no_std environments.

Changes:

  • Applied #![cfg_attr(target_family = "wasm", no_std)] to prevent Cargo from injecting std::prelude into empty crates when building for wasm targets that don't support std (like wasm32v1-none). Added required panic handler for no_std wasm environments.

  • Constrained dependencies to non-wasm targets:

[target.'cfg(not(target_family = "wasm"))'.dependencies]
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
  • Wrapped event-assertion std implementation in conditional compilation:
#[cfg(not(target_family = "wasm"))]
mod implementation {
    /* ... */ 
}
// Re-export for non-wasm targets
#[cfg(not(target_family = "wasm"))]
pub use implementation::*;
  • Updated readme, architecture, and toolchain information.

The test and build commands continue to function correctly, with the new wasm32v1-none target.

PR Checklist

  • Tests
  • Documentation

Copy link

netlify bot commented Oct 12, 2025

Deploy Preview for delightful-dieffenbachia-2097e0 canceled.

Name Link
🔨 Latest commit aa6e299
🔍 Latest deploy log https://app.netlify.com/projects/delightful-dieffenbachia-2097e0/deploys/68ebca4a4830b80008c23452

@jsmaxi
Copy link
Contributor Author

jsmaxi commented Oct 12, 2025

Not sure what the backwards compatibility strategy is for previous target wasm32-unknown-unknown.

@jsmaxi
Copy link
Contributor Author

jsmaxi commented Oct 12, 2025

NOTE: CI is failing on clippy warning in rwa package (unrelated to these wasm target changes).

The issue is the lint rule for document enums, where all variants share the same prefix:

  • DocumentError - all variants start with "Document"
  • DocumentStorageKey - all variants start with "Document"

This issue should be addressed in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to wasmv1-none from wasm32-unkown-unkown

1 participant