Skip to content
This repository has been archived by the owner on Oct 17, 2023. It is now read-only.

Commit

Permalink
Merge pull request #188 from noir-lang/jc/link2libs
Browse files Browse the repository at this point in the history
fmt + link to libs
  • Loading branch information
critesjosh authored Jun 8, 2023
2 parents 5b150f1 + 472acbc commit 5381370
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
4 changes: 1 addition & 3 deletions docs/modules_packages_crates/crates_and_packages.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
title: Crates and Packages in Noir
title: Crates and Packages
description:
Learn how to use Crates and Packages in your Noir project
keywords: [Nargo, dependencies, package management, crates, package]
---

# Crates and Packages

## Crates

A crate is the smallest amount of code that the Noir compiler considers at a time.
Expand Down
13 changes: 13 additions & 0 deletions docs/modules_packages_crates/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ ecrecover = {tag = "v0.2.0", git = "https://github.com/colinnielsen/ecrecover-no
```

## Specifying a local dependency

You can also specify dependencies that are local to your machine.

For example, this file structure has a library and binary crate

```
├── binary_crate
│   ├── Nargo.toml
Expand All @@ -44,6 +46,7 @@ For example, this file structure has a library and binary crate
```

Inside of the binary crate, you can specify:

```toml
# Nargo.toml

Expand All @@ -70,3 +73,13 @@ can import just the `Point` and the `Curve` that you want to use.
use dep::std::ec::tecurve::affine::Curve;
use dep::std::ec::tecurve::affine::Point;
```

## Available Libraries

Noir does not currently have an official package manager. You can find a list of available Noir libraries in the [awesome-noir repo here](https://github.com/noir-lang/awesome-noir#libraries).

Some libraries that are available today include:

- BigInt
- "`ecrecover`"
- sparse merkle tree verifier
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ ecrecover = {tag = "v0.2.0", git = "https://github.com/colinnielsen/ecrecover-no
```

## Specifying a local dependency

You can also specify dependencies that are local to your machine.

For example, this file structure has a library and binary crate

```
├── binary_crate
│   ├── Nargo.toml
Expand All @@ -44,6 +46,7 @@ For example, this file structure has a library and binary crate
```

Inside of the binary crate, you can specify:

```toml
# Nargo.toml

Expand All @@ -70,3 +73,13 @@ can import just the `Point` and the `Curve` that you want to use.
use dep::std::ec::tecurve::affine::Curve;
use dep::std::ec::tecurve::affine::Point;
```

## Available Libraries

Noir does not currently have an official package manager. You can find a list of available Noir libraries in the [awesome-noir repo here](https://github.com/noir-lang/awesome-noir#libraries).

Some libraries that are available today include:

- BigInt
- "`ecrecover`"
- sparse merkle tree verifier

0 comments on commit 5381370

Please sign in to comment.