| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
docs: clarify Env mode design - no extra mounts for linuxbrew Env mode should not mount /usr, /etc, /tmp, /var to ensure: - Consistent behavior with macOS (both execute on host for second-order calls) - Clear semantics: use Fs/VM mode if full isolation is needed Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
docs: update symlink API references to new explicit names Replace lfs::symlink() with appropriate explicit API names in documentation: - docs/zh/plan/cross-platform.md: symlink design principles - docs/zh/architecture/dpkg-database.md: code example Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
dev-projects: add WSL2 entry script for testing Windows epkg.exe Add run-wsl2-windows.sh to run dev-projects tests from WSL2 against native Windows epkg.exe. This enables testing Windows builds without leaving the Linux development environment. Changes: - run-wsl2-windows.sh: new entry script that sets EPKG_BIN to Windows epkg.exe and delegates to run.sh - common.sh: add _should_use_epkg_run() to detect WSL2/macOS and use 'epkg run' instead of direct ebin/ execution for Linux distros - expose.rs: skip ebin/ wrapper creation for ELF binaries on non-Linux hosts (Linux distros need VM execution, too complex for wrappers) - README.md: document WSL2 testing usage - ebin-exposure.md: document ebin/ behavior per platform Rationale: - On non-Linux hosts (macOS/Windows), Linux distros run in VM - Creating elf-loader based ebin/ wrappers requires complex VM setup - Script interpreters are also ELF, so script wrappers don't help - Better to require 'epkg run' explicitly for Linux distros - Native host distros (brew/conda/msys2) still get ebin/ wrappers Tested: - alpine C test from WSL2: passed Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
docs: add ELF Loader documentation (3 perspectives) Add comprehensive documentation for ELF Loader mechanism: - user-guide/elf-loader.md: Usage concepts and scenarios - architecture/elf-loader.md: Design details and implementation - troubleshooting/elf-loader.md: Debug commands and common issues Structure follows the same pattern as ebin-exposure docs. | 4 个月前 | |
docs: update VM mode mounts documentation - Replaced "问题" and "统一方案" sections with "核心原则" section - Updated implementation status: removed TODO markers from setup_qemu_vm() and run_command_in_krun() as bind mounts are now properly implemented - Clarified Linux uses namespace bind mounts + single virtiofs, macOS/Windows uses multiple virtiofs mounts Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
epkg run --sandbox: rename param to --isolate Rename SandboxMode to IsolateMode too. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
docs: add package format linking strategy document Explain fundamental differences between package formats: - Conda: built-in @rpath allows store sharing - Brew: placeholder paths require Move + absolute path rewriting - Design principle: format determines linking strategy Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
docs: remove references to deprecated symlink_to_file/directory() names Update all comments and documentation to use the new explicit API names: - symlink_file_for_virtiofs() / symlink_dir_for_virtiofs() for VM guest - symlink_file_for_native() / symlink_dir_for_native() for host access Files updated: - docs/zh/architecture/virtiofs-rootfs.md: API documentation - src/tool_wrapper.rs: module doc comment - src/link.rs: comment about fallback handling - src/lfs.rs: is_symlink_or_junction comment, section header - src/busybox/mod.rs: symlink API selection comment - src/environment.rs: applet symlink comment The internal krun_virtiofs_windows::symlink::symlink_to_file/directory calls remain as they are from the libkrun crate. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
vm: unify lifecycle management with vm_keep_timeout and remove reuse_vm/vm_reuse_connect ## Problem/Purpose The reuse_vm and vm_reuse_connect flags had confusing semantics that made the code hard to understand and maintain. VM lifecycle control was scattered across multiple flags and conditional checks. ## Background/Context Session file is the cross-process coordination mechanism. When a VM session exists, it MUST be reused ("能reuse就必须reuse"). The VM lifecycle is independent from epkg run lifecycle (VM lifecycle >= epkg run). ## Solution Unified VM lifecycle control through vm_keep_timeout (Option<u32>): - None: VM shuts down immediately after command completes - Some(0): VM never times out (persistent) - Some(N) > 0: VM shuts down after N seconds idle Key changes: 1. Changed VmConfig.timeout from u32 to Option<u32> 2. Removed reuse_vm and vm_reuse_connect fields from RunOptions 3. Removed --reuse CLI flag (reuse is now always attempted) 4. Made session file registration UNCONDITIONAL for cross-process discovery 5. Guest daemon decides lifecycle based solely on vm_keep_timeout_secs 6. Removed unused functions: is_vm_reuse_active_for_env, send_command_to_running_qemu_guest ## Usage - epkg run --isolate=vm /bin/ls: VM shuts down immediately (timeout=None) - epkg run --isolate=vm --vm-keep-timeout=30 /bin/ls: VM idle 30s then shutdown - epkg vm start --set timeout=60: VM persistent for 60s idle timeout - epkg vm start --set timeout=0: VM never shuts down until manual stop - Concurrent epkg run automatically discovers and reuses existing session Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
Migrate from libkrunfw to sandbox-kernel for VMM kernels Purpose: - Replace libkrunfw references with sandbox-kernel - sandbox-kernel is a standalone repo for building VM kernels - Kernels are now named: vmlinux-$KVER-$arch (e.g., vmlinux-6.19.6-x86_64) Code changes: - src/init.rs: REPO_VMLINUX = "sandbox-kernel" (for downloading from gitee) - src/libkrun.rs: remove KERNEL_BUNDLE and Raw format support (ELF only) - src/busybox/init.rs: update comment - bin/make.sh: update build instructions path and help text - Makefile: update comment Documentation changes: - Remove old architecture history, focus on new sandbox-kernel design - Update config file structure: kconfig/common + kconfig/arch/$arch - Fix kernel naming format: vmlinux-$KVER-$arch - Remove references to KERNEL_BUNDLE, Raw format, libkrunfw.so, LIBKRUNFW_DIR Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 4 个月前 |