Skip to content

Commit 1923044

Browse files
author
hyd-dev
committed
Add a cdylib-only crate test
1 parent 51c6f51 commit 1923044

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed

test-cargo-miri/Cargo.lock

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test-cargo-miri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ edition = "2018"
99

1010
[dependencies]
1111
byteorder = "1.0"
12+
cdylib = { path = "cdylib" }
1213
issue_1567 = { path = "issue-1567" }
1314
issue_1691 = { path = "issue-1691" }
1415
issue_1705 = { path = "issue-1705" }

test-cargo-miri/cdylib/Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[package]
2+
name = "cdylib"
3+
version = "0.1.0"
4+
authors = ["Miri Team"]
5+
edition = "2018"
6+
7+
[lib]
8+
# cargo-miri used to handle `cdylib` crate-type specially (https://github.com/rust-lang/miri/pull/1577).
9+
crate-type = ["cdylib"]
10+
11+
[dependencies]
12+
byteorder = "1.0"

test-cargo-miri/cdylib/src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
use byteorder::{BigEndian, ByteOrder};
2+
3+
#[no_mangle]
4+
extern "C" fn use_the_dependency() {
5+
let _n = <BigEndian as ByteOrder>::read_u64(&[1,2,3,4,5,6,7,8]);
6+
}

0 commit comments

Comments
 (0)