Name Description Size Coverage
analyze.rs A frontend for minidump analysis. 1181 74 %
async_task.rs Manage work across multiple threads. Each thread has thread-bound data which can be accessed in queued task functions. 7412 93 %
config.rs Application configuration. 26383 84 %
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. 11247 94 %
glean.rs Glean telemetry integration. 9723 84 %
lang 71 %
logging.rs Application logging facilities. 2474 56 %
logic 100 %
logic.rs Business logic for the crash reporter. 25406 86 %
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. 12583 69 %
memory_test.rs A frontend for memory testing. 7002 34 %
net 86 %
prefs_parser.rs Prefs file parsing utilities. 2913 100 %
process.rs Process utility functions. 807 -
send_ping.rs An entry point for sending a crash ping. 1970 100 %
settings.rs Persistent settings of the application. 1457 100 %
std 90 %
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. 65950 98 %
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 100 %
ui 24 %