Skip to content

Conversation

vshailesh
Copy link
Contributor

@vshailesh vshailesh commented Oct 6, 2025

…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>
@vshailesh
Copy link
Contributor Author

vshailesh commented Oct 6, 2025

@ludfjig
I added test for bool and string, and they pass on my local builds.
But tests for f32 and f64 fail, and the values getting returned is some garbage value, maybe because of overflow. I am not sure.

Please review the test cases, and tell me if I have missed something

Signed-off-by: Shailesh Vashishth <shavashishth@gmail.com>
@dblnz dblnz added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Oct 7, 2025
Copy link
Contributor

@dblnz dblnz left a 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.

vshailesh and others added 3 commits October 7, 2025 16:58
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>
@ludfjig
Copy link
Contributor

ludfjig commented Oct 7, 2025

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

dependabot bot and others added 2 commits October 8, 2025 02:17
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>
@vshailesh
Copy link
Contributor Author

implemented the clippy suggested changes and added comments for ignore attribute

dependabot bot added 2 commits October 8, 2025 10:30
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>
@dblnz
Copy link
Contributor

dblnz commented Oct 8, 2025

Because of other work merged into main, now there are conflicts with this PR.
Please rebase on the latest main and fix the conflicts.

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>
@vshailesh vshailesh requested a review from ludfjig October 8, 2025 16:24
ludfjig and others added 4 commits October 9, 2025 15:23
* 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>
@vshailesh vshailesh closed this Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing hl_get_host_return_value_as_*
3 participants