From bbcb91abb89f7b67a9bc31f7d9b7b43a05f2a416 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Thu, 4 Aug 2022 16:55:30 +0200 Subject: [PATCH] docs: add basic dev docs folder (#2608) --- docs/dev/README.md | 44 ++++++++++++++++++++++++++++++++++++++++ docs/dev/architecture.md | 5 +++++ docs/dev/debugging.md | 5 +++++ 3 files changed, 54 insertions(+) create mode 100644 docs/dev/README.md create mode 100644 docs/dev/architecture.md create mode 100644 docs/dev/debugging.md diff --git a/docs/dev/README.md b/docs/dev/README.md new file mode 100644 index 000000000000..0b6f60ef4042 --- /dev/null +++ b/docs/dev/README.md @@ -0,0 +1,44 @@ +# Contributing Quick Start + +The foundry Rust project is organized as a regular [Cargo workspace][cargo-workspace]. + +Simply running + +``` +$ cargo test +``` + +should be enough to get you started! + +To learn more about how foundry's tools works, see [./architecture.md](./architecture.md). +It also explains the high-level layout of some aspects of the source code. +To read more about how to use it, see [📖 Foundry Book][foundry-book] +Note though, that the internal documentation is very incomplete. + +# Getting in Touch + +See also [Getting Help](../../README.md#getting-help) + +# Issue Labels + +* [good-first-issue](https://github.com/foundry-rs/foundry/labels/good%20first%20issue) + are good issues to get into the project. +* [D-easy](https://github.com/foundry-rs/foundry/issues?q=is%3Aopen+is%3Aissue+label%3AD-easy), + [D-average](https://github.com/foundry-rs/foundry/issues?q=is%3Aopen+is%3Aissue+label%3AD-medium), + [D-hard](https://github.com/foundry-rs/foundry/issues?q=is%3Aopen+is%3Aissue+label%3AD-hard), + [D-chore](https://github.com/foundry-rs/foundry/issues?q=is%3Aopen+is%3Aissue+label%3AD-chore), + labels indicate how hard it would be to write a fix or add a feature. + + +# CI + +We use GitHub Actions for CI. +We use [cargo-nextest][nextest] as the test runner +If `cargo test` passes locally, that's a good sign that CI will be green as well. +We also have tests that make use of forking mode which can be long running if the required state is not already cached locally. +Forking-related tests are executed exclusively in a separate CI job, they are identified by `fork` in their name. +So all of them can be easily skipped by `cargo t -- --skip fork` + +[foundry-book]: https://book.getfoundry.sh +[cargo-workspace]: https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html +[nextest]: https://nexte.st/ \ No newline at end of file diff --git a/docs/dev/architecture.md b/docs/dev/architecture.md new file mode 100644 index 000000000000..f99ec06a1ab6 --- /dev/null +++ b/docs/dev/architecture.md @@ -0,0 +1,5 @@ +# Architecture + +This document describes the high-level architecture of foundry. + +# TODO \ No newline at end of file diff --git a/docs/dev/debugging.md b/docs/dev/debugging.md new file mode 100644 index 000000000000..7b1f4117b440 --- /dev/null +++ b/docs/dev/debugging.md @@ -0,0 +1,5 @@ +# Debugging foundry tools + +All crates use [tracing](https://docs.rs/tracing/latest/tracing/) for logging. An console formatter is installed in each binary (`cast`, `forge`, `anvil`). + +Logging output is enabled via `RUST_LOG` var. Running `forge` with `RUST_LOG=forge` will emit all logs of the `cli` crate, same for `cast`.