Replies: 1 comment
-
Thus distributed-verfication has a similar wrapper based on these tricks to reuse kani's libcore and libstd and know kani contracts in core/std. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Command in kani's cargo_build_std
src:
cargo_build_std
Custom Rustc Driver
A cli that wraps argument handling and forwards them to the Rust compiler.
The driver directly calls rustc by only emitting rustc arguments, but can have its own arguments besides rustc ones.
Kani injects its own dependencies through rustc arguments:
distributed-verification/src/main.rs
Lines 39 to 52 in 3325e49
Cargo Unstable Flags
-Zbuild-std=core,std
: compile the standard library itself as part of a crate graph compilation through Cargo-Zhost-config -Ztarget-applies-to-host
: pass flags to host build targets such as build scripts#[cfg(kani_host)]
, so an extra config--config=host.rustflags=[\"--cfg=kani_host\"]
is set; see kani#3244 and kani build processCargo Environment Variables
Doc: https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-reads
RUSTC=path/to/driver
: the bridge between a driver and cargo to invoke the driver after invoking cargoCARGO_ENCODED_RUSTFLAGS
: an OsString with arguments separated by0x1f
CARGO_TERM_PROGRESS_WHEN=never
: don't show progress barCargo Internals
The undocumented stuff that are only known among cargo developers.
__CARGO_TESTS_ONLY_SRC_ROOT=path/to/verify-rust-std/library
: a path to rustc'slibrary
folderstable_mir::find_crates("core")
to get Crate of libcore and filter in FnDefs annotated with kanitoolJson Messages
https://doc.rust-lang.org/cargo/reference/external-tools.html
--message-format
andcargo_metadata::Message::parse_stream
Beta Was this translation helpful? Give feedback.
All reactions