Skip to content

docs: name the real engine update export - #84

Merged
thejustinwalsh merged 1 commit into
mainfrom
fix/engine-export-name
Aug 20, 2026
Merged

docs: name the real engine update export#84
thejustinwalsh merged 1 commit into
mainfrom
fix/engine-export-name

Conversation

@thejustinwalsh

Copy link
Copy Markdown
Collaborator

text_update does not exist. The engine exports sixteen pmndrs_glyph_engine_* symbols and the update entry point is pmndrs_glyph_engine_update — the old name survived the rename only in prose.

This lands on the integrator we most want to keep: README.md:315 routes anyone building a non-Three renderer at rust-layout-engine.md, which carried twelve of the stale references. It is the first symbol they would search for, and it is not there.

Wrong on arity, not just the name

Two sites documented a two-argument call:

glyph.md:98      text_update(requestOffset, requestLength)
core-api.md:214  text_update(requestOffset, requestLength)

The real export takes three:

// wasm.rs:497
pub unsafe extern "C" fn pmndrs_glyph_engine_update(
    session_id: u32,
    request_offset: u32,
    request_len: u32,
) -> u32

Both now carry the real form. rust-layout-engine.md:275 already had the arity right and only the name wrong.

"The single export" was also false

Both prose sites called it the single export for retained engine sessions. There are sixteen. They now say the single mutating update export, which is accurate and agrees with glyph.md:260 — where the same document already described pmndrs_glyph_engine_measure_paragraph as "a paragraph-scoped synchronous query beside pmndrs_glyph_engine_update". The doc had been contradicting itself 162 lines apart.

What changed, and what deliberately did not

File Fixed Kind
planning/rust-layout-engine.md 12 rename, incl. the ABI signature line
packages/glyph.md 4 3 renames + the :98 prose claim
planning/dirty-range-upload-research.md 3 present-tense architecture claims
planning/core-api.md 1 the :214 prose claim
planning/three-api.md 1 rename
packages/benchmarks.md 1 rename
planning/decision-register.md 0 historical — left alone
log.md 0 historical — left alone

The twenty occurrences in the decision register and the log stay. Those rows are past-tense records carrying byte counts from their own era (D-173, D-174, D-175 and neighbours); rewriting them would make the register misreport what was measured when. If the rename needs recording there, it belongs as a new row, not an edit to old ones.

dirty-range-upload-research.md was the judgment call. Its three uses are present-tense architectural claims — "never cross text_update", "never seen by text_update", "Capture per update: text_update, …" — describing the current boundary rather than recording a measurement, so they are live contract and were fixed.

Verification

  • pnpm check — exit 0, OKF 0 errors / 0 warnings
  • grep -rc text_update docs/ — only decision-register.md (11) and log.md (9) remain, both intentional
  • Zero occurrences in packages/ or apps/ before and after; no source referenced the stale name

Docs-only, so no source_digest moved — the digest covers package source, not documentation.

`text_update` does not exist. The engine exports sixteen
`pmndrs_glyph_engine_*` symbols and the update entry point is
`pmndrs_glyph_engine_update`; the old name survived the rename only in
prose. `README.md:315` routes anyone integrating a non-Three renderer at
`rust-layout-engine.md`, which carried twelve of the stale references, so
this is the first thing an external integrator would search for and fail
to find.

Two sites were also wrong about the signature, not just the name.
`glyph.md:98` and `core-api.md:214` both documented
`text_update(requestOffset, requestLength)`, omitting the `session_id`
argument the export actually takes. Both now carry the real three-argument
form. `rust-layout-engine.md:275` already had the arity right and only the
name wrong.

Both sites also called it "the single export" for retained engine
sessions, which is false with sixteen exports. They now say the single
*mutating* update export, which is accurate and agrees with `glyph.md:260`,
where the same document already described `pmndrs_glyph_engine_measure_paragraph`
as a query beside `pmndrs_glyph_engine_update`.

The twenty remaining occurrences in `decision-register.md` and `log.md` are
left alone. Those are past-tense records carrying byte counts from their own
era; rewriting them would make the register misreport what was measured when.
@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size
Core JS (gzip) 18.75 KB (0%)
Shaper Wasm (gzip) 426.1 KB (0%)
Three.js adapter JS (gzip) 61.36 KB (0%)
Inter font · Bitmap (gzip) 545.27 KB (0%)
Inter font · MTSDF (gzip) 6.48 MB (0%)
Inter font · Slug (gzip) 604.06 KB (0%)
Font Awesome icons · Bitmap (gzip) 439.53 KB (0%)
Font Awesome icons · MTSDF (gzip) 6.89 MB (0%)
Font Awesome icons · Slug (gzip) 642.64 KB (0%)
Font validator JS (gzip) 134.24 KB (0%)
Runtime bake host JS (gzip) 5.4 KB (0%)
Runtime bake Worker JS (gzip) 142.47 KB (0%)
Font baker JS (gzip) 2.41 KB (0%)
Font baker Wasm (gzip) 379.63 KB (0%)
Bitmap baker JS (gzip) 4.66 KB (0%)
Bitmap baker Wasm (gzip) 228.34 KB (0%)
MTSDF baker JS (gzip) 5.39 KB (0%)
MTSDF baker Wasm (gzip) 209.22 KB (0%)
Slug baker JS (gzip) 4.01 KB (0%)
Slug baker Wasm (gzip) 181.26 KB (0%)

@thejustinwalsh
thejustinwalsh merged commit 3233055 into main Aug 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant