Skip to content

Commit

Permalink
Split binaries from brioche-pack crate into separate crates
Browse files Browse the repository at this point in the history
  • Loading branch information
kylewlacy committed Dec 31, 2023
1 parent 4dbe572 commit d9f7915
Show file tree
Hide file tree
Showing 10 changed files with 78 additions and 8 deletions.
24 changes: 19 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,25 @@ jobs:
--target x86_64-unknown-linux-musl \
--component rust-src
- name: Build Brioche
run: cargo build --release --target=x86_64-unknown-linux-gnu
- name: Build brioche-pack
run: |
cargo build \
--all \
--bin brioche \
--release \
--target=x86_64-unknown-linux-gnu
- name: Build brioche-pack tools
run: |
cargo build \
--all \
--bin brioche-packer \
--bin brioche-ld \
--release \
--target=x86_64-unknown-linux-musl
cargo +"$NIGHTLY_TOOLCHAIN" build \
-p brioche-pack \
--all \
--bin brioche-packed-exec \
--bin brioche-packed-userland-exec \
--profile=release-tiny \
--target=x86_64-unknown-linux-musl \
-Z 'build-std=std,panic_abort' \
Expand All @@ -65,10 +79,10 @@ jobs:
target/x86_64-unknown-linux-gnu/release/brioche \
artifacts/brioche/x86_64-linux/
cp \
target/x86_64-unknown-linux-musl/release-tiny/brioche-ld \
target/x86_64-unknown-linux-musl/release/brioche-packer \
target/x86_64-unknown-linux-musl/release/brioche-ld \
target/x86_64-unknown-linux-musl/release-tiny/brioche-packed-exec \
target/x86_64-unknown-linux-musl/release-tiny/brioche-packed-userland-exec \
target/x86_64-unknown-linux-musl/release-tiny/brioche-packer \
artifacts/brioche-pack/x86_64-linux/
(cd artifacts/brioche-pack/x86_64-linux/ && tar --zstd -cf ../../brioche/x86_64-linux/brioche-pack.tar.zstd .)
tree --du -h artifacts/brioche-pack
Expand Down
29 changes: 29 additions & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["crates/brioche", "crates/brioche-pack"]
members = ["crates/brioche", "crates/brioche-ld", "crates/brioche-pack", "crates/brioche-packed-exec", "crates/brioche-packed-userland-exec"]
default-members = ["crates/brioche"]
resolver = "2"

Expand Down
10 changes: 10 additions & 0 deletions crates/brioche-ld/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "brioche-ld"
version = "0.1.0"
edition = "2021"

[dependencies]
brioche-pack = { path = "../brioche-pack" }
bstr = "1.8.0"
goblin = "0.7.1"
thiserror = "1.0.51"
File renamed without changes.
9 changes: 9 additions & 0 deletions crates/brioche-packed-exec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "brioche-packed-exec"
version = "0.1.0"
edition = "2021"

[dependencies]
brioche-pack = { path = "../brioche-pack" }
bstr = "1.8.0"
thiserror = "1.0.51"
File renamed without changes.
10 changes: 10 additions & 0 deletions crates/brioche-packed-userland-exec/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[package]
name = "brioche-packed-userland-exec"
version = "0.1.0"
edition = "2021"

[dependencies]
brioche-pack = { path = "../brioche-pack" }
bstr = "1.8.0"
thiserror = "1.0.51"
userland-execve = { git = "https://github.com/brioche-dev/userland-execve-rust.git" }
2 changes: 0 additions & 2 deletions crates/brioche/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name = "brioche"
version = "0.0.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = { version = "1.0.75", features = ["backtrace"] }
async-compression = { version = "0.4.5", features = ["tokio", "gzip", "xz", "zstd"] }
Expand Down

0 comments on commit d9f7915

Please sign in to comment.