Workers Rs Versions Save

Write Cloudflare Workers in 100% Rust via WebAssembly

v0.2.0

2 weeks ago

What's Changed

R2 Improvements

worker-kv

API Flexibility

[!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

[!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: https://github.com/cloudflare/workers-rs/compare/v0.1.0...v0.2.0

worker-build-v0.1.0

2 weeks ago
  • Introduce new binary, worker-codegen, which generates RPC client bindings from WIT schemas.
  • Move to worker-rs's new versioning scheme.

kv-v0.7.0

1 month ago

worker-kv has been moved to this repository from https://github.com/zebp/worker-kv

Thanks @Kakapio !

Changes

  • Mark KvStore as Sync and Send for better ergonomics with axum and other HTTP frameworks.

v0.1.0

1 month ago

New Versioning Pattern

We will be using 0.x.y as our version pattern going forward so that we can better use semantic versioning. Minor version (x) changes will be used to indicate breaking changes, and patch version (y) changes will indicate non-breaking changes. We will continue be using 0 for our major version.

What's Changed

Sockets

Binary Size

[!CAUTION] Breaking: You will now need the timezone feature to access Cf.timezone.

[!CAUTION] Breaking: You will now need axum feature to have From<worker::Response> for http::Response<axum::body::Body>

D1

HTTP

Other Fixes

Dependabot

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.24...v0.1.0

v0.0.24

1 month ago

Major Changes to Queues API

In https://github.com/cloudflare/workers-rs/pull/335, major changes were made to the Queues API to bring it to parity with new features that have been introduced to the JavaScript API over time. This includes things like content type, delaying messages, and explicit acknowledgement and retries.

This comes with a few breaking changes:

  • Message fields like body, timestamp, and id are no longer public, and Message can no longer be created from a struct literal. Instead, these fields must be accessed via methods body(), timestamp(), and id().
  • iter() on MessageBatch no longer has a lifetime.
  • MessageBatch::new() has been removed.

New features:

  • ack() and retry() are now available on the individual message
  • retry_with_options() was added to allow specifying the QueueRetryOptions
  • ack_all() is now available on MessageBatch
  • retry_all_with_options() was added to MessageBatch to allow specifying the QueueRetryOptions
  • send_batch() is now available on Queue
  • It's now possible to set QueueSendOptions when sending a message
    • New builder structs MessageBuilder, BatchMessageBuilder, and RawMessageBuilder added to allow for the creation of messages with options.
  • Allow for sending and receiving of the raw JsValue (either Text or V8 content types):
    • Message now has a raw_body function that returns a JsValue.
    • raw_iter() fn has been added to MessageBatch.
    • Queue now has a send_raw and send_raw_batch function that allows sending of JsValue.

Thanks to @jdon !

Other Changes

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.23...v0.0.24

v0.0.23

1 month ago

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.22...v0.0.23

v0.0.22

1 month ago

This release continues our conversion to the http crate. In a number of key ways:

  • Convert test suite to use axum when http feature is enabled. This was a great dogfooding exercise and helped to identify ergonomics issues. Based on this we developed the utilities (see documentation):
    • Introduce worker::send to mark arbitrary async functions as Send (useful for axum handler methods).
    • Introduce SendFuture wrapper for marking a specific Future as Send.
    • Introduce SendWrapper for marking a particular object as Send. This is useful for axum router state.
  • Implement Send, Sync, and Clone for Queue, making it easier to use with axum. Thanks @avsaase!

We will continue to make ergonomic improvements to simplify usage of axum and other frameworks which generally expect objects to be Send, Sync, and Clone.

Other Changes

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.21...v0.0.22

v0.0.21

2 months ago

New http feature flag

A feature flag (http) was introduced to begin migrating from custom request and response types to widely used types in the http crate. See the README for more information.

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.20...v0.0.21

v0.0.20

2 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.19...v0.0.20

v0.0.19

2 months ago

Highlights

What's Changed

New Contributors

Full Changelog: https://github.com/cloudflare/workers-rs/compare/v0.0.18...v0.0.19