Skip to content

Commit 264590c

Browse files
committed
Auto merge of #128699 - RalfJung:miri-sync, r=RalfJung
Miri subtree update r? `@ghost`
2 parents 6e32da9 + 7e08769 commit 264590c

33 files changed

+978
-624
lines changed

Cargo.lock

+135-102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ default-run = "miri"
99
edition = "2021"
1010

1111
[lib]
12-
test = true # we have unit tests
12+
test = true # we have unit tests
1313
doctest = false # but no doc tests
1414

1515
[[bin]]
1616
name = "miri"
17-
test = false # we have no unit tests
17+
test = false # we have no unit tests
1818
doctest = false # and no doc tests
1919

2020
[dependencies]
@@ -42,6 +42,13 @@ libc = "0.2"
4242
libffi = "3.2.0"
4343
libloading = "0.8"
4444

45+
[target.'cfg(target_family = "windows")'.dependencies]
46+
windows-sys = { version = "0.52", features = [
47+
"Win32_Foundation",
48+
"Win32_System_IO",
49+
"Win32_Storage_FileSystem",
50+
] }
51+
4552
[dev-dependencies]
4653
colored = "2"
4754
ui_test = "0.21.1"

README.md

+13
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,19 @@ Miri provides some `extern` functions that programs can import to access
476476
Miri-specific functionality. They are declared in
477477
[/tests/utils/miri\_extern.rs](/tests/utils/miri_extern.rs).
478478

479+
## Entry point for no-std binaries
480+
481+
Binaries that do not use the standard library are expected to declare a function like this so that
482+
Miri knows where it is supposed to start execution:
483+
484+
```rust
485+
#[cfg(miri)]
486+
#[no_mangle]
487+
fn miri_start(argc: isize, argv: *const *const u8) -> isize {
488+
// Call the actual start function that your project implements, based on your target's conventions.
489+
}
490+
```
491+
479492
## Contributing and getting help
480493

481494
If you want to contribute to Miri, great! Please check out our

0 commit comments

Comments
 (0)