Skip to content

Commit e41799c

Browse files
authored
allow creating a guest depending only on hl-guest-bin (#1383)
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent 17cddf3 commit e41799c

5 files changed

Lines changed: 41 additions & 1 deletion

File tree

src/hyperlight_guest/src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ limitations under the License.
1717
use alloc::format;
1818
use alloc::string::{String, ToString as _};
1919

20-
use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode;
20+
pub use hyperlight_common::flatbuffer_wrappers::guest_error::ErrorCode;
2121
use hyperlight_common::func::Error as FuncError;
2222
use {anyhow, serde_json};
2323

src/hyperlight_guest/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub mod error;
2525
pub mod exit;
2626
pub mod layout;
2727
pub mod prim_alloc;
28+
pub mod types;
2829

2930
pub mod guest_handle {
3031
pub mod handle;

src/hyperlight_guest/src/types.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
Copyright 2026 The Hyperlight Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
pub use hyperlight_common::flatbuffer_wrappers::function_call::FunctionCall;
18+
pub use hyperlight_common::flatbuffer_wrappers::function_types::{
19+
ParameterType, ParameterValue, ReturnType, ReturnValue,
20+
};
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/*
2+
Copyright 2026 The Hyperlight Authors.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
pub use hyperlight_guest::error::*;
18+
pub use hyperlight_guest::{bail, ensure};

src/hyperlight_guest_bin/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ pub mod guest_function {
4747
pub mod register;
4848
}
4949

50+
pub mod error;
5051
pub mod guest_logger;
5152
pub mod host_comm;
5253
pub mod memory;

0 commit comments

Comments
 (0)