diff options
Diffstat (limited to 'tests/projects/rust')
4 files changed, 26 insertions, 0 deletions
diff --git a/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml b/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml new file mode 100644 index 000000000..724febaec --- /dev/null +++ b/tests/projects/rust/cargo_deps_without_std/.cargo/config.toml @@ -0,0 +1,2 @@ +[build] +target = "aarch64-unknown-none" diff --git a/tests/projects/rust/cargo_deps_without_std/Cargo.toml b/tests/projects/rust/cargo_deps_without_std/Cargo.toml new file mode 100644 index 000000000..6761593dc --- /dev/null +++ b/tests/projects/rust/cargo_deps_without_std/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "demo" +version = "0.1.0" +edition = "2021" + +[dependencies] +spin = "^0.9" diff --git a/tests/projects/rust/cargo_deps_without_std/src/main.rs b/tests/projects/rust/cargo_deps_without_std/src/main.rs new file mode 100644 index 000000000..c7ce4ff1c --- /dev/null +++ b/tests/projects/rust/cargo_deps_without_std/src/main.rs @@ -0,0 +1,10 @@ +// src/main.rs +#![no_main] +#![no_std] + +use core::panic::PanicInfo; + +#[panic_handler] +fn panic(_panic: &PanicInfo<'_>) -> ! { + loop {} +} diff --git a/tests/projects/rust/cargo_deps_without_std/xmake.lua b/tests/projects/rust/cargo_deps_without_std/xmake.lua new file mode 100644 index 000000000..b9f878c13 --- /dev/null +++ b/tests/projects/rust/cargo_deps_without_std/xmake.lua @@ -0,0 +1,7 @@ +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") |
