Releases: peku33/web-static-pack
Releases · peku33/web-static-pack
v0.5.0-beta.2
- (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
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 andtests
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, androot_path
parameter was dropped. See examples. - Since we no longer depend on
hyper
in any way (thehttp
crate is common interface),hyper_loader
feature is no longer present in loader. let loader = loader::Loader::new(...)
is nowlet pack_archived = loader::load(...)
. This value is still used forResponder::new
.hyper_loader::Responder
is now justresponder::Responder
, and it's now built aroundhttp
crate, compatible withhyper
1.0.Responder
was rewritten. It now accepts request parts (without body) not whole request.request_respond_or_error
andparts_respond_or_error
are nowrespond
.request_respond
andparts_respond
are nowrespond_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.