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

Tracking issues of Lua binding #2474

Open
5 of 6 tasks
Tracked by #1769
oowl opened this issue Jun 17, 2023 · 8 comments
Open
5 of 6 tasks
Tracked by #1769

Tracking issues of Lua binding #2474

oowl opened this issue Jun 17, 2023 · 8 comments

Comments

@oowl
Copy link
Member

oowl commented Jun 17, 2023

Tasks

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2023

Hi, do you how to release a lua package that contains a C dylib?

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2023

Seems users who depend on opendal-ruby will need to build opendal by themselves?

For example: https://github.com/openresty/lua-cjson/blob/master/lua-cjson-2.1.0.12-1.rockspec

@oowl
Copy link
Member Author

oowl commented Jun 23, 2023

Yeah, luarocks neet to mannel execute luarocks build, But also we can release opendal to https://luarocks.org/ @Xuanwo, I will add rockspec to lua binding src.

@Xuanwo
Copy link
Member

Xuanwo commented Jun 23, 2023

https://luarocks.org/ supports binary release like pypi does?

@oowl
Copy link
Member Author

oowl commented Jun 28, 2023

@Xuanwo Yeah, it can support binary release. Wait for my #2558 PR to merge.

@oowl
Copy link
Member Author

oowl commented Jun 28, 2023

Another question is about the support for Lua's async operations. In Lua scenarios such as OpenResty, pure asynchronous operations are required. There doesn't seem to be a good way to make Rust's asynchronous IO work in OpenResty.

@khvzak
Copy link

khvzak commented Jul 2, 2023

There doesn't seem to be a good way to make Rust's asynchronous IO work in OpenResty.

There are few solutions how to integrate tokio (for example) with openresty.
See mlua-rs/mlua#76 and mlua-rs/mlua#143 for some ideas.

I also have plans to build a bridge between openresty (and libuv) and mlua async functionality.

@oowl
Copy link
Member Author

oowl commented Jul 4, 2023

There doesn't seem to be a good way to make Rust's asynchronous IO work in OpenResty.

There are few solutions how to integrate tokio (for example) with openresty. See khvzak/mlua#76 and khvzak/mlua#143 for some ideas.

I also have plans to build a bridge between openresty (and libuv) and mlua async functionality.

In openresty world, it has a bridge implement named as https://github.com/kingluo/lua-resty-ffi, it support offload all other runtime to other thread, and using eventfd notify nginx worker epoll to resume lua coroutine, I think it was a good solution to mlua async functionality

@tisonkun tisonkun changed the title Tracking issues of lua binding Tracking issues of Lua binding Oct 18, 2023
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

3 participants