Open notdanilo opened 8 months ago
I plan to continue development eventually, yes.
roblox-rs uses https://github.com/Rerumu/Wasynth to compile the WebAssembly into Luau code, and Wasynth is currently undergoing some major changes that will make its emit a lot faster and more viable in real world usage.
After the new version of Wasynth is out, I'll likely try and find some more time to dedicate to roblox-rs.
Sounds good! It isn't working right now. Any chance you can support me? If I get it working, I might contribute to the project.
You'll need to copy this file from Wasynth and paste it into roblox/runtime.lua
, since it has not been updated to use buffers
https://github.com/Rerumu/Wasynth/blob/trunk/codegen/luau/runtime/runtime.lua
I did it and I got a new error
First of all, I am new to Lua. I don't see where Integer is initialized, so I assumed that Integer was a language standard object. But it's nil. Why?
I see that Integer is defined in runtime.luau
. I removed runtime.luau
from the same folder thinking that it would conflict with runtime.lua
. Do they both need to exist?
I got it to work by copying the definition of Integer
in runtime.luau
to runtime.lua
:)
I made it work once, but now, with no obvious change made, I am getting this error. I've tried for many hours to reproduce every step to make it work again with no success. Any idea what is going on here?
My initial attempt was to try to copy everything in the roblox folder to rojo's default project src/server folder. I have no idea how I got it to work. But I realized I have to use bindings
rojo's project to make it work. And run the README.md steps using bindings
as the working dir.
So, in order to make it work I had to:
runtime.lua
from WasynthFunction
definition from runtime.luau
to runtime.lua
The last error I got was possibly happening because the rustflags in .cargo/config where missing when using cargo build --manifest-path
. Also .cargo/config
is deprecated in favor of .cargo/config.toml
. I wonder if updating it will make it work.
The last error I got was possibly happening because the rustflags in .cargo/config where missing when using
cargo build --manifest-path
.
I'm not sure what you mean by this, what path are you specifying for the manifest?
EDIT: oh, it's a Rust bug. Switching to config.toml
probably won't fix that
I see that Integer is defined in
runtime.luau
. I removedruntime.luau
from the same folder thinking that it would conflict withruntime.lua
. Do they both need to exist?
Only one needs to exist, but we name the file .luau
as that is the language that Roblox uses.
Integer
is defined separately in Wasynth as there's two implementations, the table-based version (faster) and the vector-based version (more memory efficient.) I believe roblox-rs is using the vector-based one, but you can use either technically.
Integer
is defined separately in Wasynth as there's two implementations, the table-based version (faster) and the vector-based version (more memory efficient.) I believe roblox-rs is using the vector-based one, but you can use either technically.
I still don't get how it's included and why I have to write it on top of the runtime.lua file. Is there something I am missing?
Integer
is defined separately in Wasynth as there's two implementations, the table-based version (faster) and the vector-based version (more memory efficient.) I believe roblox-rs is using the vector-based one, but you can use either technically.I still don't get how it's included and why I have to write it on top of the runtime.lua file. Is there something I am missing?
It's the 64 bit integer implementation. Lua(u) doesn't have 64 bit integers but wasm requires them so they're implemented manually. It's not in the same file by default as there's two implementations (one favors memory, the other favors performance.)
That said, all of that will be significantly simplified in Wasynth's refactor, and I believe the latest version actually exports the runtime so roblox-rs could switch to that instead of copying the runtine manually.
I get this, my question was mostly about: Do I really need to copy the Integer implementation in the runtime.lua file? Or is there a correct way to do include it (or maybe a project config I am missing)?
I made it work once, but now, with no obvious change made, I am getting this error. I've tried for many hours to reproduce every step to make it work again with no success. Any idea what is going on here?
I fixed the getservice error by disabling multivalue.
Any plan to continue development?