Commit Graph
98 Commits
Author SHA1 Message Date
tottoto 5793e75aac Change tower-http to optional (#1838) 2023-03-10 17:23:50 +01:00
Alex Butler f9f64a3ecd Unpin itoa dependency (#1815) 2023-03-05 14:28:10 +01:00
David Pedersen bc3c35ea5a Release all the crates (#1812) 2023-03-03 18:16:24 +01:00
Spencer Bartholomew 6067223fcc update tokio dep to fix potential security vulnerability (#1787) 2023-02-27 18:40:03 +01:00
David Pedersen 08bac36519 Release axum and axum-extra (#1788) 2023-02-27 09:41:11 +01:00
David Pedersen f726f16b6d Update to tower-http 0.4 (#1783) 2023-02-24 20:51:30 +00:00
David Pedersen 37478772bc Release axum (#1782) 2023-02-24 14:22:47 +01:00
David Pedersen 1e2567c39f Fix missing Allow when middleware are applied to MethodRouter (#1773) 2023-02-20 22:54:44 +01:00
David Pedersen 277be8f813 axum 0.6.7 (#1768) 2023-02-17 15:07:23 +01:00
David Pedersen e6ff0281ae Try cargo public-api-crates on CI (#1761) 2023-02-16 22:41:41 +01:00
David Pedersen c18ff9dd63 Release axum, axum-extra, and axum-macros (#1750) 2023-02-12 12:40:42 +01:00
Jonas Platte 2c9d2dea0e Upgrade dependencies (#1746) 2023-02-11 23:36:40 +00:00
David Pedersen 93ecabf449 Release axum and axum-macros (#1743) 2023-02-11 22:32:16 +01:00
David Pedersen 4a5dc4391c Release axum and axum-macros (#1721) 2023-01-24 13:31:33 +01:00
David Pedersen 6ff6b36293 Release axum and axum-core (#1716) 2023-01-20 23:51:19 +01:00
David Pedersen 1be25d9496 Add internal macro to make tests of nest easier to write (#1694) 2023-01-14 14:12:01 +00:00
David Pedersen 607a20dfac Support deserialize_any for Path (#1693) 2023-01-13 12:27:38 +00:00
David Pedersen e3aaeb3cb7 Release axum, axum-core, and axum-macros (#1688) 2023-01-09 13:54:49 +01:00
Austaras 6638b274db Update to base64 0.20 (#1641) 2023-01-08 15:21:24 +00:00
Paolo Barbolini 211de92d24 Enable the runtime feature of hyper when using tokio (#1671) 2023-01-06 12:28:31 +01:00
tottoto 56d0dd9ec2 Update to tokio-tungstenite-0.18.0 and use sha1 (#1598) 2022-12-02 11:13:57 +01:00
David Pedersen 87a80ec47b axum v0.6.1 (#1588) 2022-11-29 08:43:18 +00:00
tottoto 3279d64f96 Update to matchit 0.7 (#1582) 2022-11-27 10:19:01 +01:00
David PedersenandJonas Platte 1b6780cf6c axum 0.6 and friends 🎉 (#1570)
* changelog

* bump versions

* reorder changelogs a bit

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* Expand fallback inheritance

* Reword tsr

* Mention `parse-body-based-on-content-type` example

Co-authored-by: Jonas Platte <[email protected]>
2022-11-25 12:29:58 +00:00
d5de3bc7e3 Improve compile errors for unimplemented traits (#1436)
* Improve `debug_handler` to use the correct span for specific bounds

This results in better localised error messages, as they now point
directly to the corresponding argument instead of to the macro itself.

* Improve some error messages behind a `nightly-error-messages` feature
flag

This uses the nightly only `rustc_on_unimplemented` attribute to improve
some error messages when users try to use invalid handler functions.
This should be seen as prove of concept, not as full solution for all
potential error cases.

The underlying feature is currently marked as permanently unstable, but
I'm working on getting this specific attribute (or an attribute with
different name, similar functionality) ready to work on a stable compiler.

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* Enable the `nightly-error-messages` feature unconditionally for nightly compilers

* Use a nightly compiler to run the axum-marcos compile fail tests

* update to newer nightly

* Run axum-macros tests on nightly

* tweak compile error hints a bit

* more tweaks

* update test

Co-authored-by: Jonas Platte <[email protected]>
Co-authored-by: David Pedersen <[email protected]>
2022-11-19 12:45:03 +01:00
David Pedersen 878ae73e6d New release candidates (#1541) 2022-11-18 17:29:47 +01:00
David Pedersen 2e8a7e51a1 Fix Handler::with_state not working if request body was changed via layer (#1536)
Previously

```rust
handler.layer(RequestBodyLimitLayer::new(...)).with_state(...)
```

didn't work because we required the same request body all the way
through.
2022-11-18 11:00:52 +01:00
David Pedersen 74bbe80f8a axum 0.6.0-rc.4 (#1518) 2022-11-09 13:49:47 +01:00
David PedersenandJonas Platte e39d053d2f New release candidates (#1514)
* New release candidates

* Update axum/Cargo.toml

Co-authored-by: Jonas Platte <[email protected]>

Co-authored-by: Jonas Platte <[email protected]>
2022-11-09 09:01:47 +01:00
31638a2b22 Add tokio feature & make tokio optional for WASM support (#1382)
* add server feature and make tokio and hyper/server and tcp optional

* address review comments

* don't mention any specific runtimes in the example

* sort deps

* add `tokio` feature when adding `ws`

* don't always pull in tower feature that pulls in tokio io stuff

* remove usage of `tokio_cr`

* changelog

* depend on tokio version that supports wasm

* don't make it sound like tokio doesn't support wasm

* call out new default feature

Co-authored-by: Fisher Darling <[email protected]>
Co-authored-by: David Pedersen <[email protected]>
2022-09-25 15:10:33 +00:00
Hong Minhee (洪 民憙)andLee Dogeon 7476dd08cb Show the errored path on JsonDataError (#1371)
Previously, it was difficult to find out the path in the deep JSON tree at
which a deserialization error occurred.  This patch makes an error message
to contain the errored path.  In order to find out the path,
I added serde_path_to_error, a new optional dependency.

Co-authored-by: Lee Dogeon <[email protected]>

Co-authored-by: Lee Dogeon <[email protected]>
2022-09-13 17:52:16 +02:00
David PedersenandJonas Platte 54d8439e35 Ship rc.2 (#1363)
* rc.2

* don't bump version of axum-macros

* fix

* Update axum/Cargo.toml

Co-authored-by: Jonas Platte <[email protected]>

* undo release of axum-extra

* fix

Co-authored-by: Jonas Platte <[email protected]>
2022-09-11 16:42:04 +02:00
David Pedersen b315b60bca Bump version of all crates (#1310)
* Bump version of all crates

* use the right versions inside the workspace
2022-08-23 22:57:13 +02:00
David PedersenandJonas Platte 50a4be999d Update matchit and fix nesting inconsistencies (#1086)
* Break `Router::nest` into `nest` and `nest_service` methods

* fix doc tests

* update docs

* fix

* Only accept `Router` in `Resource::{nest, nest_collection}`

* update changelog

* fix docs

* fix `MatchedPath` with `Router`s nested with `nest_service`

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* adjust docs for fallbacks

* Always nest services as opaque

* fix old docs reference

* more tests for `MatchedPath` with nested handlers

* minor clean up

* use identifier captures in format strings

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* fix test

Co-authored-by: Jonas Platte <[email protected]>
2022-08-11 10:17:08 +00:00
David Pedersen 9e50bf16fb Add initial benchmarks (#1243)
* Add initial benchmarks

* improve error message if rewrk isn't installed

* what env vars does github ci have?

* run benchmarks for a bit on ci

* debug error

* ignore args on ci

* actually also locally

* apply review suggestions
2022-08-11 08:52:23 +00:00
Jonas Platte 7cbb7cf135 Use new Cargo features to avoid implicit features for optional dependencies (#1239)
* Fix changelog entry for MSRV change in axum-extra 0.3.5

* Bump MSRV to 1.60 for axum, axum-extra, axum-macros

* Use new Cargo features to avoid implicit features for optional dependencies
2022-08-09 18:43:02 +02:00
Jonas Platte f0f60681ef Fix intra-doc links on docs.rs (#1205)
* Use version 2 of Cargo's feature resolver

* Increase minimum version of tungstenite

Tungstenite 0.17.1 has a higher MSRV, and there should be no reason to
use it over 0.17.2.

* Clean up and fix MSRV CI job

* Fix some intra-doc links not resolving correctly on docs.rs

* Bump minimum version of tower

… to avoid dependencies with a broken minimum-versions chain.
2022-07-28 19:14:31 +02:00
Jonas Platte 141198ce19 Declare MSRV in Cargo manifests, not .clippy.toml (#1206) 2022-07-28 15:31:47 +02:00
David Pedersen bed0b83421 Add http-server as crates.io subcategory 2022-07-10 14:28:11 +02:00
David Pedersen 2966407dc1 Re-export debug_handler from axum (#1144)
* Re-export `debug_handler` from axum

Fixes #1143

* also axum-extra
2022-07-04 09:10:52 +00:00
David Pedersen 7e794e9d1d axum: Version 0.5.10 (#1128) 2022-06-28 21:32:39 +02:00
David Pedersen f6b1d35c51 Use minimal dependency versions for MSRV tests on CI (#1109) 2022-06-27 20:44:20 +02:00
David Pedersen fabb205a9e axum: Version 0.5.9 (#1108) 2022-06-20 13:44:15 +02:00
David Pedersen 5ac0b2b3d7 axum: Version 0.5.8 (#1104) 2022-06-18 11:38:52 +02:00
David Pedersen 7deaff7e1e axum-core: Version 0.2.6 (#1103) 2022-06-18 11:00:19 +02:00
David Pedersen 93251fa203 Bump MSRV to 1.56 and update to the 2021 edition (#1098) 2022-06-17 20:11:35 +02:00
David Pedersen f66893fbda Add missing version for serde_json in Cargo.toml
No idea how that went away
2022-06-10 16:57:53 +02:00
David Pedersen 968ee44631 Sort dependencies in Cargo.tomls (#1076)
* sort dependencies

* check sorted deps on CI

* this should fail

* does caching matter?

* fix sorting
2022-06-10 08:59:17 +02:00
David Pedersen 7aa3f35129 axum: Version 0.5.7 (#1075) 2022-06-08 16:08:11 +02:00
David Pedersen a9eb4ac527 axum-core: Version 0.2.5 (#1073) 2022-06-08 15:56:56 +02:00