* 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 <jplatte+git@posteo.de>
* 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 <jplatte+git@posteo.de>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* 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 <fdarlingco@gmail.com>
Co-authored-by: David Pedersen <david.pdrsn@gmail.com>
* 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
* Replace async-graphql with link to async-graphql's own examples
* exclude async-graphql directory
* does this fix it?
* apparently this needs to be sorted as well
* Update .github/workflows/CI.yml
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
Co-authored-by: Jonas Platte <jplatte+git@posteo.de>
* improve workspace caching
This improves workspace caching performance by using the workspace parameter of rust-cache@v2.
* apply the same technique here as well
* 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.
* Add `axum-extra` crate
Empty for now but now we have a place to put stuff.
I'll make a PR for moving over https://github.com/davidpdrsn/axum-resource.
* remove `authors` field from `Cargo.toml`s
* Move `axum-handle-error-extract` into axum
With 0.4 underway we can now nuke `axum-handle-error-extract` and move
its code directly into axum.
So this replaces the old `HandleErrorLayer` with one that supports async
functions and extractors.
* changelog
* fix CI
* Clean up axum-debug crate
Mostly just brings the crate more in line with the rest of the crates in
the workspace.
I've also removed the axum-debug-macros crate since axum-debug only
contained one re-export from axum-debug-macros. So we didn't need two
crates. Can always bring the "backend" crate back if we need things in
axum-debug that aren't proc-macros.
* Just testing: This should make CI fail
* Misc CI clean up
* fix intentional breakage
* fix changelog
* Remove rustfmt config for now as it gives warnings on stable
* Fix paths
* Move axum crate into workspace subfolder
Over time I imagine we're gonna have other crates in this repo that
provide utilities or integrations for axum. This prepares for that by
moving the main axum crate into its own folder.
The README situation is a bit annoying because we want `./README.md`
for viewing the repo on github but `axum/README.md` for crates.io. For
now I've just copy/pasted it and added CI step to make sure they're
identical.
* update changelog link
* Add licenses to all examples
* is this how you install `diff`?
* or maybe this is how?
* fix readme links
* like this?
* fix cargo-deny step
* Try making root readme a symlink
* remove compare readme step
not needed since readme in repo root is now a symlink
* Revert "Add licenses to all examples"
This reverts commit ab321b7fb9.