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

Improve grammar clarity First Steps with Foundry #1306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/getting-started/first-steps.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,36 @@
## First Steps with Foundry

This section provides an overview of the `forge` command line tool. We demonstrate how to create a new project, compile, and test it.
This section introduces the `forge` command-line tool. We will walk through creating a new project, compiling it, and running tests.

To start a new project with Foundry, use [`forge init`](../reference/forge/forge-init.md):
To start a new project with Foundry, use the [`forge init`](../reference/forge/forge-init.md) command:

```sh
{{#include ../output/hello_foundry/forge-init:command}}
```

Let's check out what `forge` generated for us:
Now, let’s explore the structure that `forge` has generated for us:

```sh
$ cd hello_foundry
{{#include ../output/hello_foundry/tree:all}}
```

We can build the project with [`forge build`](../reference/forge/forge-build.md):
You can compile the project using [`forge build`](../reference/forge/forge-build.md):

```sh
{{#include ../output/hello_foundry/forge-build:all}}
```

And run the tests with [`forge test`](../reference/forge/forge-test.md):
To run the tests, use the [`forge test`](../reference/forge/forge-test.md) command:

```sh
{{#include ../output/hello_foundry/forge-test:all}}
```

<br>

> 💡 **Tip**
>
> You can always print help for any subcommand (or their subcommands) by adding `--help` at the end.
>
> You can always view detailed help for any command or subcommand by appending `--help` to it.

You can watch [these](../tutorials/learn-foundry.md) beginner tutorials if you are a visual learner.
For visual learners, be sure to check out these [beginner tutorials](../tutorials/learn-foundry.md).
57 changes: 24 additions & 33 deletions src/getting-started/installation.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,58 @@
## Installation

If you face any issues while installing, check out the [FAQ](../faq.md).
If you encounter any issues during installation, refer to the [FAQ](../faq.md) for assistance.

### Precompiled binaries
### Precompiled Binaries

Precompiled binaries are available from the [GitHub releases page](https://github.com/foundry-rs/foundry/releases).
These are better managed by using [Foundryup](#using-foundryup).
Precompiled binaries can be downloaded from the [GitHub releases page](https://github.com/foundry-rs/foundry/releases). For easier management, we recommend using [Foundryup](#using-foundryup).

### Using Foundryup

Foundryup is the Foundry toolchain installer. You can find more about it [here](https://github.com/foundry-rs/foundry/blob/master/foundryup/README.md).
Foundryup is the official installer for the Foundry toolchain. You can learn more about it [here](https://github.com/foundry-rs/foundry/blob/master/foundryup/README.md).

Open your terminal and run the following command:
To install Foundryup, open your terminal and run the following command:

```sh
curl -L https://foundry.paradigm.xyz | bash
```

This will install Foundryup, then simply follow the instructions on-screen,
which will make the `foundryup` command available in your CLI.
This will install Foundryup. Simply follow the on-screen instructions, and the `foundryup` command will become available in your CLI.

Running `foundryup` by itself will install the latest (nightly) [precompiled binaries](#precompiled-binaries): `forge`, `cast`, `anvil`, and `chisel`.
See `foundryup --help` for more options, like installing from a specific version or commit.
Running `foundryup` will automatically install the latest (nightly) versions of the [precompiled binaries](#precompiled-binaries): `forge`, `cast`, `anvil`, and `chisel`. For additional options, such as installing a specific version or commit, run `foundryup --help`.

> ℹ️ **Note**
>
> If you're on Windows, you will need to install and use [Git BASH](https://gitforwindows.org/) or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install),
> as your terminal, since Foundryup currently does not support Powershell or Cmd.
> ℹ️ **Note**
> If you're using Windows, you'll need to install and use [Git BASH](https://gitforwindows.org/) or [WSL](https://learn.microsoft.com/en-us/windows/wsl/install) as your terminal, since Foundryup currently doesn't support Powershell or Command Prompt (Cmd).

### Building from source
### Building from Source

#### Prerequisites

You will need the [Rust](https://rust-lang.org) compiler and Cargo, the Rust package manager.
The easiest way to install both is with [`rustup.rs`](https://rustup.rs/).
You’ll need the [Rust](https://rust-lang.org) compiler and Cargo, Rust's package manager. The easiest way to install both is by using [`rustup.rs`](https://rustup.rs/).

Foundry generally only supports building on the latest stable Rust version.
If you have an older Rust version, you can update with `rustup`:
Foundry generally supports building only with the latest stable version of Rust. If you're using an older version of Rust, you can update it with `rustup`:

```sh
rustup update stable
```

On Windows, you will also need a recent version of [Visual Studio](https://visualstudio.microsoft.com/downloads/),
installed with the "Desktop Development With C++" Workloads option.
For Windows users, you'll also need a recent version of [Visual Studio](https://visualstudio.microsoft.com/downloads/), with the "Desktop Development With C++" workload installed.

#### Building

You can either use the different [Foundryup](#using-foundryup) flags:
You can either use the various flags provided by [Foundryup](#using-foundryup):

```sh
foundryup --branch master
foundryup --path path/to/foundry
```

Or, by using a single Cargo command:
Alternatively, you can install via Cargo with the following command:

```sh
cargo install --git https://github.com/foundry-rs/foundry --profile release --locked forge cast chisel anvil
```

Or, by manually building from a local copy of the [Foundry repository](https://github.com/foundry-rs/foundry):
You can also manually build from a local copy of the [Foundry repository](https://github.com/foundry-rs/foundry):

```sh
# clone the repository
Expand All @@ -76,28 +68,27 @@ cargo install --path ./crates/anvil --profile release --force --locked
cargo install --path ./crates/chisel --profile release --force --locked
```

### Installing for CI in Github Action
### CI Installation with GitHub Actions

See the [foundry-rs/foundry-toolchain](https://github.com/foundry-rs/foundry-toolchain) GitHub Action.
For instructions on setting up Foundry in a CI pipeline, refer to the [foundry-rs/foundry-toolchain](https://github.com/foundry-rs/foundry-toolchain) GitHub Action.

### Using Foundry with Docker

Foundry can also be used entirely within a Docker container. If you don't have it, Docker can be installed directly from [Docker's website](https://docs.docker.com/get-docker/).
Foundry can also be run inside a Docker container. If you dont have Docker installed, you can download it from [Docker's website](https://docs.docker.com/get-docker/).

Once installed, you can download the latest release by running:
Once Docker is installed, you can pull the latest Foundry release by running:

```sh
docker pull ghcr.io/foundry-rs/foundry:latest
```

It is also possible to build the docker image locally. From the Foundry repository, run:
You can also build the Docker image locally by running the following command from the Foundry repository:

```sh
docker build -t foundry .
```

For examples and guides on using this image, see the [Docker tutorial section](../tutorials/foundry-docker).
For examples and guides on using this image, refer to the [Docker tutorial section](../tutorials/foundry-docker).

> ℹ️ **Note**
>
> Some machines (including those with M1 chips) may be unable to build the docker image locally. This is a known issue.
> ℹ️ **Note**
> Some systems, including those with M1 chips, may experience issues when building the Docker image locally. This is a known issue.