diff options
| author | ruki <[email protected]> | 2023-08-08 23:46:13 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-08-08 23:46:13 +0800 |
| commit | 1494182a09187cf49edc9a19badc3be287e8a327 (patch) | |
| tree | 813eca4bc9baf33b3f305cce48c408612c4784e1 /tests/projects/rust | |
| parent | 75e7ddd9d604fc4c762dbc0e187c4a0d0ae231cc (diff) | |
improve rust deps to support cross build
Diffstat (limited to 'tests/projects/rust')
| -rw-r--r-- | tests/projects/rust/cargo_deps_cross_build/Cargo.toml (renamed from tests/projects/rust/cargo_deps_without_std/Cargo.toml) | 0 | ||||
| -rw-r--r-- | tests/projects/rust/cargo_deps_cross_build/src/main.rs (renamed from tests/projects/rust/cargo_deps_without_std/src/main.rs) | 0 | ||||
| -rw-r--r-- | tests/projects/rust/cargo_deps_cross_build/xmake.lua | 11 | ||||
| -rw-r--r-- | tests/projects/rust/cargo_deps_without_std/.cargo/config.toml | 2 | ||||
| -rw-r--r-- | tests/projects/rust/cargo_deps_without_std/xmake.lua | 7 |
5 files changed, 11 insertions, 9 deletions
diff --git a/tests/projects/rust/cargo_deps_without_std/Cargo.toml b/tests/projects/rust/cargo_deps_cross_build/Cargo.toml index 6761593dc..6761593dc 100644 --- a/tests/projects/rust/cargo_deps_without_std/Cargo.toml +++ b/tests/projects/rust/cargo_deps_cross_build/Cargo.toml diff --git a/tests/projects/rust/cargo_deps_without_std/src/main.rs b/tests/projects/rust/cargo_deps_cross_build/src/main.rs index c7ce4ff1c..c7ce4ff1c 100644 --- a/tests/projects/rust/cargo_deps_without_std/src/main.rs +++ b/tests/projects/rust/cargo_deps_cross_build/src/main.rs diff --git a/tests/projects/rust/cargo_deps_cross_build/xmake.lua b/tests/projects/rust/cargo_deps_cross_build/xmake.lua new file mode 100644 index 000000000..6327b2e17 --- /dev/null +++ b/tests/projects/rust/cargo_deps_cross_build/xmake.lua @@ -0,0 +1,11 @@ +add_rules("mode.release", "mode.debug") +add_requires("cargo::test", {configs = { + std = false, + main = false, + build_target = "aarch64-unknown-none", + cargo_toml = path.join(os.projectdir(), "Cargo.toml")}}) + +target("test") + set_kind("binary") + add_files("src/main.rs") + add_packages("cargo::test") diff --git a/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml b/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml deleted file mode 100644 index 724febaec..000000000 --- a/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml +++ /dev/null @@ -1,2 +0,0 @@ -[build] -target = "aarch64-unknown-none" diff --git a/tests/projects/rust/cargo_deps_without_std/xmake.lua b/tests/projects/rust/cargo_deps_without_std/xmake.lua deleted file mode 100644 index b9f878c13..000000000 --- a/tests/projects/rust/cargo_deps_without_std/xmake.lua +++ /dev/null @@ -1,7 +0,0 @@ -add_rules("mode.release", "mode.debug") -add_requires("cargo::test", {configs = {cargo_toml = path.join(os.projectdir(), "Cargo.toml")}}) - -target("test") - set_kind("binary") - add_files("src/main.rs") - add_packages("cargo::test") |
