Skip to content
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
2 changes: 1 addition & 1 deletion docs/docs/how_to/using-devcontainers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Github comes with a default codespace and you can use it to code your own devcon
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/noir-lang/features/noir:latest": {
"version": "1.0.0-beta.1"
"version": "1.0.0-beta.2"
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions docs/docs/noir/concepts/assert.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ sidebar_position: 4

Noir includes a special `assert` function which will explicitly constrain the predicate/comparison
expression that follows to be true. If this expression is false at runtime, the program will fail to
be proven. Example:
be proven. As of v1.0.0-beta.2, assert statements are expressions and can be used in value contexts.

Example:

```rust
fn main(x : Field, y : Field) {
Expand Down Expand Up @@ -75,4 +77,3 @@ fn main(x : Field, y : Field) {
static_assert(example_slice.len() == 0, error_message);
}
```

6 changes: 3 additions & 3 deletions docs/docs/noir/concepts/control_flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ The iteration variable `i` is still increased by one as normal when `continue` i

## Loops

In unconstrained code, `loop` is allowed for loops that end with a `break`.
A `loop` must have at least one `break` in it.
In unconstrained code, `loop` is allowed for loops that end with a `break`.
A `loop` must contain at least one `break` statement that is reachable during execution.
This is only allowed in unconstrained code since normal constrained code requires that Noir knows exactly how many iterations
a loop may have.

```rust
let mut i = 10
let mut i = 10;
loop {
println(i);
i -= 1;
Expand Down
6 changes: 3 additions & 3 deletions docs/docs/tutorials/noirjs_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Let's go barebones. Doing the bare minimum is not only simple, but also allows y
Barebones means we can immediately start with the dependencies even on an empty folder 😈:

```bash
bun i @noir-lang/noir_wasm@1.0.0-beta.1 @noir-lang/noir_js@1.0.0-beta.1 @aztec/bb.js@0.63.1
bun i @noir-lang/noir_wasm@1.0.0-beta.2 @noir-lang/noir_js@1.0.0-beta.2 @aztec/bb.js@0.72.1
```

Wait, what are these dependencies?
Expand All @@ -36,7 +36,7 @@ Wait, what are these dependencies?

:::info

In this guide, we will install versions pinned to 1.0.0-beta.1. These work with Barretenberg version 0.63.1, so we are using that one version too. Feel free to try with older or later versions, though!
In this guide, we will install versions pinned to 1.0.0-beta.2. These work with Barretenberg version 0.72.1, so we are using that one version too. Feel free to try with older or later versions, though!

:::

Expand All @@ -50,7 +50,7 @@ It's not just you. We also enjoy syntax highlighting. [Check out the Language Se

:::

All you need is a `main.nr` and a `Nargo.toml` file. You can follow the [noirup](../getting_started/noir_installation.md) installation and just run `noirup -v 1.0.0-beta.1`, or just create them by hand:
All you need is a `main.nr` and a `Nargo.toml` file. You can follow the [noirup](../getting_started/noir_installation.md) installation and just run `noirup -v 1.0.0-beta.2`, or just create them by hand:

```bash
mkdir -p circuit/src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Github comes with a default codespace and you can use it to code your own devcon
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/noir-lang/features/noir:latest": {
"version": "1.0.0-beta.1"
"version": "1.0.0-beta.2"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ sidebar_position: 4

Noir includes a special `assert` function which will explicitly constrain the predicate/comparison
expression that follows to be true. If this expression is false at runtime, the program will fail to
be proven. Example:
be proven. As of v1.0.0-beta.2, assert statements are expressions and can be used in value contexts.

Example:

```rust
fn main(x : Field, y : Field) {
Expand Down Expand Up @@ -75,4 +77,3 @@ fn main(x : Field, y : Field) {
static_assert(example_slice.len() == 0, error_message);
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ The iteration variable `i` is still increased by one as normal when `continue` i

## Loops

In unconstrained code, `loop` is allowed for loops that end with a `break`.
A `loop` must have at least one `break` in it.
In unconstrained code, `loop` is allowed for loops that end with a `break`.
A `loop` must contain at least one `break` statement that is reachable during execution.
This is only allowed in unconstrained code since normal constrained code requires that Noir knows exactly how many iterations
a loop may have.

```rust
let mut i = 10
let mut i = 10;
loop {
println(i);
i -= 1;
Expand All @@ -95,4 +95,3 @@ loop {
}
}
```

Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Let's go barebones. Doing the bare minimum is not only simple, but also allows y
Barebones means we can immediately start with the dependencies even on an empty folder 😈:

```bash
bun i @noir-lang/noir_wasm@1.0.0-beta.1 @noir-lang/noir_js@1.0.0-beta.1 @aztec/bb.js@0.63.1
bun i @noir-lang/noir_wasm@1.0.0-beta.2 @noir-lang/noir_js@1.0.0-beta.2 @aztec/bb.js@0.72.1
```

Wait, what are these dependencies?
Expand All @@ -36,7 +36,7 @@ Wait, what are these dependencies?

:::info

In this guide, we will install versions pinned to 1.0.0-beta.1. These work with Barretenberg version 0.63.1, so we are using that one version too. Feel free to try with older or later versions, though!
In this guide, we will install versions pinned to 1.0.0-beta.2. These work with Barretenberg version 0.72.1, so we are using that one version too. Feel free to try with older or later versions, though!

:::

Expand All @@ -50,7 +50,7 @@ It's not just you. We also enjoy syntax highlighting. [Check out the Language Se

:::

All you need is a `main.nr` and a `Nargo.toml` file. You can follow the [noirup](../getting_started/noir_installation.md) installation and just run `noirup -v 1.0.0-beta.1`, or just create them by hand:
All you need is a `main.nr` and a `Nargo.toml` file. You can follow the [noirup](../getting_started/noir_installation.md) installation and just run `noirup -v 1.0.0-beta.2`, or just create them by hand:

```bash
mkdir -p circuit/src
Expand Down