mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-10 02:56:52 +00:00
Add a cdylib
-only crate test
This commit is contained in:
parent
51c6f51c36
commit
1923044705
8
test-cargo-miri/Cargo.lock
generated
8
test-cargo-miri/Cargo.lock
generated
@ -11,6 +11,7 @@ name = "cargo-miri-test"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"cdylib",
|
||||
"issue_1567",
|
||||
"issue_1691",
|
||||
"issue_1705",
|
||||
@ -18,6 +19,13 @@ dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cdylib"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "0.1.10"
|
||||
|
@ -9,6 +9,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1.0"
|
||||
cdylib = { path = "cdylib" }
|
||||
issue_1567 = { path = "issue-1567" }
|
||||
issue_1691 = { path = "issue-1691" }
|
||||
issue_1705 = { path = "issue-1705" }
|
||||
|
12
test-cargo-miri/cdylib/Cargo.toml
Normal file
12
test-cargo-miri/cdylib/Cargo.toml
Normal file
@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "cdylib"
|
||||
version = "0.1.0"
|
||||
authors = ["Miri Team"]
|
||||
edition = "2018"
|
||||
|
||||
[lib]
|
||||
# cargo-miri used to handle `cdylib` crate-type specially (https://github.com/rust-lang/miri/pull/1577).
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
byteorder = "1.0"
|
6
test-cargo-miri/cdylib/src/lib.rs
Normal file
6
test-cargo-miri/cdylib/src/lib.rs
Normal file
@ -0,0 +1,6 @@
|
||||
use byteorder::{BigEndian, ByteOrder};
|
||||
|
||||
#[no_mangle]
|
||||
extern "C" fn use_the_dependency() {
|
||||
let _n = <BigEndian as ByteOrder>::read_u64(&[1,2,3,4,5,6,7,8]);
|
||||
}
|
Loading…
Reference in New Issue
Block a user