Contributing
Report an issue
Section titled “Report an issue”Include the expected behavior, actual behavior, reproduction steps, Rust version, and enabled features. For Telegram API issues, include the method being called.
Remove bot tokens, webhook secrets, and proxy credentials from logs and configuration before posting.
Repository layout
Section titled “Repository layout”| Directory | Package | Responsibility |
|---|---|---|
crates/jingzhe |
jingzhe |
API requests, models, client, routing, and runtime |
crates/http |
jingzhe-http |
HTTP backends, TLS, proxies, multipart, and streaming responses |
crates/macros |
jingzhe-macros |
command, event, and CallbackData procedural macros |
website |
jingzhe-website |
Astro + Starlight documentation site |
Validate Rust changes
Section titled “Validate Rust changes”From the repository root:
cargo fmt --all -- --checkcargo clippy --workspace --all-targets --all-features -- -D warningscargo test --workspace --all-featurescargo test -p jingzhe --no-default-features --features ureq,rustls-tls,webhookcargo test -p jingzhe --no-default-features --features reqwest,native-tlscargo test --workspace --no-default-featuresRUSTDOCFLAGS='-D warnings' cargo doc --workspace --all-features --no-depsValidate documentation
Section titled “Validate documentation”cd websitebun installbun run checkbun run buildLocal preview:
bun run devPull requests
Section titled “Pull requests”Describe the problem, behavior changes, and validation results. If a change depends on a real Telegram account’s permissions, limits, or client behavior, state what was verified against a live account.
Command, event, and callback macro compile cases are covered by trybuild; protocol changes need corresponding regression tests. Update the documentation in website/ when public APIs, configuration, or examples change.