tauri-runtime-servocat 0.2.0

Servo-replacement runtime for Tauri: wires html-cat, css-cat, dom-cat, layout-cat, paint-cat, net-cat, boa-cat, ecma-runtime-cat, and web-api-cat into a single rendering + scripting pipeline. v0.2.0 adds a tiny-skia rasterizer (FillRect + StrokeRect; FillText placeholder until v0.3 cosmic-text). The cosmic-text shaping, winit window, IPC bridge, and tauri_runtime::Runtime trait impl are committed-to deliverables for subsequent versions. The Servo no-AI policy disqualifies upstream contribution; this is the AI-built parallel.
docs.rs failed to build tauri-runtime-servocat-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

tauri-runtime-servocat

Servo-replacement runtime for Tauri: wires the full comp-cat-rs cat-stack (html-cat, css-cat, dom-cat, layout-cat, paint-cat, net-cat, boa-cat, ecma-runtime-cat, web-api-cat) into a single rendering + scripting pipeline.

Example

use tauri_runtime_servocat::{render, run_script, Error, Viewport};

fn main() -> Result<(), Error> {
    let frame = render(
        "<html><body><p>hello</p></body></html>",
        "p { background-color: red; padding: 8px; }",
        Viewport::new(800, 600),
    )?;
    assert!(!frame.display_list().is_empty());

    let scripted = run_script(
        "<html><body><p id='g'>hi</p></body></html>",
        "",
        "document.getElementById('g').textContent",
        Viewport::new(800, 600),
    )?;
    assert_eq!(format!("{}", scripted.script_value()), "\"hi\"");
    Ok(())
}

v0.1.0 scope

  • render(html, css, viewport) -> Frame -- HTML → DOM → layout → display list.
  • run_script(html, css, js, viewport) -> Frame -- same plus an inline JS step.
  • Frame carries the dom-cat Document, layout tree, paint-cat DisplayList, and (when scripted) the JS return value.

Roadmap (committed for subsequent versions)

  • v0.2.0 -- tiny-skia rasterizer (rectangles only, no text); render_to_pixels(frame, buffer).
  • v0.3.0 -- cosmic-text for text shaping + glyph raster.
  • v0.4.0 -- winit + softbuffer window + a runnable demo binary.
  • v0.5.0 -- IPC bridge (window.__TAURI_INVOKE__); DOM-mutation back-propagation into layout.
  • v1.0.0 -- tauri_runtime::Runtime trait impl with the working pieces wired in; remaining methods stubbed and filled in over patch releases.

License

MIT OR Apache-2.0