Skip to content

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

Merged
Xuanwo merged 8 commits intoapache:mainfrom
oowl:feat/lua-binding
Jun 16, 2023
Merged

feat(binding/lua): introduce opendal lua binding#2469
Xuanwo merged 8 commits intoapache:mainfrom
oowl:feat/lua-binding

Conversation

@oowl
Copy link
Copy Markdown
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
@github-actions github-actions Bot added the releases-note/feat The PR implements a new feature or has a title that begins with "feat" label Jun 16, 2023
Copy link
Copy Markdown
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!

Comment thread bindings/lua/Cargo.toml Outdated
Comment thread bindings/lua/src/lib.rs Outdated
Comment thread bindings/lua/src/lib.rs Outdated
Comment thread bindings/lua/src/lib.rs Outdated
Comment thread bindings/lua/example/fs.lua Outdated
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>
@oowl oowl force-pushed the feat/lua-binding branch from d592dfa to 4b0ceac Compare June 16, 2023 16:27
Signed-off-by: owl <ouyangjun1999@gmail.com>
@oowl oowl force-pushed the feat/lua-binding branch from b613a3a to cc70a5b Compare June 16, 2023 16:35
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 force-pushed the feat/lua-binding branch from bec78e9 to e626212 Compare June 16, 2023 17:43
@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
Copy Markdown
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
Copy Markdown
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

Labels

releases-note/feat The PR implements a new feature or has a title that begins with "feat"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants