1
0
Fork 0
mirror of https://github.com/imjasonh/krust synced 2026-07-08 14:55:35 +00:00
krust/tests/testdata/build_example.txt
Jason Hall 4a2471c22d support building --example and --bin
Signed-off-by: Jason Hall <jason@chainguard.dev>
2025-10-15 18:06:54 -04:00

26 lines
689 B
Text

# Test building examples with --example flag
-- Cargo.toml --
[package]
name = "test-app"
version = "0.1.0"
edition = "2021"
[dependencies]
-- src/main.rs --
fn main() {
println!("Hello from main!");
}
-- examples/example_server.rs --
fn main() {
println!("Hello from example!");
}
# Build the example binary
[linux] env KRUST_REPO=ttl.sh/test exec ./krust build --no-push --platform linux/amd64 . -- --example example_server
[darwin] env KRUST_REPO=ttl.sh/test exec ./krust build --no-push --platform linux/amd64 . -- --example example_server
stderr 'Building Rust project'
stderr 'Successfully built binary'
stderr 'examples/example_server'
stderr 'Successfully built image'