Skip to content

Release v0.2.0

Compare
Choose a tag to compare
@github-actions github-actions released this 29 Apr 00:01
· 52 commits to main since this release
8454d87

What's Changed

R2 Improvements

API Flexibility

  • WorkerRequest/WorkerResponse traits by @dakom in #530
  • Allow returning any error that implements std::error::Error by @kflansburg in #527

Note

These changes should not be breaking: they should only expand the set of request, response, and error types supported by the event macro:

  • The error type returned can now be any type which implements Into<Box<dyn std::error::Error>> (including worker::Error).
  • Introduces FromRequest trait, and handler request type can be any type that implements this trait. Implementations are provided for web_sys::Request, worker::Request, and http::Request<worker::Body>.
  • Introduces IntoResponse trait, and handler response type can be any type that implements this trait. Implementations are provided for web_sys::Response, worker::Response, and http::Response<B> where B: http_body::Body.

Workers RPC

General

  • chore(deps): bump rustls from 0.22.3 to 0.22.4 by @dependabot in #553
  • 🤽 worker-sys Make all methods catch: this greatly improves error reporting for exceptions which originate in JavaScript by @Jasper-Bekkers in #546

Caution

Making worker-sys methods catch changes them all to return Result. worker crate APIs should not have breaking changes, but if you use worker-sys APIs directly (including some user-facing APIs such as D1ExecResult), then you may need update your code to handle this change.

New Contributors

Full Changelog: v0.1.0...v0.2.0