You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WASM applications using SharedArrayBuffer (required for multi-threaded WASM) need Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) headers. Currently there's no way to:
Verify COOP/COEP headers are correctly set
Test that SharedArrayBuffer is available in the page context
Validate Web Worker communication works
Proposed Solution
Add WasmCapabilities verification:
pubstructWasmCapabilities{pubshared_array_buffer:bool,pubatomics:bool,pubthreads:bool,pubsimd:bool,}implWasmCapabilities{/// Check browser capabilities via CDPpubasyncfndetect(page:&Page) -> ProbarResult<Self>;/// Assert required capabilities are availablepubfnassert_streaming_ready(&self) -> ProbarResult<()>{if !self.shared_array_buffer{returnErr(ProbarError::MissingCapability("SharedArrayBuffer not available. Check COOP/COEP headers."));}Ok(())}}
Use Cases
Streaming WASM Apps: whisper.apr requires SharedArrayBuffer for audio processing
COOP/COEP Header Validation: Ensure server is correctly configured
Capability Detection: Skip tests that require unavailable features
Problem
WASM applications using SharedArrayBuffer (required for multi-threaded WASM) need Cross-Origin-Opener-Policy (COOP) and Cross-Origin-Embedder-Policy (COEP) headers. Currently there's no way to:
Proposed Solution
Add
WasmCapabilitiesverification:Use Cases
Related
probar serve --cross-origin-isolatedsets these headers