firedbg_stream_indexer/lib.rs
1//! ## FireDBG Event Indexer
2//!
3//! `firedbg-stream-indexer` is a streaming indexer. It can stream events from `.firedbg.ss` files, index them in real-time, and write updates to `.sqlite` incrementally.
4//!
5//! There are 4 event types:
6//!
7//! | Event Code | Event Type | Description |
8//! |:----------:|:----:|:-----------:|
9//! | `B` | Breakpoint | e.g. a breakpoint hit by `fire::dbg!`
10//! | `P` | Panic | Program panic |
11//! | `F` | Function Call | - |
12//! | `R` | Function Return | - |
13//!
14//! The indexer reconstructs the call stack for each thread from the event stream, and write a `parent_frame_id` for each `F` event.
15//!
16//! The indexer also deserializes the value blobs and translates them into JSON. The JSON is then transformed into pretty-printed Rust-like value strings:
17//!
18//! ```ignore
19//! Value Blob -> RValue -> Lifted RValue -> Pretty Print
20//! ```
21//!
22//! The database schema can be found under [`indexer/src/entity/`](https://github.com/SeaQL/FireDBG.for.Rust/tree/main/indexer/src/entity/), which is defined by a set of SeaORM entities.
23//!
24//! Highly recommend you to install a SQLite extension for VS Code. You can find some sample indexes in the [Testbench](https://github.com/SeaQL/FireDBG.Rust.Testbench).
25#![deny(
26 missing_debug_implementations,
27 clippy::missing_panics_doc,
28 clippy::unwrap_used,
29 clippy::print_stderr,
30 clippy::print_stdout
31)]
32
33pub mod database;
34pub mod entity;
35mod processor;
36pub mod translate;
37pub mod util;
38pub mod validator;
39
40pub use processor::*;