Skip to content

Commit ba35bf6

Browse files
committed
Rename evolve -> init
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent 15cc79d commit ba35bf6

File tree

22 files changed

+86
-86
lines changed

22 files changed

+86
-86
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn main() -> hyperlight_host::Result<()> {
5252
// Note: This function is unused by the guest code below, it's just here for demonstration purposes
5353

5454
// Initialize sandbox to be able to call host functions
55-
let mut multi_use_sandbox = uninitialized_sandbox.evolve()?;
55+
let mut multi_use_sandbox = uninitialized_sandbox.init()?;
5656

5757
// Call a function in the guest
5858
let message = "Hello, World! I am executing inside of a VM :)\n".to_string();

fuzz/fuzz_targets/guest_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ fuzz_target!(
3636
)
3737
.unwrap();
3838

39-
let mu_sbox: Sandbox = u_sbox.evolve().unwrap();
39+
let mu_sbox: Sandbox = u_sbox.init().unwrap();
4040
SANDBOX.set(Mutex::new(mu_sbox)).unwrap();
4141
},
4242

fuzz/fuzz_targets/host_call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fuzz_target!(
3535
)
3636
.unwrap();
3737

38-
let mu_sbox: Sandbox = u_sbox.evolve().unwrap();
38+
let mu_sbox: Sandbox = u_sbox.init().unwrap();
3939
SANDBOX.set(Mutex::new(mu_sbox)).unwrap();
4040
},
4141

fuzz/fuzz_targets/host_print.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ fuzz_target!(
2121
)
2222
.unwrap();
2323

24-
let mu_sbox: Sandbox = u_sbox.evolve().unwrap();
24+
let mu_sbox: Sandbox = u_sbox.init().unwrap();
2525
SANDBOX.set(Mutex::new(mu_sbox)).unwrap();
2626
},
2727

src/hyperlight_component_util/src/host.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn emit_component<'a, 'b, 'c>(s: &'c mut State<'a, 'b>, wn: WitName, ct: &'c Com
359359
type Exports<I: #ns::#import_trait + ::std::marker::Send> = #wrapper_name<I, ::hyperlight_host::sandbox::sandbox::Sandbox>;
360360
fn instantiate<I: #ns::#import_trait + ::std::marker::Send + 'static>(mut self, i: I) -> Self::Exports<I> {
361361
let rts = register_host_functions(&mut self, i);
362-
let sb = self.evolve().unwrap();
362+
let sb = self.init().unwrap();
363363
#wrapper_name {
364364
sb,
365365
rt: rts,

src/hyperlight_host/benches/benchmarks.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ fn create_uninit_sandbox() -> UninitializedSandbox {
2727
}
2828

2929
fn create_multiuse_sandbox() -> Sandbox {
30-
create_uninit_sandbox().evolve().unwrap()
30+
create_uninit_sandbox().init().unwrap()
3131
}
3232

3333
fn guest_call_benchmark(c: &mut Criterion) {
@@ -63,7 +63,7 @@ fn guest_call_benchmark(c: &mut Criterion) {
6363
.register("HostAdd", |a: i32, b: i32| Ok(a + b))
6464
.unwrap();
6565

66-
let mut multiuse_sandbox: Sandbox = uninitialized_sandbox.evolve().unwrap();
66+
let mut multiuse_sandbox: Sandbox = uninitialized_sandbox.init().unwrap();
6767

6868
b.iter(|| {
6969
multiuse_sandbox
@@ -95,7 +95,7 @@ fn guest_call_benchmark_large_param(c: &mut Criterion) {
9595
Some(config),
9696
)
9797
.unwrap();
98-
let mut sandbox = sandbox.evolve().unwrap();
98+
let mut sandbox = sandbox.init().unwrap();
9999

100100
b.iter(|| {
101101
sandbox

src/hyperlight_host/examples/func_ctx/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn main() {
2424
let path = simple_guest_as_string().unwrap();
2525
let mut sbox = UninitializedSandbox::new(GuestBinary::FilePath(path), None)
2626
.unwrap()
27-
.evolve()
27+
.init()
2828
.unwrap();
2929

3030
// Do several calls against a sandbox running the `simpleguest.exe` binary,

src/hyperlight_host/examples/guest-debugging/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ fn main() -> hyperlight_host::Result<()> {
6868
// Note: This function is unused, it's just here for demonstration purposes
6969

7070
// Initialize sandboxes to be able to call host functions
71-
let mut multi_use_sandbox_dbg: Sandbox = uninitialized_sandbox_dbg.evolve()?;
72-
let mut multi_use_sandbox: Sandbox = uninitialized_sandbox.evolve()?;
71+
let mut multi_use_sandbox_dbg: Sandbox = uninitialized_sandbox_dbg.init()?;
72+
let mut multi_use_sandbox: Sandbox = uninitialized_sandbox.init()?;
7373

7474
// Call guest function
7575
let message =

src/hyperlight_host/examples/hello-world/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn main() -> hyperlight_host::Result<()> {
3535
// Note: This function is unused, it's just here for demonstration purposes
3636

3737
// Initialize sandbox to be able to call host functions
38-
let mut multi_use_sandbox: Sandbox = uninitialized_sandbox.evolve()?;
38+
let mut multi_use_sandbox: Sandbox = uninitialized_sandbox.init()?;
3939

4040
// Call guest function
4141
let message = "Hello, World! I am executing inside of a VM :)\n".to_string();

src/hyperlight_host/examples/logging/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fn main() -> Result<()> {
4545
usandbox.register_print(fn_writer)?;
4646

4747
// Initialize the sandbox.
48-
let mut multiuse_sandbox = usandbox.evolve()?;
48+
let mut multiuse_sandbox = usandbox.init()?;
4949

5050
// Call a guest function 5 times to generate some log entries.
5151
for _ in 0..5 {
@@ -75,7 +75,7 @@ fn main() -> Result<()> {
7575
UninitializedSandbox::new(GuestBinary::FilePath(hyperlight_guest_path.clone()), None)?;
7676

7777
// Initialize the sandbox.
78-
let mut multiuse_sandbox = usandbox.evolve()?;
78+
let mut multiuse_sandbox = usandbox.init()?;
7979
let interrupt_handle = multiuse_sandbox.interrupt_handle();
8080
let barrier = Arc::new(Barrier::new(2));
8181
let barrier2 = barrier.clone();

0 commit comments

Comments
 (0)