Skip to content

Commit

Permalink
update to latest runwasi
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Prendes <[email protected]>
  • Loading branch information
jprendes committed Oct 26, 2023
1 parent f5656b3 commit de051f6
Show file tree
Hide file tree
Showing 15 changed files with 2,987 additions and 1,930 deletions.
986 changes: 639 additions & 347 deletions containerd-shim-lunatic-v1/Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions containerd-shim-lunatic-v1/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
containerd-shim = "0.5.0"
containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "4d212b968d24d42a27952e8b04979382b543a613", features = ["cgroupsv1", "cgroupsv2"] }
containerd-shim-wasm = { git = "https://github.com/containerd/runwasi", rev = "5a0a47a9ad79f7ae19153897486b8621c8d6a58e" }
log = "~0.4"
anyhow = "1.0.72"
chrono = { version = "0.4.26", features = ["std"] }
Expand Down
25 changes: 2 additions & 23 deletions containerd-shim-lunatic-v1/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
use std::env;

use containerd_shim::{parse, run};
use containerd_shim_wasm::container::Instance;
use containerd_shim_wasm::sandbox::ShimCli;

use engine::LunaticEngine;

type LunaticInstance = Instance<LunaticEngine>;
use containerd_shim_wasm::sandbox::cli::{revision, shim_main, version};

mod common;
mod engine;

fn parse_version() {
let os_args: Vec<_> = env::args_os().collect();
let flags = parse(&os_args[1..]).unwrap();
if flags.version {
println!("{}:", os_args[0].to_string_lossy());
println!(" Version: {}", env!("CARGO_PKG_VERSION"));
println!(" Revision: {}", env!("CARGO_GIT_HASH"));
println!();

std::process::exit(0);
}
}

fn main() {
parse_version();
run::<ShimCli<LunaticInstance>>("io.containerd.lunatic.v1", None);
shim_main::<Instance<engine::LunaticEngine>>("lunatic", version!(), revision!(), None);
}
Loading

0 comments on commit de051f6

Please sign in to comment.