-
Notifications
You must be signed in to change notification settings - Fork 149
Adding FFI functions for Hyperlight Guest CAPI #937
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
Conversation
…le, string, vecbytes Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
@ludfjig Please review the test cases, and tell me if I have missed something |
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
It looks good from my point of view.
Let's see what CI says 😄 I've triggered the builds.
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.37.1 to 1.37.2. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](crate-ci/typos@v1.37.1...v1.37.2) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-version: 1.37.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [windows-sys](https://github.com/microsoft/windows-rs) from 0.61.1 to 0.61.2. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits) --- updated-dependencies: - dependency-name: windows-sys dependency-version: 0.61.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Clippy has a couple of complaints, otherwise looks good to me. For the #[ignore] you added, would you mind putting a small comment about why, and linking the issue #179. BTW when you want to update branch because it's out of date, I recommend using git rebase main, so the commits will not show up on this branch, instead of using something like git merge which will explicitly put the commits on the branch |
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.37.2 to 1.38.0. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](crate-ci/typos@v1.37.2...v1.38.0) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-version: 1.38.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
implemented the clippy suggested changes and added comments for ignore attribute |
Bumps [windows-result](https://github.com/microsoft/windows-rs) from 0.4.0 to 0.4.1. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits) --- updated-dependencies: - dependency-name: windows-result dependency-version: 0.4.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [windows-version](https://github.com/microsoft/windows-rs) from 0.1.6 to 0.1.7. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits) --- updated-dependencies: - dependency-name: windows-version dependency-version: 0.1.7 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Because of other work merged into main, now there are conflicts with this PR. |
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.38.0 to 1.38.1. - [Release notes](https://github.com/crate-ci/typos/releases) - [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md) - [Commits](crate-ci/typos@v1.38.0...v1.38.1) --- updated-dependencies: - dependency-name: crate-ci/typos dependency-version: 1.38.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Add test that fails due memory leaking when host function error occurs Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Update FlatBuffer schema and generation process - Add all.fbs to include all schema files in one place - Restructure function_call_result.fbs to use Result-like union - Add HostError variant to ErrorCode enum in guest_error.fbs - Update flatbuffer generation command in Justfile to use all.fbs - Update documentation for new generation process Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Regenerate FlatBuffer generated code Update all generated Rust code based on the new schema definitions. This includes new types for error handling and result structures. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Refactor error handling types and utilities - Update function_types.rs to handle Result-like return values - Simplify guest_error.rs wrapper implementation - Update util.rs for new generated types - Update mod.rs for new generated types Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Remove obsolete guest error handling - Remove guest_err.rs from hyperlight_host (replaced by new error handling) - Remove guest_err.rs from hyperlight_guest_bin (replaced by new error handling) - Update func/mod.rs to remove obsolete import Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Update host-side error handling - Update initialized_multi_use.rs to use new Result-like error handling - Update mem/mgr.rs to handle host function errors properly - Update sandbox/outb.rs for new error propagation pattern Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Update guest-side error handling - Update guest/host_comm.rs to use new Result-like return values - Update guest_bin/call.rs to properly handle host function errors - Update guest_bin/lib.rs to remove obsolete error handling import and make GUEST_HANDLE public (for use in C-API) - Update guest_capi/error.rs to support new error types Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Fix up test to work with new error handling Update sandbox_host_tests.rs to use the new Result-like error handling pattern. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Update Cargo dependencies Update Cargo.lock and Cargo.toml files to reflect the dependency changes needed for the new error handling implementation. Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Fix test so it passes Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * First round of PR feedback Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Unignore forgotten test Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> * Update flatc version in docs Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com> --------- Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Bumps [wasmparser](https://github.com/bytecodealliance/wasm-tools) from 0.239.0 to 0.240.0. - [Release notes](https://github.com/bytecodealliance/wasm-tools/releases) - [Commits](https://github.com/bytecodealliance/wasm-tools/commits) --- updated-dependencies: - dependency-name: wasmparser dependency-version: 0.240.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [windows](https://github.com/microsoft/windows-rs) from 0.62.1 to 0.62.2. - [Release notes](https://github.com/microsoft/windows-rs/releases) - [Commits](https://github.com/microsoft/windows-rs/commits) --- updated-dependencies: - dependency-name: windows dependency-version: 0.62.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
hl_get_host_return_value_as_*
#274