diff options
author | Alberto Sartori <alberto.sartori@huawei.com> | 2024-06-24 15:49:36 +0200 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-06-24 15:49:36 +0200 |
commit | f87ad41f72ca4465a0c5b4ba9fd36a7b09e4d4f4 (patch) | |
tree | 24d4a3a5975df2046714c6bc114d5d050bdc61fc /test/static-native | |
download | rules-rust-f87ad41f72ca4465a0c5b4ba9fd36a7b09e4d4f4.tar.gz |
Initial commit
Co-authored-by: Klaus Aehlig <klaus.aehlig@huawei.com>
Diffstat (limited to 'test/static-native')
-rw-r--r-- | test/static-native/TARGETS | 54 | ||||
-rw-r--r-- | test/static-native/bar.rs | 11 | ||||
-rw-r--r-- | test/static-native/baz.rs | 5 | ||||
-rw-r--r-- | test/static-native/foo.rs | 6 | ||||
-rw-r--r-- | test/static-native/main.rs | 6 |
5 files changed, 82 insertions, 0 deletions
diff --git a/test/static-native/TARGETS b/test/static-native/TARGETS new file mode 100644 index 0000000..2b26236 --- /dev/null +++ b/test/static-native/TARGETS @@ -0,0 +1,54 @@ +{ "baz-lib": + { "type": ["@", "rules", "rust", "library"] + , "name": ["baz"] + , "native": ["true"] + , "stage": ["baz"] + , "crate_root": ["baz.rs"] + , "edition": ["2021"] + , "version": ["1", "2", "3", "rc-1"] + } +, "bar-lib": + { "type": ["@", "rules", "rust", "library"] + , "name": ["bar"] + , "stage": ["bar"] + , "crate_root": ["bar.rs"] + , "edition": ["2021"] + , "deps": ["baz-lib"] + } +, "bar-missing-baz": + { "type": ["@", "rules", "rust", "library"] + , "name": ["bar"] + , "stage": ["bar"] + , "crate_root": ["bar.rs"] + , "edition": ["2021"] + } +, "foo-lib": + { "type": ["@", "rules", "rust", "library"] + , "name": ["foo"] + , "native": ["true"] + , "stage": ["foo"] + , "crate_root": ["foo.rs"] + , "edition": ["2021"] + , "deps": ["bar-lib"] + } +, "main": + { "type": ["@", "rules", "rust", "binary"] + , "name": ["main"] + , "stage": ["bin"] + , "crate_root": ["main.rs"] + , "deps": ["foo-lib"] + } +, "main-wrong-dep": + { "type": ["@", "rules", "rust", "binary"] + , "name": ["main"] + , "stage": ["bin"] + , "crate_root": ["main.rs"] + , "deps": ["bar-lib"] + } +, "main-missing-dep": + { "type": ["@", "rules", "rust", "binary"] + , "name": ["main"] + , "stage": ["bin"] + , "crate_root": ["main.rs"] + } +} diff --git a/test/static-native/bar.rs b/test/static-native/bar.rs new file mode 100644 index 0000000..6a0afce --- /dev/null +++ b/test/static-native/bar.rs @@ -0,0 +1,11 @@ + +extern crate baz; +pub fn hello(){ + baz::hello(); + println!("hello bar"); +} + +pub fn add(a: i32, b: i32) -> i32 { + a + b +} + diff --git a/test/static-native/baz.rs b/test/static-native/baz.rs new file mode 100644 index 0000000..4222589 --- /dev/null +++ b/test/static-native/baz.rs @@ -0,0 +1,5 @@ + +pub fn hello(){ + +println!("hello baz"); + }
\ No newline at end of file diff --git a/test/static-native/foo.rs b/test/static-native/foo.rs new file mode 100644 index 0000000..c2dca08 --- /dev/null +++ b/test/static-native/foo.rs @@ -0,0 +1,6 @@ +extern crate bar; +pub fn hello(){ + +bar::hello(); + println!("hello foo"); + }
\ No newline at end of file diff --git a/test/static-native/main.rs b/test/static-native/main.rs new file mode 100644 index 0000000..6da0e2e --- /dev/null +++ b/test/static-native/main.rs @@ -0,0 +1,6 @@ +extern crate foo; + +fn main() { + +foo::hello(); +} |