Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,20 @@ process for such contributions:
This process is largely informal, and its primary goal is to more clearly communicate expectations.
Please get in touch with us if you have any questions!

## Scope of Miri shims

Miri has "shims" to implement functionality that is usually implemented in C libraries which are
invoked from Rust code, such as opening files or spawning threads. However, the set of C functions
that Rust code invokes this way is enormous, and for obvious reasons we have no intention of
implementing every C API ever in Miri.

At the moment, the general guideline for "could this function have a shim in Miri" is: if the
function can be implemented in a portable way using just what is provided by the Rust standard
library, then yes. Otherwise, we might make exceptions for certain cases if (a) there is a good case
for why Miri should support those APIs, and (b) robust and widely-used portable libraries exist in
the Rust ecosystem. We will generally not add shims to Miri that would require Miri to directly
interact with platform-specific APIs (such as `libc` or `windows-sys`).

## Preparing the build environment

Miri heavily relies on internal and unstable rustc interfaces to execute MIR,
Expand Down