Repository navigation
Weakly link c_guest_dispatch_function - #1848
Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
Only minor documentation and test-coverage nits remain; no blocking issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Adds a weak default C dispatch function returning NULL, allowing C guests to omit custom unknown-function handling.
Changes:
- Added weak fallback dispatch.
- Documented C and Rust dispatch behavior.
- Updated the changelog.
| File | Summary |
|---|---|
src/hyperlight_guest_capi/src/dispatch.rs |
Adds weak fallback dispatch. |
docs/how-to-build-a-hyperlight-guest-binary.md |
Documents default and override behavior. |
CHANGELOG.md |
Records the user-facing change. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
93ea147 to
647e601
Compare
…nt it Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
647e601 to
a01cd4d
Compare
Benchmark ResultsMeasured commit: kvm / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
kvm / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / amd (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / intel (Windows) (❌ 1.51x)Top regressions
Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
Reported by |
Closes #195
Closes #197
weak link default implementation of c_guest_dispatch_function so c guests dont need define one unless they want custom behavior when unknown guest function is called.
Matches implementation to how guest_dispatch_function is implmeented here
hyperlight/src/hyperlight_guest_bin/src/guest_function/call.rs
Lines 17 to 21 in deb063e
Tested locally. I didn't want to add a new specific c guest just for this test