Open dphfox opened 1 month ago
There was a Rust build option that you could use to have Wasynth generate code with a Luau-based Vector3 implementation. I'm pretty sure it still exists.
Alternatively you can use https://github.com/RealEthanPlayzDev/LuauCeption/blob/main/snippets/VanillaV3.luau (from my project, LuauCeption)
The feature flag in question is vector
, which is enabled by default. You have to build from inside the codegen/luau
directory for --no-default-features
to work properly (see https://github.com/rust-lang/cargo/issues/8366). Also, as of #35, the generated code will check for vector
, which lune implements (although I haven't tested this myself).
wasm2luau seems to rely on
Vector3.new
from the Roblox standard library (presumably to take advantage of vector optimisations). This prevents its use in standalone runtimes like Lune which don't provide these library members.