If you are new to GitHub, visit the first-contributions instructions to learn how to contribute on GitHub.
If you are new to Rust, I recommend you to go through the book.
Assuming that you have mentioned the issue you are working on and that you have forked and cloned the repository locally, in order to contribute by making changes to the code follow the steps below:
The project is divided into three crates:
- The local web server:
axum-server
- The cloudflare worker:
cf-worker
- The common libraries:
libs
To add or fix something, you might want to start at libs
. Then validate and
test it locally using axum-server
.
cargo run --bin axum-server
You can also use cargo-watch to test your changes in real-time.
# Install cargo watch
cargo install cargo-watch
# Run
cargo watch -- cargo run --bin axum-server
Then you can come to cf-worker
and implement the changes. Test & validate
using wrangler
# Install cargo watch
cargo install wrangler
# Run
wrangler dev
It's recommended to format your code and run linter before you push. Run the following commands.
cargo fmt
cargo clippy
Don't worry if you make a mistake, we will provide constructive feedback and guidance to improve the pull request.
If you encounter any situation that violates our code of conduct please report it to [email protected].