Repository navigation
Folio 1.0.0
What Folio is
Folio is a lightweight HTML/CSS rendering engine for .NET, written from scratch in C#. It renders and runs AI-written
HTML artifacts (reports, tables, charts, small interactive pages) inside a host application's own window. It is not a
general-purpose browser; see the consumer readiness audit for what is and is not
supported.
1.0 adds WebRTC in the sandboxed content process, retained scroll and damage-rect presentation, and per-class
start-up limits for the pinned libraries. Its measured performance is in the table below, with every miss marked. One headline budget is missed: the visible first paint median is 53.5 ms against 50 ms in JIT mode.
Everything that is missing, disabled by default or only partly done is listed under Known limits.
What is new since 0.9.0
WebRTC
WebRTC runs in the sandboxed content process, which owns no network socket. The host owns every socket, applies the
destination policy and quotas, and revocation closes them
(host-mediated UDP).
- ICE with STUN and TURN relay allocation, through the host-mediated UDP transport.
- Host-mediated UDP: the content process never opens a socket; datagrams go through the host broker, which enforces
per-document quotas, rate limits and an address policy. - DTLS-SRTP audio and the RTP/RTCP engine (reordering jitter buffer, sender and receiver reports, BYE).
- Opus audio (48 kHz decode, basic encoder), with G.711 as the fallback (Opus).
- Remote video receive: VP8 and H.264 Constrained Baseline, with NACK and PLI/FIR loss repair
(remote media). - VP8 video sending (key frames only; see the limits).
- mDNS (
.local) remote ICE candidates, resolved by the host broker. Off by default (FolioOptions.WebRtcAllowMdns). - Child documents and workers: the content process routes them through the same host-mediated transport, with the ICE
endpoint allowlist, the iframe feature policy and a shared top-level budget and connection cap. Iframes and service
workers are not promoted to production features yet, so artifacts that use them still fall back (see the limits). - Per-document media budgets (picture size, memory, decode work per second, packet and byte limits) in both the content
process and the host.
Browser interoperability was checked against Chrome (Folio as offerer and as answerer): data channels, Opus audio, and
VP8 and H.264 video that is non-empty and changing over time.
Rendering and interaction
- Retained scroll: scrolling shifts the retained frame instead of repainting the page, at every default Windows scale
(100 to 200%). Pages or scales it cannot handle fall back to a full repaint. - Damage-rect present: a repainted frame copies only its damaged region to the control.
- Large blurred shadows are blurred once per distinct line and column.
- First-paint rasterization improvements.
Scripting
- Start-up limits by library class (start-up limits): ordinary libraries 50 ms and 80 MiB,
chart and canvas libraries 60 ms and 85 MiB, Phaser-class libraries 180 ms and 130 MiB. Limits apply per page. - Faster library start-up in the content host.
Build and CI
- The script-driven canvas frame budget (16.7 ms p95) is a CI gate on the NativeAOT build that hosts ship. The JIT run is
informational.
What's included
- Packages:
Folio(portable static rendering),Folio.Diagrams,Folio.ScriptingandFolio.WinForms(the Windows
control), all version 1.0.0, as.nupkgfiles. Folio.ContentHost-1.0.0-win-x64.zip: the NativeAOT content host that runs page scripts in a separate process. Extract
and deploy the whole directory, includingfonts.SHA256SUMS.txt.
Supported
- Static HTML/CSS rendering, text, SVG and images, headless render to PNG, with bundled fonts.
- Interaction in the Windows control: hover, clicks, scrolling, text selection and relayout on resize.
- Scripting with the Folio-owned JavaScript engine, run in a sandboxed content process with strict limits.
- Pinned libraries from the tested scripting and canvas corpus: React 18.3.1 with Babel Standalone 7.26.4, Twind 0.16.19,
D3 7.9.0 and Phaser 3.90.0 run as libraries on Folio's own engine. Pages that load Chart.js or use Mermaid blocks are not
run through those libraries: Folio replaces them with its built-in canvas chart bridge and diagram renderer, which cover a
subset (bar and line charts; flowcharts) and log aFeatureRouteddiagnostic when they do. The unmodified libraries run
only on the Jint compatibility engine used in tests. - Canvas graphics.
- WebRTC as described above.
- Diagrams (
Folio.Diagrams).
Performance
Measured on an AMD Ryzen 7 5800X (8 cores), Windows 11 (10.0.26300), .NET SDK 10.0.403. The frame, hover, scroll and
canvas rows were measured on 2026-11-14 at commit 6786d0de21bb472531f31c869bb763140a0e9fdf of main; the first-paint,
D1 and library start-up rows were re-measured on 2026-11-15 at 079ab3eb on a quiet machine (browsers, chat apps and games
closed). Figures are the median of the runs' medians, with the range in brackets; 3 runs each for the first set and 5 for
the second, one run at a time, no other benchmark processes. A figure over
its target is a miss, even by a little. Method and every raw number are in the measurements record for this release.
| Area | Measured | Target | Where measured |
|---|---|---|---|
| Animation frame (typical dashboard) | 6.2 ms (5.7 to 7.5): meets | 8 ms | JIT, in-process, 800x600 |
| Hover restyle | 3.2 ms (3.2 to 3.4): meets | 4 ms | JIT, in-process |
| Scroll frame, retained scroll, 100% | 1.6 ms (1.6 to 2.0): meets | 8 ms | JIT, in-process |
| Scroll frame, retained scroll, 125 / 150 / 175 / 200% | 2.2, 2.0, 1.9 and 2.1 ms, all within 1.7 to 2.3 ms: meets | 8 ms | JIT, in-process |
| Scroll frame, full repaint at 100% (fallback path) | 12.6 ms (12.1 to 13.1): misses; this is the fallback, not the normal path | 8 ms | JIT, in-process |
| First paint, visible Windows control | median 53.5 ms (49.9 to 57.5), p95 94.8 ms (76.4 to 108.0): median target NOT MET in JIT mode (over 50 ms in 4 of 5 runs); p95 meets | 50 ms median, 150 ms p95 | Visible WinForms benchmark |
| First paint, headless (not a visible control) | median 37.1 ms (36.7 to 37.6), p95 88.2 ms (73.5 to 94.3): meets | 50 ms median, 150 ms p95 | firstpaint, fresh process, software raster, no window |
| Large shadow blur cost | no measurable difference outside noise against the previous blur (-10% to +4%, run spreads of 10 to 40%) | none | First-paint benchmark |
| Scripted start-up D1, cold start | 177.8 ms (171.6 to 216.5): meets | 400 ms | NativeAOT content host |
| Scripted start-up D1, warm first frame | 15.4 ms (14.9 to 16.0); slowest artifact 22.7 ms (21.2 to 24.3): meets | 50 ms | NativeAOT content host |
| Scripted start-up D1, working set | up to 58.9 MB (58.0 to 59.3): meets | 80 MB | NativeAOT content host |
| Library start-up, ordinary (D2 React/Babel, D3 Twind, D6 Mermaid) | class medians 23.1 (D2), 24.7 (D3) and 23.5 ms (D6); working set at most 61.4 MiB: meets | 50 ms, 80 MiB | NativeAOT content host |
| Library start-up, chart and canvas (D4 D3, D5 Chart.js) | class medians 32.7 (D4) and 30.1 ms (D5); working set at most 63.3 MiB: meets | 60 ms, 85 MiB | NativeAOT content host |
| Library start-up, Phaser-class (D7) | class median 97.7 ms; working set at most 86.3 MiB: meets | 180 ms, 130 MiB | NativeAOT content host |
| Script-driven canvas frame, D5 (total p95) | median 0.02 ms (0.02 to 0.03), worst row 5.3 ms: meets, 0 of 10 rows over | 16.7 ms | NativeAOT canvas probe, 30 frames |
| Script-driven canvas frame, D7 (total p95) | median 9.9 ms (8.6 to 10.3), worst row 12.1 ms: meets, 0 of 10 rows over | 16.7 ms | NativeAOT canvas probe, 30 frames |
Notes:
- Visible first paint misses its 50 ms median budget (53.5 ms median; 49.9 to 57.5 ms across 5 runs, over budget in 4).
The headless figure is 37.1 ms and both p95 figures meet 150 ms. The cause is tier-0 JIT code in layout and raster on a
first paint; ReadyToRun or NativeAOT packaging, which removes most of that, is the consumer's choice, so the figure
describes the JIT host that was measured. - Library start-up rows are the median of three warm reloads in one long-lived process, not a user's first visit to a
library; each library's cold first load is reported in the measurements record and is also within its class limit on
the quiet machine. All 54 rows were within their limits in each of 5 quiet runs; on a loaded machine the same harness
still had up to 11 rows over, so the limits keep their margin. - The animation-frame and hover figures include the shipped damage-rect bitmap copy (6.6 ms and 3.3 ms). A
whole-surface copy, kept only as a comparison row and not shipped, measured 9.2 ms for the animation frame, over its
target. - Against 0.9.0, the scroll figure changed from 19.3 ms (a full repaint) to 1.6 ms because retained scroll is now the
shipped path. The like-for-like comparison for a full repaint is 12.6 ms.
Known limits
- Browser interoperability was tested with Chrome only. Firefox and Safari were not tested.
- Iframes and service workers are not in the production feature list. Artifacts that use them fail closed to the fallback,
and there is no end-to-end test of a data channel or media from inside an iframe (#816). - The older local-delivery path in the public WebRTC API is still in the source and is reachable for a document without an
owner event loop; there,connecteddoes not prove a real transport (#815). - Interoperability with OpenSSL and Chrome is checked by probes in Linux CI only, with cooperative peers. Tampered or
reordered DTLS handshake flights and Windows or macOS peers are not tested (#817). - DTLS has one cipher suite and no alert handling (#818). A 256 KiB message
sometimes times out and some transport tests are intermittent when run in parallel (#819). - H.264 receive is Constrained Baseline only: CAVLC, I and P slices, progressive 4:2:0 8-bit. CABAC (Main and High),
B slices and interlaced coding are not decoded. - The Opus encoder is basic: mono, 48 kHz, CELT only, 20 ms frames, constant bitrate. Quality is below libopus at the
same bitrate. Decoding covers SILK, CELT and hybrid. - Sent video is VP8 key frames only. There is no inter-frame coding, so sent video uses much more bandwidth than a
conventional encoder would. - mDNS resolves public addresses only: the host destination policy also applies to the resolved address, and
.local
names normally resolve to private addresses, so.localcandidates from LAN peers are not reachable. - mDNS resolution is off by default (
FolioOptions.WebRtcAllowMdnsis false). - Heavy libraries (for example Phaser) have a higher start-up limit than ordinary ones, and on a loaded machine individual
pages can still exceed their class limit; see the table above. - Advanced APIs have narrower support than a general-purpose browser; see the
consumer readiness audit.
Requirements
- .NET 10 (SDK 10.0.403 or newer to build; the packages target
net10.0). - Windows for the content host and the WinForms control (
net10.0-windows). The portableFolioandFolio.Diagrams
static rendering also runs on Linux.
Install
Folio is released only as a GitHub release; nothing is pushed to NuGet.org. Download the .nupkg files from the
release into a local folder, add that folder as a NuGet source, and reference the packages at version 1.0.0. Deploy the
extracted content host directory next to your application, including fonts.
Verification
- CI run for the release commit: see the release's target commit on GitHub Actions.
- Checksums:
SHA256SUMS.txt, attached to this release; see releasing Folio for how to verify them.