Skip to content

Commit

Permalink
docs: update installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulRBerg committed Dec 31, 2023
1 parent 6309ee2 commit 6755243
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,45 @@ all the boxes mentioned thus far, but it doesn't offer type safety.

## Install

All users are recommended to install PRBMath as a Node.js package:
### Node.js

```sh
This is the recommended approach.

Install PRBMath using your favorite package manager, e.g., with Bun:

```shell
bun add @prb/math
```

This example uses Bun, but it also possible to use Npm, Yarn, or Pnpm.
Then, if you are using Foundry, you need to add this to your `remappings.txt` file:

```text
@prb/math/=node_modules/@prb/math/
```

### Git Submodules

### Foundry
This installation method is not recommended, but it is available for those who prefer it.

If you're using Foundry, you have to add this to your `remappings.txt` file:
First, install the submodule using Forge:

```shell
forge install --no-commit PaulRBerg/prb-math@release-v4
```

Your `.gitmodules` file should now contain the following entry:

```toml
[submodule "lib/prb-math"]
branch = "release-v4"
path = "lib/prb-math"
url = "https://github.com/PaulRBerg/prb-math"
```

Finally, add this to your `remappings.txt` file:

```text
@prb/math/=node_modules/@prb/math/
@prb/math/=lib/prb-math/
```

## Usage
Expand Down

0 comments on commit 6755243

Please sign in to comment.