Integrate lind boot#14
Open
Yaxuan-w wants to merge 7 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR integrates a Lind-native boot path into the Wasmtime executor, replacing the previous monolithic WASI/Wasmtime setup with a delegated lind_boot runtime module.
Changes:
- Replaces
Runtime::executewith a thin wrapper that prepares Lind boot options and starts/stops RawPOSIX. - Adds the new
runtime/lind_bootmodule for host context, 3i trampolines, dylink support, and Wasmtime execution. - Updates Rust/WASI targets and workspace dependencies for the Lind/Wasmtime integration.
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
rust-toolchain.toml |
Updates nightly toolchain and switches the WASI target to wasm32-wasip1. |
crates/exec-wasmtime/src/runtime/mod.rs |
Replaces inline runtime setup with Lind boot delegation. |
crates/exec-wasmtime/src/runtime/lind_boot/mod.rs |
Adds module wiring and public re-exports for Lind boot. |
crates/exec-wasmtime/src/runtime/lind_boot/options.rs |
Defines Lind boot runtime options. |
crates/exec-wasmtime/src/runtime/lind_boot/host.rs |
Adds host context and global grate handler registry. |
crates/exec-wasmtime/src/runtime/lind_boot/trampoline.rs |
Adds 3i trampoline entry points for grate and process syscalls. |
crates/exec-wasmtime/src/runtime/lind_boot/execute.rs |
Implements Lind/Wasmtime boot, dylink handling, exec, and runtime configuration. |
crates/exec-wasmtime/Cargo.toml |
Adds Lind boot dependencies and removes WASI threads dependency. |
Cargo.toml |
Updates workspace target/dependency versions and Lind/Wasmtime path dependencies. |
.cargo/config.toml |
Adds target-specific rustflags, bindeps, and sparse registry configuration. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+58
to
+59
| let code = lind_boot::execute_wasmtime(options, workload)?; | ||
| rawposix_shutdown(); |
| use cage::signal::{lind_signal_init, lind_thread_exit, signal_may_trigger}; | ||
| use cap_std::fs::Dir; | ||
| use anyhow::Context; | ||
| use enarx_config::{Config, File}; |
Comment on lines
+115
to
+117
| Ok(ref ret_vals) => { | ||
| // we wait until all other cage exits | ||
| lind_manager.wait(); |
Comment on lines
+314
to
+318
| table_inner.grow( | ||
| &mut wstore, | ||
| dylink_info.table_size as u64, | ||
| wasmtime::Ref::Func(None), | ||
| ); |
| // initialize the grate pool for later use in grate calls and | ||
| // other syscalls that require re-entry into wasmtime runtime. | ||
| init_grate_pool(); | ||
| unregister_grate_handler(cageid); |
| "aarch64-apple-darwin", | ||
| "aarch64-unknown-linux-musl", | ||
| "wasm32-wasi", | ||
| "wasm32-wasip1", |
Comment on lines
+26
to
+27
| AsContext, AsContextMut, Cache, Engine, Export, Func, InstantiateType, Linker, Module, | ||
| Precompiled, SharedMemory, Store, Val, ValType, WasmBacktraceDetails, |
| use std::sync::Arc; | ||
| use std::{ffi::c_void, sync::Mutex}; | ||
| use sysdefs::constants::lind_platform_const::{ | ||
| INSTANCE_NUMBER, RAWPOSIX_CAGEID, UNUSED_ARG, UNUSED_ID, WASMTIME_CAGEID, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.