Open mfranzs opened 3 months ago
FYI this proj demos Rayon+Burn running in the main thread. I know this because the entire screen freezes when I run training. Despite being on the main thread, it still (empirically) requires +atomics,+bulk-memory
. I guess a natural question is "are you sure you can't enable coop/coep?"
(I'm currently trying to figure out how to move it off the main thread, but I'm running into bundler issues. Bah.)
To work around
crossOriginIsolation
issues coming from theSharedArrayBuffer
, I'm trying to run this package in the main thread. I see that support was added for this recently.However, when I remove the
rustflags = '--cfg web_sys_unstable_apis -Ctarget-feature=+atomics,+bulk-memory,+mutable-globals'
CLI setting suggested in the README, I get this error:compile_error!("Did you forget to enable
atomics
andbulk-memory
features as outlined in wasm-bindgen-rayon README?");Do you know how I can get this running in the main thread, or how I can get rayon itself running in the main thread? For context, my goal is to run
burn
either in the main thread or in a worker, withcrossOriginIsolation
off.Thank you very much!