Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Leshiy committed Dec 7, 2023
1 parent 2e931b8 commit 69446cd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
8 changes: 4 additions & 4 deletions docs/src/guides/languages/rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ VERSION 0.7
builder:
FROM ./../../earthly/rust+rust-base
COPY --dir .cargo .config benches src tests .
COPY --dir .cargo .config crates .
COPY Cargo.lock Cargo.toml .
COPY clippy.toml deny.toml rustfmt.toml .
Expand Down Expand Up @@ -145,12 +145,12 @@ The same approach we will see for the another targets of this guide.
build-hosted:
FROM +builder
DO ./../../earthly/rust+BUILD
DO ./../../earthly/rust+BUILD --libs="bar" --bins="foo/foo"
DO ./../../earthly/rust+SMOKE_TEST --bin=hello_world
DO ./../../earthly/rust+SMOKE_TEST --bin="foo"
SAVE ARTIFACT target/$TARGETARCH/doc doc
SAVE ARTIFACT target/$TARGETARCH/release/hello_world hello_world
SAVE ARTIFACT target/$TARGETARCH/release/foo foo
# Test which runs check with all supported host tooling. Needs qemu or rosetta to run.
# Only used to validate tooling is working across host toolsets.
Expand Down
5 changes: 5 additions & 0 deletions examples/rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,10 @@ members = [
"crates/bar",
]

[workspace.package]
edition = "2021"
version = "0.0.1"
license = "MIT OR Apache-2.0"



2 changes: 1 addition & 1 deletion examples/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ check-all-hosts:
build-hosted:
FROM +builder

DO ./../../earthly/rust+BUILD --bins="foo/foo"
DO ./../../earthly/rust+BUILD --libs="bar" --bins="foo/foo"

DO ./../../earthly/rust+SMOKE_TEST --bin="foo"

Expand Down
5 changes: 3 additions & 2 deletions examples/rust/crates/bar/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "bar"
version = "0.1.0"
edition = "2021"
version.workspace = true
edition.workspace = true
license.workspace = true

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

Expand Down
5 changes: 3 additions & 2 deletions examples/rust/crates/foo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[package]
name = "foo"
version = "0.1.0"
edition = "2021"
version.workspace = true
edition.workspace = true
license.workspace = true

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

Expand Down

0 comments on commit 69446cd

Please sign in to comment.