Alex Orlenko

Results 128 comments of Alex Orlenko

I don't like strong pointer in owned types either. As you correctly noted, switching `Arc` to `Weak` would lead to unsoundness when Lua is dropped while we still have a...

PR is welcome :) It's quite untrivial change.

Could you provide an example please?

> Even just the ability to add custom context to errors would already be a huge help. @lenscas could you provide more details?

I added `ErrorContext` trait in commit 8d8032173891bda1e1514e370cc4c60d9c157f30 that allow to attach additional context to errors. I'm looking into adding backtraces (under a feature flag), the stable rust doesn't support getting...

In the module mode there are some overhead related to safety checks (eg succesfull memory allocations and so on). You can significatly improve performance if compile the module with [`skip_memory_check`](https://docs.rs/mlua/0.9.1/mlua/attr.lua_module.html)...

> Is it possible to add a memory pool to reuse allocations for mlua? I'll look into it. But not in module more, in this case mlua does not control...

Thanks for the PR! Seems the current version has breaking changes (renaming `MemoryLimitNotAvailable` to `MemoryStatsNotAvailable`) which makes it hard to include into v0.9 branch. Wondering, would be better to keep...

I would love to support wasi, but currently the blocker is [exception handling](https://github.com/WebAssembly/exception-handling/) See [notable limitations](https://github.com/WebAssembly/wasi-sdk?tab=readme-ov-file#notable-limitations) on the wasi-sdk page c++ exceptions or setjmp/longjmp is required for Lua VM

> How does `wasm32-unknown-emscripten` work around the lack of exceptions or setjmp/longjmp? Seems it support native wasm exceptions if enabled, or javascript exceptions otherwise. See [setjmp-longjmp](https://emscripten.org/docs/porting/setjmp-longjmp.html) and [C++ exceptions support](https://emscripten.org/docs/porting/exceptions.html)...