mirror of
https://github.com/storytold/wordcraft.git
synced 2026-11-09 20:00:11 -06:00
anchors_walk_dense_unrelated_markers_in_linear_work compared CPU times of a few microseconds, so cache and timer noise could push the ratio past its 24x limit on a linear walk (43.52x in a CI run). wordcraft-doc now counts, in tests only, the characters its paragraph object lookups walk (objects_before, object_offsets and objects_with_offsets), through a work::count helper behind the existing test-support feature. The test asserts that 8x the markers take at most 12x the steps, as the layout linear-time tests do: the walk takes 2001 -> 16001 steps (8.0x), and the object_offsets + object_at walk it replaced takes 2003001 -> 128024001 (63.9x).
32 lines
1.0 KiB
TOML
32 lines
1.0 KiB
TOML
[package]
|
|
name = "wordcraft-layout"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
description = "WordCraft layout: shaping, line breaking, tabs, lists, tables, pagination, headers/footers, hit testing"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
wordcraft-geom = { workspace = true, features = ["image"] }
|
|
wordcraft-doc = { workspace = true }
|
|
wordcraft-fonts = { workspace = true }
|
|
wordcraft-proof = { workspace = true }
|
|
wordcraft-metafile = { workspace = true }
|
|
kurbo = { workspace = true }
|
|
unicode-bidi = { workspace = true }
|
|
unicode-linebreak = { workspace = true }
|
|
unicode-segmentation = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
image = { workspace = true }
|
|
log = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
wordcraft-doc = { workspace = true, features = ["test-support"] }
|
|
|
|
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
|
|
# The browser clock (`SystemTime::now()`/`Instant::now()` panic on wasm32-unknown-unknown).
|
|
js-sys = "0.3"
|