Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 17 Oct 15:40
· 191 commits to main since this release

Renamed

  • winged-rust is now Molt. The crate is published as molt-framework (molt on
    crates.io is an unrelated project) and imported as molt::. The WebAssembly files are
    molt.js / molt_bg.wasm, and the repository moved to
    micheltlutz/molt. WINGED_UPDATE_FIXTURES is now
    MOLT_UPDATE_FIXTURES and WINGED_WASM_BUDGET_KB is MOLT_WASM_BUDGET_KB. Issue links
    below still point to the winged-rust repository, where those issues live.

Removed

  • The npm package. The wasm feature and scripts/build-wasm.sh stay; the build now goes
    to pkg/{web,node,bundler} and is not published.

Added

  • URL policy, checked when the tree is written. href, src, action, formaction,
    poster, cite, background, xlink:href and data render as # when the value is a
    javascript:, vbscript: or data:text/html URL. The check decodes character references
    once, so Attribute::raw("href", "javascript:alert(1)") is blocked, while a value
    passed through Attribute::new keeps its escaped &. Attribute::trusted_url,
    Element::trusted_url and WElement.trustedUrl opt out. An attribute name that contains
    a space, quote, =, <, >, / or a control character is not emitted.
  • Element::self_closing(true) closes a non-void tag with > or /> and drops its
    children, so a self-closing tag does not have to be built as Node::Raw (which would
    skip the URL policy).
  • Document::render_to writes the same bytes as render_with, one body section at a time.
    StaticSiteGenerator::generate uses it, into the existing temporary file.
  • overflow-checks in the release profile, cargo deny, and a libFuzzer script
    (scripts/fuzz.sh) that is outside the pull-request gate. unwrap and expect are
    denied in library code.

Changed

  • The release workflow verifies (including cargo publish --dry-run) in a job with no
    registry token, then publishes from a fresh build with cargo publish --locked --no-verify, reading the CARGO_REGISTRY_TOKEN repository secret. CI runs the same
    dry run on every push.

Install

[dependencies]
molt-framework = "0.1.0"

The library is imported as molt: use molt::prelude::*;

What's Changed

  • Bump codecov/codecov-action from 6 to 7 by @dependabot[bot] in #1

New Contributors

Full Changelog: https://github.com/micheltlutz/molt/commits/v0.1.0