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

Add Lua embedding #1468

Closed
wants to merge 1 commit into from
Closed

Conversation

barrbrain
Copy link

@barrbrain barrbrain commented Nov 8, 2024

Description

This adds a minimal Lua interface for interacting with a store. The motivating example transferring data by exercising FastSlowStore::get_part_unchunked().

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

local digests = {
  {"7465eeede3419aaa6def3cf3811bb4ce7416320da65fd60d6aa4d56cd3b4d0d3", 4},
  -- snip --
  {"2f1d593cd98cb5bf81eb9d880221122342784ac5fb7f41f2b137006bafc92e39", 3}
}
local count = #digests
for i = 1, count do digests[i] = digest(table.unpack(digests[i])) end
get_store("CAS_MAIN_STORE"):get_many(digests, 5, function (blob) print(blob and #blob) end)

Checklist

  • Updated documentation if needed
  • Tests added/amended
  • bazel test //... passes locally
  • PR is contained in a single commit, using git amend see some docs

This change is Reviewable

@CLAassistant
Copy link

CLAassistant commented Nov 8, 2024

CLA assistant check
All committers have signed the CLA.

@MarcusSorealheis MarcusSorealheis requested review from aaronmondal and removed request for aaronmondal November 9, 2024 00:15
@barrbrain
Copy link
Author

Fixed the Bazel build by dropping the vendored feature from the mlua dependency and plumbing a bazel_dep. However, building with nix or cargo requires additional work.

@barrbrain
Copy link
Author

Closing this draft in favour of a WebAssembly component embedding. The exploration of API shape was informative.

@barrbrain barrbrain closed this Dec 5, 2024
@MarcusSorealheis
Copy link
Collaborator

@barrbrain could you reference this PR in the WebAssembly component embedding?

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

Successfully merging this pull request may close these issues.

3 participants