Name Description Size
async_task.rs Manage work across multiple threads. Each thread has thread-bound data which can be accessed in queued task functions. 985
config.rs Application configuration. 21457
data.rs Data binding types are used to implement dynamic behaviors in UIs. [`Event`] is the primitive type underlying most others. [Properties](Property) are what should usually be used in UI models, since they have `From` impls allowing different binding behaviors to be set. 10836
lang
logging.rs Application logging facilities. 2406
logic.rs Business logic for the crash reporter. 23563
main.rs The crash reporter application. # Architecture The application uses a simple declarative [UI model](ui::model) to define the UI. This model contains [data bindings](data) which provide the dynamic behaviors of the UI. Separate UI implementations for linux (gtk), macos (cocoa), and windows (win32) exist, as well as a test UI which is virtual (no actual interface is presented) but allows runtime introspection. # Mocking This application contains mock interfaces for all the `std` functions it uses which interact with the host system. You can see their implementation in [`crate::std`]. To enable mocking, use the `mock` feature or build with `MOZ_CRASHREPORTER_MOCK` set (which, in `build.rs`, is translated to a `cfg` option). *Note* that this cfg _must_ be enabled when running tests. Unfortunately it is not possible to detect whether tests are being built in `build.rs, which is why a feature needed to be made in the first place (it is enabled automatically when running `mach rusttests`). Currently the input program configuration which is mocked when running the application is fixed (see the [`main`] implementation in this file). If needed in the future, it would be nice to extend this to allow runtime tweaking. # Development Because of the mocking support previously mentioned, in generally any `std` imports should actually use `crate::std`. If mocked functions/types are missing, they should be added with appropriate mocking hooks. 8243
net
process.rs Process utility functions. 807
settings.rs Persistent settings of the application. 1173
std
test.rs Tests here mostly interact with the [test UI](crate::ui::test). As such, most tests read a bit more like integration tests than unit tests, testing the behavior of the application as a whole. 41102
thread_bound.rs Encapsulate thread-bound values in a safe manner. This allows non-`Send`/`Sync` values to be transferred across thread boundaries, checking at runtime at access sites whether it is safe to use them. 1158
ui