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

Added hostcalls for the new builder api hostcalls #427

Merged
merged 22 commits into from
Sep 27, 2024

Conversation

computermouth
Copy link
Contributor

Added the new hostcalls in in a new KvStore namespace.

I asked @elliottt if it was alright to leave the component hostcalls unimplemented, and he said that'd be fine for getting these and the new SDK out the door, though it will cause the viceroy_test macro tests to fail on the component.

I think most of this is pretty straightforward, the only real weird bit is some of the handle conversions, like

impl From<types::KvStoreLookupHandle> for types::PendingKvLookupHandle {
    fn from(h: types::KvStoreLookupHandle) -> types::PendingKvLookupHandle {
        // h.into() was doing infinite recursion
        let s = unsafe { h.inner() };
        s.into()
    }
}

Not sure if there's a better way to get around this, can you turbofish the into?

lib/src/component/kv_store.rs Show resolved Hide resolved
lib/src/wiggle_abi/obj_store_impl.rs Outdated Show resolved Hide resolved
lib/src/component/error.rs Outdated Show resolved Hide resolved
lib/src/component/error.rs Show resolved Hide resolved
lib/Cargo.toml Outdated Show resolved Hide resolved
lib/src/wiggle_abi.rs Outdated Show resolved Hide resolved
lib/src/object_store.rs Outdated Show resolved Hide resolved
lib/src/object_store.rs Outdated Show resolved Hide resolved
lib/src/object_store.rs Show resolved Hide resolved
lib/src/object_store.rs Show resolved Hide resolved
* match wit and component to trevor's working branch in xqd

* lookup_wait impl for component

* insert and delete

* list impl
ulyssa
ulyssa previously approved these changes Sep 26, 2024
Copy link
Contributor

@ulyssa ulyssa left a comment

Choose a reason for hiding this comment

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

This looks good to me! Thank you for adding these, these are great! 🙏

@ulyssa
Copy link
Contributor

ulyssa commented Sep 26, 2024

I think you may want to merge main to pull in #432 and then re-run make adapter to make sure the right .wasm file lands.

@computermouth computermouth merged commit 3fa4243 into main Sep 27, 2024
15 checks passed
@computermouth computermouth deleted the byoung/kv-builder branch September 27, 2024 16:31
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