Skip to content

Integrate lind boot#14

Open
Yaxuan-w wants to merge 7 commits into
mainfrom
integrate-lind-boot
Open

Integrate lind boot#14
Yaxuan-w wants to merge 7 commits into
mainfrom
integrate-lind-boot

Conversation

@Yaxuan-w
Copy link
Copy Markdown
Member

@Yaxuan-w Yaxuan-w commented May 26, 2026

  • Only support static linking

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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::execute with a thin wrapper that prepares Lind boot options and starts/stops RawPOSIX.
  • Adds the new runtime/lind_boot module 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 thread crates/exec-wasmtime/src/runtime/lind_boot/host.rs
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);
Comment thread rust-toolchain.toml
"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,
@Yaxuan-w Yaxuan-w linked an issue May 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

run lind-wasm with enarx

2 participants