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."
Strategy.
crates/ssg-core/isstd-only despite shipping a wasm32 build. Splittingssg-core's parser surface intono_std + allocunlocks embedded/IoT documentation builds and aligns with the DevRel angle for the "edge embedded firmware" narrative.Files
crates/ssg-core/Cargo.toml:crates/ssg-core/src/lib.rs:#![cfg_attr(not(feature = "std"), no_std)] extern crate alloc;crates/ssg-core/src/— replaceStringallocations on parse paths with&strborrows where possible; gatestd::time,std::env,std::fsuse behindcfg(feature = "std").Acceptance criteria
cargo build -p ssg-core --no-default-features --target thumbv7em-none-eabisucceeds.cargo build -p ssg-core --no-default-features --target wasm32-unknown-unknownsucceeds (slimmer than today'swasm32build).wasm.yml: buildssg-corefor bothwasm32-unknown-unknownandthumbv7em-none-eabi.Marketing. Enables the DevRel angle: "the only static-site generator whose parser can run on a Cortex-M4 firmware doc-build."