-
Notifications
You must be signed in to change notification settings - Fork 115
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
Merge with mlua #294
Comments
Hi, I'm generally positive about your proposal. I agree that mlua has more momentum (and users, according to the crates.io stats) and features. I'm not likely to make more than glacial progress. I will have a look at converting one of my projects from Maybe there are some details to work out, all being well.
If development stops then I don't think it's vital to move it (and I think you have the same maintainer rights as I do, looking back at #174 ). I guess it would make it clearer that
By "mirror" do you mean a wrapper with a dependency on |
Take a look to v0.9 release notes as this version has some changes, including renaming
I just feel that amethyst org is not the right place for rlua. I don't insist on this, however. The org I mentioned is mlua-rs where I move mlua too.
Yeah, seems the easiest option would be re-export mlua symbols and make an announcement about the changes. Generally mlua almost reached v1.0 point, what I work on is creating a book (similar to rhai) about all aspects of usage. Anyway, if we reached consensus and would like to proceed, then I need permissions on crates.io |
Seems fine 👍
Do you have the necessary owner privileges give those permissions @jugglerchris ? |
@erlend-sh Yes, I'm owner on crates.io, but not on the github project. @khvzak I converted my project. The main things I needed to do:
It was mostly painless with the context hack, so it seems like there can be a migration path that's not too hard. |
There is helper |
Move complete ✅ |
This macro didn't work with my type, which was: struct LuaPtr<T:?Sized> { ... } It returned:
Looks like the macro needs to leave out the bounds in some parts of the expansion. |
I'm thinking there should be a 0.20 release of
How does that sound to everyone? It could be done as a separate rlua-transitional repo (since it would be mostly empty), or just as a "delete most things" change on the now-moved rlua repo. |
I can put a proposed version of this, probably at the weekend. |
Would be nice to get doc re-exported too (not sure if it's possible). All other points makes sence, thanks @jugglerchris !
I would upvote for "delete". The current version can be moved to 0.19 branch for fast access. |
Fixed in v0.9.5 |
Confirmed, thanks! |
I'm working through making the |
I've pushed a branch with my attempt to make the There are some remaining issues:
|
It's mostly about (userdata) method/function names and usually in direction from Rust to Lua. Eg. it makes a little sense in The other thing I remember is named registry values takes
It's actually documented behaviour. By default mlua does not patch Lua runtime (including
Yeah, this is a deliberate decision. It's usually needed only in sandbox mode and in this case is up to a user to disable any unwanted functionality they want (eg. fs access, loading code, executing programs, etc). Generally I try to not patch Lua runtime and for example in module mode, it's just not acceptable. The only exception is loading binary modules but it's not a runtime patching rather removing a C loader (keeping all functionality genue).
You should see I don't have strong opinion on this, but the |
Ok, I've updated the branch; I've fixed a couple of tests and disabled/removed the ones that are now less relevant. |
I've requested CircleCI access to the |
Totally fine, the CircleCI should work now |
It does, apart from the failures, thanks! |
Luau does not has |
Thanks.
|
This is from system luajit which is very likely too old. |
Could you try adding these lines. |
I suspect the |
I'm using the LuaJIT ~2.1.0, from the package in Ubuntu 22.04. https://luajit.org/install.html says "Make sure you use luaL_newstate. Avoid using lua_newstate, since this uses the (slower) default memory allocator from your system (no support for this on 64 bit architectures)." Has that changed in the rolling version? |
That (or something slightly modified) does seem to do the trick, thanks. |
Interesting - I think you're right. |
Providing a default memory allocator definitely works for newer luajit on 64 bit targets, but older version returns Using a rust (global) allocator actually has more advantages, for example you can use jemalloc/mimalloc for entire rust app including lua allocations. I doubt that the luajit allocator is faster than jemalloc/mimalloc. |
I've merged #297 . Does anyone see any problem with my doing a |
Looks good to me. 🚢 |
Published! |
Very happy to see this! |
Hello,
I'm mlua maintainer, the lua bindings library you probably already know about.
I started it ~5 years ago to simply add module module support to rlua, but then mlua evolved into a full featured independent library with their own set of features, maintaining the pre-context rlua API style.
Since beginning of mlua, the rlua has changed hands and became part of amethyst. Unfortunately the library slowed down its development a little and is left behind mlua.
This is just a short list of new features and improvements supported by mlua: more Lua versions (including Luau); async functions, module mode support, serialization, new userdata api, webassembly support, and many more.
Apart from that, mlua is tuned for high performance (see benchmarks), about twice faster than rlua and proved itself in high loaded production environments for a long time.
I think it's unfortunate that now community is split between the two libraries and it would be more beneficial for everyone and the Rust comunuty to have a single high quality library. For example the tealr crate supports both libraries under feature flags that I believe is not very convenient.
That's why I'm reaching out to the rlua maintainers with proposal to merge both libraries into a single one. In particular, I'm proposing to:
I spoke with @kyren about this recently and she is happy about the merger and would transfer rlua if she still owned it.
Please, let me know what you think about it. It's completely fine if you have another views on rlua would prefer to continue development independently.
The text was updated successfully, but these errors were encountered: