Repo: Organise and document processes and architecture (#43)
* Add Makefile for common contributor tasks Narrows down a few commands to automatically format when building, and neatly expose testing/benching. Empty files added to describe contributor guidelines, overall architecture. * First draft of contributor guidelines * Simple architecture diagrams * Add PNG variants of architecture diagrams Swapping to these because not having Fira Sans installed on a viewing machine leads to terrible kerning. * Architecture description. * MD cross-refs.
This commit is contained in:
51
Makefile.toml
Normal file
51
Makefile.toml
Normal file
@@ -0,0 +1,51 @@
|
||||
[tasks.format]
|
||||
toolchain = "nightly"
|
||||
install_crate = { crate_name = "rustfmt-nightly", rustup_component_name = "rustfmt-preview", binary = "rustfmt", test_arg = "--help" }
|
||||
command = "cargo"
|
||||
args = ["fmt", "--all"]
|
||||
|
||||
[tasks.build]
|
||||
args = ["build", "--features", "full-doc"]
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.build-examples]
|
||||
args = ["build", "--manifest-path", "./examples/Cargo.toml", "--workspace"]
|
||||
command = "cargo"
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.build-gateway]
|
||||
args = ["build", "--features", "serenity-rustls"]
|
||||
command = "cargo"
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.build-driver]
|
||||
args = ["build", "--features", "driver,rustls"]
|
||||
command = "cargo"
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.build-old-tokio]
|
||||
command = "cargo"
|
||||
args = ["build", "--features", "serenity-rustls-tokio-02,driver-tokio-02"]
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.build-variants]
|
||||
dependencies = ["build", "build-gateway", "build-driver", "build-old-tokio"]
|
||||
|
||||
[tasks.clippy]
|
||||
args = ["clippy", "--features", "full-doc", "--", "-D", "warnings"]
|
||||
dependencies = ["format"]
|
||||
|
||||
[tasks.test]
|
||||
args = ["test", "--features", "full-doc"]
|
||||
|
||||
[tasks.bench]
|
||||
description = "Runs performance benchmarks."
|
||||
category = "Test"
|
||||
command = "cargo"
|
||||
args = ["bench", "--features", "internals,full-doc"]
|
||||
|
||||
[tasks.doc]
|
||||
args = ["doc", "--features", "full-doc"]
|
||||
|
||||
[tasks.ready]
|
||||
dependencies = ["format", "test", "build-variants", "build-examples", "doc", "clippy"]
|
||||
Reference in New Issue
Block a user