typst_timing

Function export_json

source
pub fn export_json<W: Write>(
    writer: W,
    source: impl FnMut(Span) -> (String, u32),
) -> Result<(), String>
Expand description

Export data as JSON for Chrome’s tracing tool.

The source function is called for each span to get the source code location of the span. The first element of the tuple is the file path and the second element is the line number.