mirror of
https://github.com/edera-dev/krata.git
synced 2025-08-02 21:00:55 +00:00
krata: split out runtime
This commit is contained in:
parent
56dd3ea032
commit
c0eeab4047
99
Cargo.toml
99
Cargo.toml
@ -7,8 +7,9 @@ members = [
|
||||
"libs/advmac",
|
||||
"libs/loopdev",
|
||||
"shared",
|
||||
"daemon",
|
||||
"guest",
|
||||
"runtime",
|
||||
"daemon",
|
||||
"network",
|
||||
"controller",
|
||||
]
|
||||
@ -19,62 +20,65 @@ version = "0.0.1"
|
||||
|
||||
[workspace.dependencies]
|
||||
anyhow = "1.0"
|
||||
thiserror = "1.0"
|
||||
log = "0.4.20"
|
||||
libc = "0.2"
|
||||
nix = "0.28.0"
|
||||
arrayvec = "0.7.4"
|
||||
async-stream = "0.3.5"
|
||||
async-trait = "0.1.77"
|
||||
backhand = "0.14.2"
|
||||
byteorder = "1"
|
||||
slice-copy = "0.3.0"
|
||||
memchr = "2"
|
||||
xz2 = "0.1"
|
||||
flate2 = "1.0"
|
||||
bytes = "1.5.0"
|
||||
cli-tables = "0.2.1"
|
||||
directories = "5.0.1"
|
||||
elf = "0.7.4"
|
||||
env_logger = "0.11.0"
|
||||
errno = "0.3.0"
|
||||
oci-spec = "0.6.4"
|
||||
backhand = "0.14.2"
|
||||
sha256 = "1.5.0"
|
||||
serde_json = "1.0.113"
|
||||
walkdir = "2"
|
||||
directories = "5.0.1"
|
||||
tar = "0.4.40"
|
||||
zstd = "0.13.0"
|
||||
termion = "3.0.0"
|
||||
path-clean = "1.0.1"
|
||||
url = "2.5.0"
|
||||
cli-tables = "0.2.1"
|
||||
rand = "0.8.5"
|
||||
arrayvec = "0.7.4"
|
||||
rtnetlink = "0.14.1"
|
||||
netlink-packet-route = "0.19.0"
|
||||
etherparse = "0.14.2"
|
||||
flate2 = "1.0"
|
||||
futures = "0.3.30"
|
||||
ipnetwork = "0.20.0"
|
||||
udp-stream = "0.0.11"
|
||||
smoltcp = "0.11.0"
|
||||
etherparse = "0.14.2"
|
||||
async-trait = "0.1.77"
|
||||
bytes = "1.5.0"
|
||||
libc = "0.2"
|
||||
log = "0.4.20"
|
||||
memchr = "2"
|
||||
netlink-packet-route = "0.19.0"
|
||||
nix = "0.28.0"
|
||||
oci-spec = "0.6.4"
|
||||
path-absolutize = "3.1.1"
|
||||
tokio-tun = "0.11.2"
|
||||
tokio-listener = "0.3.1"
|
||||
trait-variant = "0.1.1"
|
||||
tokio-native-tls = "0.3.1"
|
||||
signal-hook = "0.3.17"
|
||||
tonic-build = "0.11.0"
|
||||
path-clean = "1.0.1"
|
||||
prost = "0.12.3"
|
||||
async-stream = "0.3.5"
|
||||
rand = "0.8.5"
|
||||
rtnetlink = "0.14.1"
|
||||
serde_json = "1.0.113"
|
||||
sha256 = "1.5.0"
|
||||
signal-hook = "0.3.17"
|
||||
slice-copy = "0.3.0"
|
||||
smoltcp = "0.11.0"
|
||||
tar = "0.4.40"
|
||||
termion = "3.0.0"
|
||||
thiserror = "1.0"
|
||||
tokio-listener = "0.3.1"
|
||||
tokio-native-tls = "0.3.1"
|
||||
tokio-tun = "0.11.2"
|
||||
tonic-build = "0.11.0"
|
||||
tower = "0.4.13"
|
||||
trait-variant = "0.1.1"
|
||||
udp-stream = "0.0.11"
|
||||
url = "2.5.0"
|
||||
walkdir = "2"
|
||||
xz2 = "0.1"
|
||||
zstd = "0.13.0"
|
||||
|
||||
[workspace.dependencies.uuid]
|
||||
version = "1.6.1"
|
||||
features = ["v4"]
|
||||
[workspace.dependencies.clap]
|
||||
version = "4.4.18"
|
||||
features = ["derive"]
|
||||
|
||||
[workspace.dependencies.reqwest]
|
||||
version = "0.11.24"
|
||||
|
||||
[workspace.dependencies.sys-mount]
|
||||
version = "3.0.0"
|
||||
default-features = false
|
||||
|
||||
[workspace.dependencies.clap]
|
||||
version = "4.4.18"
|
||||
[workspace.dependencies.serde]
|
||||
version = "1.0.196"
|
||||
features = ["derive"]
|
||||
|
||||
[workspace.dependencies.tokio]
|
||||
@ -85,13 +89,10 @@ features = ["macros", "rt", "rt-multi-thread", "io-util"]
|
||||
version = "0.1"
|
||||
features = ["io-util", "net"]
|
||||
|
||||
[workspace.dependencies.reqwest]
|
||||
version = "0.11.24"
|
||||
|
||||
[workspace.dependencies.serde]
|
||||
version = "1.0.196"
|
||||
features = ["derive"]
|
||||
|
||||
[workspace.dependencies.tonic]
|
||||
version = "0.11.0"
|
||||
features = ["tls"]
|
||||
|
||||
[workspace.dependencies.uuid]
|
||||
version = "1.6.1"
|
||||
features = ["v4"]
|
||||
|
@ -6,26 +6,24 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
log = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
cli-tables = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
krata = { path = "../shared" }
|
||||
log = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
termion = { workspace = true }
|
||||
cli-tables = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tokio-native-tls = { workspace = true }
|
||||
url = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tonic = { workspace = true }
|
||||
tower = { workspace = true }
|
||||
tonic = { workspace = true}
|
||||
async-stream = { workspace = true }
|
||||
|
||||
[dependencies.krata]
|
||||
path = "../shared"
|
||||
url = { workspace = true }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "kratactl"
|
||||
|
||||
[[bin]]
|
||||
name = "kratactl"
|
||||
|
@ -6,56 +6,22 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
log = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
zstd = { workspace = true }
|
||||
flate2 = { workspace = true }
|
||||
tar = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
sha256 = { workspace = true }
|
||||
url = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
path-clean = { workspace = true }
|
||||
termion = { workspace = true }
|
||||
cli-tables = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
oci-spec = { workspace = true }
|
||||
backhand = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
ipnetwork = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
signal-hook = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
tonic = { workspace = true, features = ["tls"]}
|
||||
|
||||
[dependencies.krata]
|
||||
path = "../shared"
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["process"]
|
||||
|
||||
[dependencies.advmac]
|
||||
path = "../libs/advmac"
|
||||
|
||||
[dependencies.loopdev]
|
||||
path = "../libs/loopdev"
|
||||
|
||||
[dependencies.xenclient]
|
||||
path = "../libs/xen/xenclient"
|
||||
|
||||
[dependencies.xenstore]
|
||||
path = "../libs/xen/xenstore"
|
||||
async-trait = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
krata = { path = "../shared" }
|
||||
kratart = { path = "../runtime" }
|
||||
log = { workspace = true }
|
||||
signal-hook = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tonic = { workspace = true, features = ["tls"] }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "kratad"
|
||||
|
||||
[[bin]]
|
||||
name = "kratad"
|
||||
|
@ -2,7 +2,8 @@ use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use env_logger::Env;
|
||||
use krata::dial::ControlDialAddress;
|
||||
use kratad::{runtime::Runtime, Daemon};
|
||||
use kratad::Daemon;
|
||||
use kratart::Runtime;
|
||||
use std::{
|
||||
str::FromStr,
|
||||
sync::{atomic::AtomicBool, Arc},
|
||||
|
@ -14,10 +14,8 @@ use tokio::{
|
||||
use tokio_stream::StreamExt;
|
||||
use tonic::{Request, Response, Status, Streaming};
|
||||
|
||||
use crate::{
|
||||
event::DaemonEventContext,
|
||||
runtime::{launch::GuestLaunchRequest, Runtime},
|
||||
};
|
||||
use crate::event::DaemonEventContext;
|
||||
use kratart::{launch::GuestLaunchRequest, Runtime};
|
||||
|
||||
pub struct ApiError {
|
||||
message: String,
|
||||
@ -67,19 +65,19 @@ impl ControlService for RuntimeControlService {
|
||||
request: Request<LaunchGuestRequest>,
|
||||
) -> Result<Response<LaunchGuestReply>, Status> {
|
||||
let request = request.into_inner();
|
||||
let guest: GuestInfo = self
|
||||
.runtime
|
||||
.launch(GuestLaunchRequest {
|
||||
image: &request.image,
|
||||
vcpus: request.vcpus,
|
||||
mem: request.mem,
|
||||
env: empty_vec_optional(request.env),
|
||||
run: empty_vec_optional(request.run),
|
||||
debug: false,
|
||||
})
|
||||
.await
|
||||
.map_err(ApiError::from)?
|
||||
.into();
|
||||
let guest: GuestInfo = convert_guest_info(
|
||||
self.runtime
|
||||
.launch(GuestLaunchRequest {
|
||||
image: &request.image,
|
||||
vcpus: request.vcpus,
|
||||
mem: request.mem,
|
||||
env: empty_vec_optional(request.env),
|
||||
run: empty_vec_optional(request.run),
|
||||
debug: false,
|
||||
})
|
||||
.await
|
||||
.map_err(ApiError::from)?,
|
||||
);
|
||||
Ok(Response::new(LaunchGuestReply { guest: Some(guest) }))
|
||||
}
|
||||
|
||||
@ -103,7 +101,7 @@ impl ControlService for RuntimeControlService {
|
||||
let guests = self.runtime.list().await.map_err(ApiError::from)?;
|
||||
let guests = guests
|
||||
.into_iter()
|
||||
.map(GuestInfo::from)
|
||||
.map(convert_guest_info)
|
||||
.collect::<Vec<GuestInfo>>();
|
||||
Ok(Response::new(ListGuestsReply { guests }))
|
||||
}
|
||||
@ -173,17 +171,6 @@ impl ControlService for RuntimeControlService {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<crate::runtime::GuestInfo> for GuestInfo {
|
||||
fn from(value: crate::runtime::GuestInfo) -> Self {
|
||||
GuestInfo {
|
||||
id: value.uuid.to_string(),
|
||||
image: value.image,
|
||||
ipv4: value.ipv4.map(|x| x.ip().to_string()).unwrap_or_default(),
|
||||
ipv6: value.ipv6.map(|x| x.ip().to_string()).unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn empty_vec_optional<T>(value: Vec<T>) -> Option<Vec<T>> {
|
||||
if value.is_empty() {
|
||||
None
|
||||
@ -191,3 +178,12 @@ fn empty_vec_optional<T>(value: Vec<T>) -> Option<Vec<T>> {
|
||||
Some(value)
|
||||
}
|
||||
}
|
||||
|
||||
fn convert_guest_info(value: kratart::GuestInfo) -> GuestInfo {
|
||||
GuestInfo {
|
||||
id: value.uuid.to_string(),
|
||||
image: value.image,
|
||||
ipv4: value.ipv4.map(|x| x.ip().to_string()).unwrap_or_default(),
|
||||
ipv6: value.ipv6.map(|x| x.ip().to_string()).unwrap_or_default(),
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ use log::error;
|
||||
use tokio::{sync::broadcast, task::JoinHandle, time};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::runtime::{GuestInfo, Runtime};
|
||||
use kratart::{GuestInfo, Runtime};
|
||||
|
||||
pub type DaemonEvent = krata::control::watch_events_reply::Event;
|
||||
|
||||
|
@ -4,15 +4,14 @@ use anyhow::Result;
|
||||
use control::RuntimeControlService;
|
||||
use event::{DaemonEventContext, DaemonEventGenerator};
|
||||
use krata::{control::control_service_server::ControlServiceServer, dial::ControlDialAddress};
|
||||
use kratart::Runtime;
|
||||
use log::info;
|
||||
use runtime::Runtime;
|
||||
use tokio::{net::UnixListener, task::JoinHandle};
|
||||
use tokio_stream::wrappers::UnixListenerStream;
|
||||
use tonic::transport::{Identity, Server, ServerTlsConfig};
|
||||
|
||||
pub mod control;
|
||||
pub mod event;
|
||||
pub mod runtime;
|
||||
|
||||
pub struct Daemon {
|
||||
store: String,
|
||||
|
@ -6,32 +6,25 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
log = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
ipnetwork = { workspace = true }
|
||||
krata = { path = "../shared" }
|
||||
log = { workspace = true }
|
||||
nix = { workspace = true, features = ["process"] }
|
||||
oci-spec = { workspace = true }
|
||||
path-absolutize = { workspace = true }
|
||||
rtnetlink = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
sys-mount = { workspace = true }
|
||||
oci-spec = { workspace = true }
|
||||
rtnetlink = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
ipnetwork = { workspace = true }
|
||||
path-absolutize = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["process"]
|
||||
|
||||
[dependencies.krata]
|
||||
path = "../shared"
|
||||
|
||||
[dependencies.xenstore]
|
||||
path = "../libs/xen/xenstore"
|
||||
walkdir = { workspace = true }
|
||||
xenstore = { path = "../libs/xen/xenstore" }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "krataguest"
|
||||
|
||||
[[bin]]
|
||||
name = "krataguest"
|
||||
|
@ -1,16 +1,15 @@
|
||||
# This package is from https://github.com/GamePad64/advmac
|
||||
# Edera maintains an in-tree version because of dependencies
|
||||
# being out of date.
|
||||
# Edera maintains an in-tree version because of dependencies being out of date.
|
||||
[package]
|
||||
name = "advmac"
|
||||
version.workspace = true
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
|
||||
[dependencies]
|
||||
arrayvec = { workspace = true, features = ["serde"] }
|
||||
rand = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
||||
[lib]
|
||||
name = "advmac"
|
||||
|
||||
[dependencies]
|
||||
serde = { workspace = true }
|
||||
rand = { workspace = true }
|
||||
arrayvec = { workspace = true, features = ["serde"] }
|
||||
|
21
libs/advmac/LICENSE
Normal file
21
libs/advmac/LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2022 Alexander Shishenko
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
@ -8,13 +8,10 @@ version.workspace = true
|
||||
license = "MIT"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
name = "loopdev"
|
||||
|
||||
[dependencies]
|
||||
errno = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
nix = { workspace = true, features = ["ioctl"] }
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["ioctl"]
|
||||
[lib]
|
||||
name = "loopdev"
|
||||
|
@ -4,18 +4,15 @@ version.workspace = true
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
thiserror = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
nix = { workspace = true, features = ["ioctl"] }
|
||||
thiserror = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["ioctl"]
|
||||
[lib]
|
||||
name = "xencall"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = { workspace = true }
|
||||
|
@ -5,28 +5,24 @@ edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
thiserror = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
elf = { workspace = true }
|
||||
flate2 = { workspace = true }
|
||||
xz2 = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
memchr = { workspace = true }
|
||||
slice-copy = { workspace = true }
|
||||
log = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
[dependencies.xencall]
|
||||
path = "../xencall"
|
||||
|
||||
[dependencies.xenstore]
|
||||
path = "../xenstore"
|
||||
uuid = { workspace = true }
|
||||
xz2 = { workspace = true }
|
||||
xencall = { path = "../xencall" }
|
||||
xenstore = { path = "../xenstore" }
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = { workspace = true }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "xenclient"
|
||||
|
||||
[[example]]
|
||||
name = "xenclient-boot"
|
||||
|
@ -5,16 +5,13 @@ edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["ioctl"]
|
||||
thiserror = { workspace = true }
|
||||
nix = { workspace = true, features = ["ioctl"] }
|
||||
tokio = { workspace = true }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "xenevtchn"
|
||||
|
||||
[[example]]
|
||||
name = "xenevtchn-simple"
|
||||
|
@ -4,16 +4,16 @@ version.workspace = true
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
|
||||
[dependencies]
|
||||
thiserror = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
byteorder = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
thiserror = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
|
||||
[lib]
|
||||
name = "xenstore"
|
||||
|
||||
[dev-dependencies]
|
||||
env_logger = { workspace = true }
|
||||
|
@ -5,31 +5,27 @@ edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
advmac = { path = "../libs/advmac" }
|
||||
anyhow = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
log = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
rtnetlink = { workspace = true }
|
||||
netlink-packet-route = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
etherparse = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
udp-stream = { workspace = true }
|
||||
log = { workspace = true }
|
||||
netlink-packet-route = { workspace = true }
|
||||
rtnetlink = { workspace = true }
|
||||
smoltcp = { workspace = true }
|
||||
etherparse = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-tun = { workspace = true }
|
||||
|
||||
[dependencies.advmac]
|
||||
path = "../libs/advmac"
|
||||
|
||||
[dependencies.xenstore]
|
||||
path = "../libs/xen/xenstore"
|
||||
udp-stream = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
xenstore = { path = "../libs/xen/xenstore" }
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "kratanet"
|
||||
|
||||
[[bin]]
|
||||
name = "kratanet"
|
||||
|
45
runtime/Cargo.toml
Normal file
45
runtime/Cargo.toml
Normal file
@ -0,0 +1,45 @@
|
||||
[package]
|
||||
name = "kratart"
|
||||
version.workspace = true
|
||||
edition = "2021"
|
||||
resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
advmac = { path = "../libs/advmac" }
|
||||
anyhow = { workspace = true }
|
||||
async-stream = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
backhand = { workspace = true }
|
||||
bytes = { workspace = true }
|
||||
clap = { workspace = true }
|
||||
cli-tables = { workspace = true }
|
||||
directories = { workspace = true }
|
||||
env_logger = { workspace = true }
|
||||
flate2 = { workspace = true }
|
||||
futures = { workspace = true }
|
||||
ipnetwork = { workspace = true }
|
||||
krata = { path = "../shared" }
|
||||
log = { workspace = true }
|
||||
loopdev = { path = "../libs/loopdev" }
|
||||
nix = { workspace = true, features = ["process"] }
|
||||
oci-spec = { workspace = true }
|
||||
path-clean = { workspace = true }
|
||||
reqwest = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
serde_json = { workspace = true }
|
||||
sha256 = { workspace = true }
|
||||
signal-hook = { workspace = true }
|
||||
tar = { workspace = true }
|
||||
termion = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tokio-stream = { workspace = true }
|
||||
tonic = { workspace = true, features = ["tls"] }
|
||||
url = { workspace = true }
|
||||
uuid = { workspace = true }
|
||||
walkdir = { workspace = true }
|
||||
zstd = { workspace = true }
|
||||
xenclient = { path = "../libs/xen/xenclient" }
|
||||
xenstore = { path = "../libs/xen/xenstore" }
|
||||
|
||||
[lib]
|
||||
name = "kratart"
|
@ -1,4 +1,4 @@
|
||||
use crate::runtime::image::ImageInfo;
|
||||
use crate::image::ImageInfo;
|
||||
use anyhow::Result;
|
||||
use backhand::{FilesystemWriter, NodeHeader};
|
||||
use krata::launchcfg::LaunchInfo;
|
@ -2,9 +2,9 @@ pub mod cache;
|
||||
pub mod fetch;
|
||||
pub mod name;
|
||||
|
||||
use crate::runtime::image::cache::ImageCache;
|
||||
use crate::runtime::image::fetch::RegistryClient;
|
||||
use crate::runtime::image::name::ImageName;
|
||||
use crate::image::cache::ImageCache;
|
||||
use crate::image::fetch::RegistryClient;
|
||||
use crate::image::name::ImageName;
|
||||
use anyhow::{anyhow, Result};
|
||||
use backhand::compression::Compressor;
|
||||
use backhand::{FilesystemCompressor, FilesystemWriter, NodeHeader};
|
@ -11,9 +11,9 @@ use uuid::Uuid;
|
||||
use xenclient::{DomainConfig, DomainDisk, DomainNetworkInterface};
|
||||
use xenstore::client::XsdInterface;
|
||||
|
||||
use crate::runtime::cfgblk::ConfigBlock;
|
||||
use crate::runtime::image::{cache::ImageCache, name::ImageName, ImageCompiler, ImageInfo};
|
||||
use crate::runtime::RuntimeContext;
|
||||
use crate::cfgblk::ConfigBlock;
|
||||
use crate::image::{cache::ImageCache, name::ImageName, ImageCompiler, ImageInfo};
|
||||
use crate::RuntimeContext;
|
||||
|
||||
use super::{GuestInfo, GuestState};
|
||||
|
@ -6,23 +6,20 @@ resolver = "2"
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
libc = { workspace = true }
|
||||
log = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
url = { workspace = true }
|
||||
tonic = { workspace = true }
|
||||
nix = { workspace = true, features = ["ioctl", "socket"] }
|
||||
prost = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
tokio = { workspace = true }
|
||||
tonic = { workspace = true }
|
||||
url = { workspace = true }
|
||||
|
||||
[build-dependencies]
|
||||
tonic-build = { workspace = true }
|
||||
|
||||
[dependencies.nix]
|
||||
workspace = true
|
||||
features = ["ioctl", "socket"]
|
||||
|
||||
[lib]
|
||||
path = "src/lib.rs"
|
||||
name = "krata"
|
||||
|
||||
[[example]]
|
||||
name = "ethtool"
|
||||
|
Loading…
Reference in New Issue
Block a user