-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
atomic instructions are not supported #44
Comments
Sadly, there are no plans to further extend this version of Wasynth with any of the proposals like atomics or SIMD and such. You'd likely need your compiler to not emit that code if possible or alter it to work with host workarounds. There is a Wasynth rewrite in the works that will tackle most proposals and fix this too, but I have no real ETA for it. |
ty |
I found a way for atomics support, i have made the lua functions, i add the names in Wasynth but last problem wasmparser (wasm-tools)'s Operator Enum doesn't contains atomics operators. What can i do? error[E0533]: expected unit struct, unit variant or constant, found struct variant error[E0533]: expected unit struct, unit variant or constant, found struct variant error[E0533]: expected unit struct, unit variant or constant, found struct variant error[E0533]: expected unit struct, unit variant or constant, found struct variant error[E0533]: expected unit struct, unit variant or constant, found struct variant error[E0533]: expected unit struct, unit variant or constant, found struct variant |
I think you may be missing a feature flag somewhere. Extensions in |
Thanks for the reply, the wasmparser wasn't enough recent to include atomic operations so i update it to the latest (i had to change some lines). Now the code seems to be working, i included the atomic operations. I built it, but when i launch wasm2luau.exe with the atomic wasm file, the stack array seems to be broken, i debug the issue and it was the atomic fault. Error: thread 'main' panicked at wasm-ast\src\stack.rs:82:29:
|
Due to the nature of Lua, I would honestly avoid making custom atomic statements in the AST altogether. Lua only really runs in one thread, and Wasynth doesn't support shared memories at all, so you might have better luck just making the atomic instruction codegen call the already existing code for construction non-atomic operations. |
Thanks for the information but doing atomic instructions without implementing threads isn't what i want. |
Good news, wasynth supports now passive data and thread. I have to test in roblox and upgrade my emscripten library to support threads! |
I have this error: Unsupported instruction: I32AtomicRmwAdd { memarg: MemArg { align: 2, max_align: 2, offset: 8, memory: 0 } }
I been trying to upgrade the code to support atomic functions but i can't :(
Solution?
The text was updated successfully, but these errors were encountered: