Skip to content

refactor(core): extract no_std + alloc surface from ssg-core #577

Description

@sebastienrousseau

Strategy. crates/ssg-core/ is std-only despite shipping a wasm32 build. Splitting ssg-core's parser surface into no_std + alloc unlocks embedded/IoT documentation builds and aligns with the DevRel angle for the "edge embedded firmware" narrative.

Files

  • Edit: crates/ssg-core/Cargo.toml:
    [features]
    default = ["std"]
    std = []
  • Edit: crates/ssg-core/src/lib.rs: #![cfg_attr(not(feature = "std"), no_std)] extern crate alloc;
  • Edit: hot paths under crates/ssg-core/src/ — replace String allocations on parse paths with &str borrows where possible; gate std::time, std::env, std::fs use behind cfg(feature = "std").

Acceptance criteria

  • cargo build -p ssg-core --no-default-features --target thumbv7em-none-eabi succeeds.
  • cargo build -p ssg-core --no-default-features --target wasm32-unknown-unknown succeeds (slimmer than today's wasm32 build).
  • New CI matrix entry in wasm.yml: build ssg-core for both wasm32-unknown-unknown and thumbv7em-none-eabi.

Marketing. Enables the DevRel angle: "the only static-site generator whose parser can run on a Cortex-M4 firmware doc-build."

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions