Skip to content

Releases: peku33/web-static-pack

v0.5.0-beta.2

06 Jul 17:14
Compare
Choose a tag to compare
v0.5.0-beta.2 Pre-release
Pre-release
  • (Breaking) For responder, provide request as separate parts of request, not full request. pub fn respond(&self, request: RequestParts) -> pub fn respond(&self, method: &Method, path: &str, headers: &HeaderMap)
  • Minor documentation fixes

v0.5.0-beta.1

05 Jul 20:12
ad4cff4
Compare
Choose a tag to compare
v0.5.0-beta.1 Pre-release
Pre-release

The 0.5.0 is almost a complete rewrite, however the general idea remains the same.

  • We still have two parts - packer and loader. There is also a common crate and tests crate, however they are not meant to be used directly.
  • Lots of internals were changed, including rkyv for serialization / zero-copy deserialization. This of course makes packs built with previous versions incompatible with current loader and vice versa.
  • We are now built around http crate, which makes web-static-pack compatible with hyper 1.0 without depending on it directly.

BREAKING CHANGES

  • Packer is now built around subcommands. The previous behavior was moved to directory-single subcommand, and root_path parameter was dropped. See examples.
  • Since we no longer depend on hyper in any way (the http crate is common interface), hyper_loader feature is no longer present in loader.
  • let loader = loader::Loader::new(...) is now let pack_archived = loader::load(...). This value is still used for Responder::new.
  • hyper_loader::Responder is now just responder::Responder, and it's now built around http crate, compatible with hyper 1.0.
  • Responder was rewritten. It now accepts request parts (without body) not whole request. request_respond_or_error and parts_respond_or_error are now respond. request_respond and parts_respond are now respond_flatten.

New features and improvements

  • True zero-copy deserialization with rkyv.
  • brotli compression support.
  • cache-control support.
  • Packer is now a lib + bin, making it usable in build.rs. Multiple useful methods were exposed.
  • Good test coverage, including integration tests.
  • Lots of internal improvements.