Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing a book about axum using the examples #3268

Open
szabgab opened this issue Mar 14, 2025 · 3 comments
Open

Writing a book about axum using the examples #3268

szabgab opened this issue Mar 14, 2025 · 3 comments

Comments

@szabgab
Copy link
Contributor

szabgab commented Mar 14, 2025

I volunteered to give a presentation about axum at our local Rust user group. This gave me a good excuse to start to learn axum. I was happy to see that there are lots of examples, but I was not sure in which order to try to read them. I also had to start to prepare some examples for my presentation. This lead me to the idea of writing a book using the already existing examples.

In the process I hope to make improvements to the examples including adding tests as mentioned in #3263.

I am writing the book in a fork of this repo in the hope that one day it can be integrated into the main repository of axum and published on the web site of the project. e.g. on the tokio.rs web site in the /axum path. Till then you can see the current state of the book here: https://axum.code-maven.com/ .
You can see its source in my fork in the book branch

I am opening this is issue primarily to get your feedback.

@AudioDan
Copy link

Thank you for taking on a project like this. I believe it will be hugely beneficial. We are currently in the middle of a migration from Warp to Axum and have found it challenging because of the breaking changes in syntax between 0.6.x, 07.x, and 0.8.x. This has rendered most of the example code we find on the internet invalid. Having up to date examples will be hugely beneficial. I would also like to mention for the other Axum experts reading this that if a few of you could take 20 minutes now and then, look at the top ranked stack overflow Axum questions and re-answer them with 0.8.x code that would really help new users understand the changes in syntax.

@ISensuiI
Copy link

You are awesome, my friend. I am also learning Axum, and there are no tutorials online for 7.9.X and later, and most versions are not compatible. I took a quick look at your website, it is great, and I hope Axum can incorporate this resource into the official examples.

@yanns
Copy link
Collaborator

yanns commented Mar 21, 2025

It's very nice to see this initiative.
Some feedback: maybe instead of reproducing the examples, the book should have another goal. Some ideas:

  • tutorial guiding step by step to start an axum application
  • for some "features", describe how to do it, like:
    • how to set websockets
    • how to setup SSL
    • how to use forms

Example about forms, instead of reproducing the example as in https://axum.code-maven.com/form, the section would guide the developer how to achieve this:

  • how to model the data sent by form
  • how to create the handle
  • how to create the html form
  • how to test this

And then a general feedback: how do you see the future of this book? Who should own it and maintain it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants