File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,23 @@ process for such contributions:
6666This process is largely informal, and its primary goal is to more clearly communicate expectations.
6767Please get in touch with us if you have any questions!
6868
69+ ## Scope of Miri shims
70+
71+ Miri has "shims" to implement functionality that is usually implemented in C libraries which are
72+ invoked from Rust code, such as opening files or spawning threads, as well as for
73+ CPU-vendor-provided SIMD intrinsics. However, the set of C functions that Rust code invokes this way
74+ is enormous, and for obvious reasons we have no intention of implementing every C API ever written
75+ in Miri.
76+
77+ At the moment, the general guideline for "could this function have a shim in Miri" is: we will
78+ generally only add shims for functions that can be implemented in a portable way using just what is
79+ provided by the Rust standard library. The function should also be reasonably widely-used in Rust
80+ code to justify the review and maintenance effort (i.e. the easier the function is to implement, the
81+ lower the barrier). Other than that, we might make exceptions for certain cases if (a) there is a
82+ good case for why Miri should support those APIs, and (b) robust and widely-used portable libraries
83+ exist in the Rust ecosystem. We will generally not add shims to Miri that would require Miri to
84+ directly interact with platform-specific APIs (such as ` libc ` or ` windows-sys ` ).
85+
6986## Preparing the build environment
7087
7188Miri heavily relies on internal and unstable rustc interfaces to execute MIR,
You can’t perform that action at this time.
0 commit comments