Skip to content

Commit cc2741d

Browse files
committed
Prepare for renaming the project to muvm
krun was already used by crun for running containers with virtualization isolated powered by libkrun. To avoid confusing, let's rename this one to muvm. Signed-off-by: Sergio Lopez <[email protected]>
1 parent 572f276 commit cc2741d

31 files changed

Lines changed: 84 additions & 84 deletions

Cargo.lock

Lines changed: 20 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# krun - run programs from your system in a microVM
1+
# muvm - run programs from your system in a microVM
22

3-
`krun` allows you to run arbitrary programs from your system in a microVM. It's comprised of two small programs:
3+
`muvm` allows you to run arbitrary programs from your system in a microVM. It's comprised of three small programs:
44

5-
- `krun`: links against [libkrun](https://github.com/containers/libkrun) to create the microVM.
5+
- `muvm`: links against [libkrun](https://github.com/containers/libkrun) to create the microVM.
66

7-
- `krun-guest`: acts as an entrypoint inside the microVM to set up the environment for running your program.
7+
- `muvm-guest`: acts as an entrypoint inside the microVM to set up the environment for running your program.
88

99
## Using
1010

1111
``` sh
1212

13-
Usage: krun [OPTIONS] COMMAND [COMMAND_ARGS...]
13+
Usage: muvm [OPTIONS] COMMAND [COMMAND_ARGS...]
1414
OPTIONS:
1515
-h --help Show help
1616
--net=NET_MODE Set network mode
@@ -23,13 +23,13 @@ COMMAND_ARGS: arguments of COMMAND
2323

2424
## Running graphical applications
2525

26-
If [sommelier](https://chromium.googlesource.com/chromiumos/platform2/+/master/vm_tools/sommelier) is installed in your system, `krun` will use it to connect to the Wayland session on the hosts, allowing you to run graphical applications in the microVM.
26+
If [sommelier](https://chromium.googlesource.com/chromiumos/platform2/+/master/vm_tools/sommelier) is installed in your system, `muvm` will use it to connect to the Wayland session on the hosts, allowing you to run graphical applications in the microVM.
2727

2828
GPU acceleration is also enabled on systems supporting [DRM native context](https://indico.freedesktop.org/event/2/contributions/53/attachments/76/121/XDC2022_%20virtgpu%20drm%20native%20context.pdf) (freedreno, amdgpu, asahi).
2929

3030
## Running x86/x86_64 on aarch64
3131

32-
If [FEX-Emu](https://fex-emu.com/) is installed in your system, `krun` will configure `binfmt_misc` inside the microVM so x86/x86_64 programs can be run transparently on it.
32+
If [FEX-Emu](https://fex-emu.com/) is installed in your system, `muvm` will configure `binfmt_misc` inside the microVM so x86/x86_64 programs can be run transparently on it.
3333

3434
## Motivation
3535

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
2-
name = "krun"
2+
name = "muvm"
33
version = "0.1.0"
44
authors = ["Sergio Lopez <[email protected]>", "Teoh Han Hui <[email protected]>"]
55
edition = "2021"
66
rust-version = "1.77.0"
77
description = "Run programs from your system in a microVM"
8-
repository = "https://github.com/slp/krun"
8+
repository = "https://github.com/AsahiLinux/muvm"
99
license = "MIT"
1010

1111
[dependencies]
@@ -28,13 +28,13 @@ uuid = { version = "1.10.0", default-features = false, features = ["std", "v7"]
2828
default = []
2929

3030
[[bin]]
31-
name = "krun"
32-
path = "src/bin/krun.rs"
31+
name = "muvm"
32+
path = "src/bin/muvm.rs"
3333

3434
[[bin]]
35-
name = "krun-guest"
36-
path = "src/guest/bin/krun-guest.rs"
35+
name = "muvm-guest"
36+
path = "src/guest/bin/muvm-guest.rs"
3737

3838
[[bin]]
39-
name = "krun-server"
40-
path = "src/server/bin/krun-server.rs"
39+
name = "muvm-server"
40+
path = "src/server/bin/muvm-server.rs"
File renamed without changes.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ use std::os::fd::{IntoRawFd, OwnedFd};
55
use std::path::Path;
66

77
use anyhow::{anyhow, Context, Result};
8-
use krun::cli_options::options;
9-
use krun::cpu::{get_fallback_cores, get_performance_cores};
10-
use krun::env::{find_krun_exec, prepare_env_vars};
11-
use krun::launch::{launch_or_lock, LaunchResult};
12-
use krun::net::{connect_to_passt, start_passt};
13-
use krun::types::MiB;
148
use krun_sys::{
159
krun_add_disk, krun_add_vsock_port, krun_create_ctx, krun_set_env, krun_set_gpu_options2,
1610
krun_set_log_level, krun_set_passt_fd, krun_set_root, krun_set_vm_config, krun_set_workdir,
1711
krun_start_enter, VIRGLRENDERER_DRM, VIRGLRENDERER_THREAD_SYNC,
1812
VIRGLRENDERER_USE_ASYNC_FENCE_CB, VIRGLRENDERER_USE_EGL,
1913
};
2014
use log::debug;
15+
use muvm::cli_options::options;
16+
use muvm::cpu::{get_fallback_cores, get_performance_cores};
17+
use muvm::env::{find_muvm_exec, prepare_env_vars};
18+
use muvm::launch::{launch_or_lock, LaunchResult};
19+
use muvm::net::{connect_to_passt, start_passt};
20+
use muvm::types::MiB;
2121
use nix::sys::sysinfo::sysinfo;
2222
use nix::unistd::User;
2323
use rustix::io::Errno;
@@ -74,7 +74,7 @@ fn main() -> Result<()> {
7474
options.env,
7575
)? {
7676
LaunchResult::LaunchRequested => {
77-
// There was a krun instance already running and we've requested it
77+
// There was a muvm instance already running and we've requested it
7878
// to launch the command successfully, so all the work is done.
7979
return Ok(());
8080
},
@@ -337,35 +337,35 @@ fn main() -> Result<()> {
337337
}
338338
}
339339

340-
let krun_guest_path = find_krun_exec("krun-guest")?;
341-
let krun_server_path = find_krun_exec("krun-server")?;
340+
let muvm_guest_path = find_muvm_exec("muvm-guest")?;
341+
let muvm_server_path = find_muvm_exec("muvm-server")?;
342342

343-
let mut krun_guest_args: Vec<String> = vec![
344-
krun_guest_path,
343+
let mut muvm_guest_args: Vec<String> = vec![
344+
muvm_guest_path,
345345
username,
346346
format!("{uid}", uid = getuid().as_raw()),
347347
format!("{gid}", gid = getgid().as_raw()),
348-
krun_server_path,
348+
muvm_server_path,
349349
command
350350
.to_str()
351351
.context("Failed to process command as it contains invalid UTF-8")?
352352
.to_string(),
353353
];
354354
for arg in command_args {
355-
krun_guest_args.push(arg);
355+
muvm_guest_args.push(arg);
356356
}
357357

358358
let mut env = prepare_env_vars(env).context("Failed to prepare environment variables")?;
359359
env.insert(
360-
"KRUN_SERVER_PORT".to_owned(),
360+
"MUVM_SERVER_PORT".to_owned(),
361361
options.server_port.to_string(),
362362
);
363363

364364
let mut krun_config = KrunConfig {
365365
args: Vec::new(),
366366
envs: Vec::new(),
367367
};
368-
for arg in krun_guest_args {
368+
for arg in muvm_guest_args {
369369
krun_config.args.push(arg);
370370
}
371371
for (key, value) in env {
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const WELL_KNOWN_ENV_VARS: [&str; 5] = [
1414
"LD_LIBRARY_PATH",
1515
"LIBGL_DRIVERS_PATH",
1616
"MESA_LOADER_DRIVER_OVERRIDE", // needed for asahi
17-
"PATH", // needed by `krun-guest` program
17+
"PATH", // needed by `muvm-guest` program
1818
"RUST_LOG",
1919
];
2020

@@ -65,13 +65,13 @@ pub fn prepare_env_vars(env: Vec<(String, Option<String>)>) -> Result<HashMap<St
6565
}
6666

6767
// If we have an X11 display in the host, set HOST_DISPLAY in the guest.
68-
// krun-guest will then use this to set up xauth and replace it with :1
68+
// muvm-guest will then use this to set up xauth and replace it with :1
6969
// (which is forwarded to the host display).
7070
if let Ok(display) = env::var("DISPLAY") {
7171
env_map.insert("HOST_DISPLAY".to_string(), display);
7272

7373
// And forward XAUTHORITY. This will be modified to fix the
74-
// display name in krun-guest.
74+
// display name in muvm-guest.
7575
if let Ok(xauthority) = env::var("XAUTHORITY") {
7676
env_map.insert("XAUTHORITY".to_string(), xauthority);
7777
}
@@ -82,7 +82,7 @@ pub fn prepare_env_vars(env: Vec<(String, Option<String>)>) -> Result<HashMap<St
8282
Ok(env_map)
8383
}
8484

85-
pub fn find_krun_exec<P>(program: P) -> Result<String>
85+
pub fn find_muvm_exec<P>(program: P) -> Result<String>
8686
where
8787
P: AsRef<Path>,
8888
{
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ use std::os::unix::process::CommandExt as _;
33
use std::process::Command;
44

55
use anyhow::{Context, Result};
6-
use krun::guest::cli_options::options;
7-
use krun::guest::fex::setup_fex;
8-
use krun::guest::mount::mount_filesystems;
9-
use krun::guest::net::configure_network;
10-
use krun::guest::socket::setup_socket_proxy;
11-
use krun::guest::sommelier::exec_sommelier;
12-
use krun::guest::user::setup_user;
13-
use krun::guest::x11::setup_x11_forwarding;
14-
use krun::utils::env::find_in_path;
156
use log::debug;
7+
use muvm::guest::cli_options::options;
8+
use muvm::guest::fex::setup_fex;
9+
use muvm::guest::mount::mount_filesystems;
10+
use muvm::guest::net::configure_network;
11+
use muvm::guest::socket::setup_socket_proxy;
12+
use muvm::guest::sommelier::exec_sommelier;
13+
use muvm::guest::user::setup_user;
14+
use muvm::guest::x11::setup_x11_forwarding;
15+
use muvm::utils::env::find_in_path;
1616
use rustix::process::{getrlimit, setrlimit, Resource};
1717

1818
fn main() -> Result<()> {

0 commit comments

Comments
 (0)