Skip to content

Commit

Permalink
feat: embedded base image
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelcoeffic committed Nov 4, 2024
1 parent ef5e63f commit d664b30
Show file tree
Hide file tree
Showing 12 changed files with 540 additions and 207 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
/ofs
nix
image_builder/base.tar.xz
base.tar.xz
27 changes: 27 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 29 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,45 @@ name = "dive"
version = "0.1.0"
edition = "2021"

[features]
embedded_image = []

[workspace]
members = [
"image_builder",
]

[dependencies]
[workspace.dependencies]
anyhow = "1.0.89"
clap = { version = "4.5.20", features = ["derive", "env"] }
env_logger = "0.11.5"
exitcode = "1.1.2"
indicatif = "0.17.8"
log = "0.4.22"
procfs = { version= "0.17.0" }
liblzma = { version = "0.3.4", features = ["static"] }
rustix = { version = "0.38.37", features = ["process", "thread", "mount", "fs"] }
tar = "0.4.42"
tempfile = "3.13.0"

[dependencies]
anyhow = { workspace = true }
clap = { workspace = true }
dirs = "5.0"
env_logger = { workspace = true }
exitcode = "1.1.2"
image_builder = { path = "image_builder" }
indicatif = { workspace = true }
log = { workspace = true }
liblzma = { workspace = true }
procfs = { version= "0.17.0" }
rustix = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tar = { workspace = true }
tempfile = { workspace = true }
which = "6.0.3"
image_builder = { path = "image_builder" }
dirs = "5.0"

[[bin]]
name = "dive"

[[bin]]
name = "build-img"
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ cargo build --release

# Optional: Install system-wide
cargo install --path .

# Optional: Build static binary
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=aarch64-linux-gnu-gcc
export CC=aarch64-linux-gnu-gcc
rustup target add aarch64-unknown-linux-musl
cargo build --target=aarch64-unknown-linux-musl
```

## Usage
Expand Down
19 changes: 10 additions & 9 deletions image_builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ version = "0.1.0"
edition = "2021"

[dependencies]
anyhow = "1.0.91"
indicatif = "0.17.8"
liblzma = { version = "0.3.4", features = ["static"] }
anyhow = { workspace = true }
clap = { workspace = true }
env_logger = { workspace = true }
include_dir = "0.7.4"
indicatif = { workspace = true }
liblzma = { workspace = true }
log = { workspace = true }
regex = "1.11.1"
reqwest = { version = "0.12.8", default-features = false, features = ["blocking", "rustls-tls"] }
rustix = { version = "0.38.37", features = ["process", "thread", "mount", "fs", "runtime"] }
tar = "0.4.42"
tempfile = "3.13.0"

[[bin]]
name = "build-img"
rustix = { workspace = true, features = ["runtime"] }
tar = { workspace = true }
tempfile = { workspace = true }
80 changes: 0 additions & 80 deletions image_builder/src/bin/build-img.rs

This file was deleted.

62 changes: 62 additions & 0 deletions image_builder/src/debug-shell/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d664b30

Please sign in to comment.