According to a quick google search, you are supposed to pass the SharedArrayBuffer to the constructor of a typed array (e.g. Uint32Array) and then manipulate elements through the typed array's API.
In JS: Atomics - JavaScript | MDN
In Rust: I think you need to set up the Module with a shared array buffer as memory backing and then atomic operations might work...