hyperlight_host/sandbox/callable.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2025 The Hyperlight Authors.
3
4use crate::Result;
5use crate::func::{ParameterTuple, SupportedReturnType};
6
7/// Trait used by the macros to paper over the differences between hyperlight and hyperlight-wasm
8pub trait Callable {
9 /// Call a guest function dynamically
10 fn call<Output: SupportedReturnType>(
11 &mut self,
12 func_name: &str,
13 args: impl ParameterTuple,
14 ) -> Result<Output>;
15}