35 Commits

Author SHA1 Message Date
Guy Bedford
920ae84602
inline kv implementation (#830) 2025-09-25 15:12:06 -07:00
Guy Bedford
2b30134ebc
fix console panic hook in templates (#828) 2025-09-25 12:03:34 -07:00
github-actions[bot]
8e72136a3c
Release v0.6.6 (#823) 2025-09-23 17:30:29 -07:00
Ho
b27e1ed698
feat: worker fetch example (#411) 2025-09-22 11:16:38 -07:00
Guy Bedford
78da5cb068
worker-build fixes (#819) 2025-09-18 16:18:28 -07:00
Luke Valenta
fba130e663
refactor: Clean up worker-sandbox (#763)
* Clean up worker-sandbox

- Remove unexpected fields from wrangler.toml (type, miniflare, package)
- Address or add allow rules for clippy::pedantic lints
- Add macros to avoid duplicate route configurations
- Move files from src/test/* to src/ and add test handlers and routes to
  make it possible to run the tests from the sandbox worker
- Move several handlers out of alarm.rs and into more suitable files
  (e.g., counter.rs where the corresponding Durable Objects live). Note
  that the SHARED_COUNTER Durable Object class is still not yet defined.
- Fix and add test handler for handle_basic_test, which passes
  except for the transactional storage API tests

* Address review comments

- Clean up additional clippy lints rather than add exceptions
- Describe how to get tests to pass even with dwarf-debug-info enabled

* Fix new clippy complaints
2025-07-07 15:28:41 -07:00
Guy Bedford
8612c0cd64
deps: update dependencies, examples and templates /w Axum upgrade (#744) 2025-06-16 16:29:27 -07:00
Cole MacKenzie
ea5d36f2ab Add support for Analytics Engine
This one was a little tricky to add and requires mocking out the
analytics engine binding using a miniflare wrapped binding that logs
each datapoint to console.

Resolves #280, #327

refactor: rename to match Typescript type names

test: mock out analytics engine binding
2025-03-10 06:05:29 -07:00
Kevin Flansburg
c7e966cf2b
Remove HeaderExt and AbortSignalExt (#621)
* Remove HeaderExt

Closes #617

* Fix deprecation warnings

* feature
2024-08-19 11:15:05 -04:00
dependabot[bot]
e0a8cddb97
chore(deps): bump ws from 8.16.0 to 8.17.1 in /examples/custom-req (#588)
Bumps [ws](https://github.com/websockets/ws) from 8.16.0 to 8.17.1.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.16.0...8.17.1)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 10:05:47 -04:00
dependabot[bot]
fec47da903
chore(deps): bump braces from 3.0.2 to 3.0.3 in /examples/custom-req (#587)
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-18 10:05:27 -04:00
Kevin Flansburg
803914aa97
Switch Hyperdrive example to with note (#583) 2024-06-06 10:19:43 -05:00
github-actions[bot]
8a52472e55
chore: bump versions (#579)
Co-authored-by: kflansburg <6134007+kflansburg@users.noreply.github.com>
2024-05-19 08:58:32 -04:00
Kevin Flansburg
5c4048f923
Update tokio-postgres example to demonstrate Hyperdrive (#569)
* Update tokio-postgres to demonstrate Hyperdrive

* Use simple_query
2024-05-07 11:08:37 -04:00
Kevin Flansburg
abbcb00bc9
Fix clippy lints (#565) 2024-05-03 11:55:48 -04:00
David Komer
3945ae6c16
Rust-friendly DigestStream API (#529)
* Rust-friendly DigestStream API

* Fixes #383

* refactor DigestStream

* move comment back

* delete examples yarn.lock

* Update worker/src/crypto.rs

Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>

* fix SendFuture syntax

* upgrade example deps

* remove allow dead code

---------

Co-authored-by: Kevin Flansburg <kevin.flansburg@gmail.com>
2024-04-30 12:26:49 -04:00
Kevin Flansburg
f3eb1eb535
Experimental RPC Support (#551)
* Prototyping

* rpc client example

* Prototype WIT codegen

* Documentation

* Final tweaks
2024-04-28 18:44:12 -04:00
Kevin Flansburg
36b646cd62
Allow returning any error that implements std::error::Error (#527)
* IntoResponse and FromRequest return Result

* Generic error return types

* Fix example
2024-04-28 18:37:50 -04:00
David Komer
0a94def73f
WorkerRequest/WorkerResponse traits (#530)
* http traits

* WorkerRequest
* WorkerResponse

* delete comment block

* consolidate macro

* FromRequest / IntoResponse

* and a bit of cleanup to clarify previous naming conflict of WorkerResponse

* more generic IntoResponse impl
2024-04-28 09:25:06 -04:00
Kevin Flansburg
2e26b3d08a
Introduce axum feature (#534) 2024-04-04 08:12:30 -04:00
Kevin Flansburg
174accbde0
Don't increment KV version when creating release PR (#514) 2024-03-29 08:11:46 -04:00
Jonathan Donaldson
cd41d40fbe
Update queue bindings (#335)
* Update queues

* Update queue bindings

* Fix tests and lint

* Fix tests

* Add support for message batches and retry / message options

* Add queue example

* Address comments
2024-03-29 07:19:37 -04:00
Roshan P
06214d9cba
Add worker-kv crate to repository. (#494)
* Initially adding files.

* Move examples, add to cargo build.

* remove files

* Fix KV paths and link dependencies to workspace.

* Add test package to cargo.lock

* Update kv test dependencies.

* Add send/sync to KvStore.

* Remove dead code.

* Fix cargo.lock

* Undo cargo.lock changes.

* Fix formatting.

* Make code idiomatic.
2024-03-27 17:56:18 -04:00
Kevin Flansburg
b2aabc1be1
Introduce http feature for http crate types (#477)
* http 1.1

* http feature flag

* Fetcher http flag

* Implement todos

* Implement redirect / ws / abort signal

* Add http tests to CI

* Add Cf context to http::Request

* Fix test working directories

* Axum example

* fix clippy in CI

* Handle generic http_body return type

* Documentation

* Remove unwraps

* Tweak introduction version in docs

* Final touches
2024-03-15 09:44:58 -04:00
Kevin Flansburg
5f078bfdeb
Release PR action (#464) 2024-03-08 09:48:04 -08:00
kpcyrd
e6845ccb81
Make Response::from_html use text/html; charset=utf-8 (#447)
* Make Response::from_html use `text/html; charset=utf-8`

* Make Response::ok use `text/plain; charset=utf-8`

* Fix code formatting
2024-02-28 10:13:39 -05:00
Esteban Borai
cbd98b4a94
feat: worker router example (#404) 2023-11-08 12:47:28 -05:00
Kevin Flansburg
92a1127f19
Postgres TLS Support (#403)
* Implement TlsStream for Socket

* starttls trait

* Implement TlsConnection in workers-rs

* Update example

* fmt

* docs and fix example
2023-11-08 09:07:20 -05:00
Sven Sauleau
749854f56f Wasm Coredump support
Run the Wasm coredump transformation as part of `worker-build`. For
client-side support, expose the Wasm module and its memory to later
extract the Wasm Coredump on crash.

The Wasm Coredump transformation is gated behind an environment
variable. To run it use the following:
```
COREDUMP=1 worker-build
```
2023-07-25 18:57:33 +02:00
Zeb Piasecki
56513d9534 fix panic in tracing example
Multiple calls to init will cause a panic because a tracing subscriber has already been set globally.
2023-07-03 16:52:45 -04:00
Kevin Flansburg
3e451c42b9 Address comments 2023-06-20 11:13:10 -04:00
Kevin Flansburg
b1d4f3e507 tokio-postgres example 2023-06-20 11:13:10 -04:00
Kevin Flansburg
47bcf6a72e tracing example 2023-06-20 11:13:10 -04:00
Kevin Flansburg
59ffa89fb5 low level client 2023-06-20 11:13:10 -04:00
Kevin Flansburg
0d597f8580 Hyper example 2023-06-20 11:13:10 -04:00