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

feat(binding/lua): introduce opendal lua binding #2469

Merged
merged 8 commits into from
Jun 16, 2023

Conversation

oowl
Copy link
Member

@oowl oowl commented Jun 16, 2023

Introduce opendal lua binding by mlua

opendal lua binding introduces these lua API (from C binding)

operator.new(schema, option)
operator:read(path)
operator:write(path, data)
operator:delete(path)
operator:is_exist(path)
operator:stat(path)

meta = operator:stat(path)
meta:content_length()
meta:is_file()
meta:is_dir()

Test:
path test/opendal_test.lua, I will add CI workflow in the next PR.

╰─$ busted -o gtest test/opendal_test.lua
[==========] Running tests from scanned files.
[----------] Global test environment setup.
[----------] Running tests from test/opendal_test.lua
[ RUN      ] test/opendal_test.lua @ 3: opendal unit test opendal fs schema operator function in fs schema
[       OK ] test/opendal_test.lua @ 3: opendal unit test opendal fs schema operator function in fs schema (1.29 ms)
[ RUN      ] test/opendal_test.lua @ 15: opendal unit test opendal fs schema meta function in fs schema
[       OK ] test/opendal_test.lua @ 15: opendal unit test opendal fs schema meta function in fs schema (0.21 ms)
[----------] 2 tests from test/opendal_test.lua (2.83 ms total)

[----------] Global test environment teardown.
[==========] 2 tests from 1 test file ran. (2.90 ms total)
[  PASSED  ] 2 tests.

@oowl oowl marked this pull request as draft June 16, 2023 03:07
@oowl oowl changed the title introduce opendal lua binding feat(binding): introduce opendal lua binding Jun 16, 2023
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bravo! I'm so happy to see an opendal lua binding!

bindings/lua/Cargo.toml Outdated Show resolved Hide resolved
bindings/lua/src/lib.rs Outdated Show resolved Hide resolved
bindings/lua/src/lib.rs Outdated Show resolved Hide resolved
bindings/lua/src/lib.rs Outdated Show resolved Hide resolved
bindings/lua/example/fs.lua Outdated Show resolved Hide resolved
oowl added 4 commits June 17, 2023 00:26
Signed-off-by: owl <ouyangjun1999@gmail.com>
Signed-off-by: owl <ouyangjun1999@gmail.com>
Signed-off-by: owl <ouyangjun1999@gmail.com>
Signed-off-by: owl <ouyangjun1999@gmail.com>
Signed-off-by: owl <ouyangjun1999@gmail.com>
oowl added 2 commits June 17, 2023 01:12
Signed-off-by: owl <ouyangjun1999@gmail.com>
Signed-off-by: owl <ouyangjun1999@gmail.com>
@oowl oowl marked this pull request as ready for review June 16, 2023 17:52
@oowl oowl requested a review from Xuanwo June 16, 2023 17:52
Signed-off-by: owl <ouyangjun1999@gmail.com>
@oowl oowl changed the title feat(binding): introduce opendal lua binding feat(binding/lua): introduce opendal lua binding Jun 16, 2023
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Thanks!

@Xuanwo Xuanwo merged commit e194e66 into apache:main Jun 16, 2023
@Xuanwo
Copy link
Member

Xuanwo commented Jun 16, 2023

cc @oowl, are you willing to create a tracking issue for not finished tasks of opendal-lua like #2465?

@oowl oowl mentioned this pull request Jun 17, 2023
6 tasks
@PsiACE PsiACE mentioned this pull request Jun 27, 2023
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants