5 releases (2 stable)

2.0.0-alpha-rc4 Mar 23, 2024
1.0.1 Jan 28, 2024
1.0.0 Jan 26, 2024
0.1.2 Jan 24, 2024
0.1.1 Jan 24, 2024

#1144 in Web programming

MIT license

1MB
384 lines

blanket-rs

static generator

to get started try the example: cargo run --example basic

then go ahead and start using the library in your own project =D

cargo add blanket-rs

fn main() {
    fn run() -> Result<(), Box<dyn std::error::Error>> {
        let mut builder = blanket_rs::builder::Builder::new();
        builder.require(blanket_rs::resource::CopyFile::new("source/index.html", "dest/index.html"))?;
        builder.generate()?;
        Ok(())
    }
    run().expect("expected to exit successfully");
}

why blanket-rs

great question. there are a lot of options for static website generation in Rust - see alternatives - but for many use cases they are overkill. blanket is all about simplicity.

some simple pleasures

  • you are in control
  • you add blanket to your project, not the other way around

you should use blanket

  • to declaratively generate a static website

you should not use blanket

  • if you need to compile or bundle javascript (check out vite!)
  • when performance is as imporant as correctness (check out bazel!)

pairings

some flavors that compliment blanket-rs

Dependencies

~2.3–9.5MB
~91K SLoC