-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jorge Prendes <[email protected]>
- Loading branch information
Showing
15 changed files
with
2,987 additions
and
1,930 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains 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
This file contains 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
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); | ||
} |
Oops, something went wrong.