Skip to content
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

POV: rlua should only be concerned with rust-side safety and soundness #201

Closed
SoniEx2 opened this issue Dec 26, 2020 · 1 comment
Closed

Comments

@SoniEx2
Copy link

SoniEx2 commented Dec 26, 2020

Currently, rlua does some stuff like:

  • remove debug
  • remove native modules
  • remove bytecode loading
  • replace pcall/xpcall/etc
  • replace coroutines? (see also: pcall/xpcall/etc)
  • among other things

In other words, it attempts to be a Rust-based implementation of OpenComputers, a Lua sandbox. At this point, why not just use wasm instead? - which incidentally is something we're attempting to do with OpenComputers because it provides better sandboxing than trying to patch Lua, and allows exposing all the APIs without worrying about holes.

Instead, "High level Lua bindings to Rust" should be just that - bindings, not an entire sandbox!

References: #116 , README, [...]


If you take our former hexchat-plugin crate as an example, for making hexchat plugins, it does its best to prevent the Rust plugin from having bugs, but doesn't try to actively prevent other plugins from having bugs that interact badly with the Rust plugins. (where possible, we tried to submit upstream patches to hexchat instead, altho we didn't have much success with that because we were kind of a prick back then. >.<)

So we do think things like handling userdata soundness (#19) is important, even when the Lua code is explicitly calling __gc on the userdata twice. But it should not be implemented through "replacing Lua".

@jugglerchris
Copy link
Collaborator

Hi,
I think this is covered by #190 and #192 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants