Skip to content

Commit

Permalink
Merge branch 'master' into gd/issue_6394
Browse files Browse the repository at this point in the history
  • Loading branch information
guipublic authored Jan 29, 2025
2 parents 39bc8e6 + 506641b commit da8a8a1
Show file tree
Hide file tree
Showing 13 changed files with 4,009 additions and 107 deletions.
156 changes: 78 additions & 78 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 7 additions & 3 deletions compiler/noirc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,14 @@ pub struct CompileOptions {
#[arg(long)]
pub skip_underconstrained_check: bool,

/// Flag to turn off the compiler check for missing Brillig call constrains.
/// Warning: This can improve compilation speed but can also lead to correctness errors.
/// Flag to turn on the compiler check for missing Brillig call constraints.
/// Warning: This can degrade compilation speed but will also find some correctness errors.
/// This check should always be run on production code.
#[arg(long)]
pub enable_brillig_constraints_check: bool,

/// Hidden Brillig call check flag to maintain CI compatibility (currently ignored)
#[arg(long, hide = true)]
pub skip_brillig_constraints_check: bool,

/// Setting to decide on an inlining strategy for Brillig functions.
Expand Down Expand Up @@ -679,7 +683,7 @@ pub fn compile_no_check(
},
emit_ssa: if options.emit_ssa { Some(context.package_build_path.clone()) } else { None },
skip_underconstrained_check: options.skip_underconstrained_check,
skip_brillig_constraints_check: options.skip_brillig_constraints_check,
enable_brillig_constraints_check: options.enable_brillig_constraints_check,
inliner_aggressiveness: options.inliner_aggressiveness,
max_bytecode_increase_percent: options.max_bytecode_increase_percent,
};
Expand Down
6 changes: 3 additions & 3 deletions compiler/noirc_evaluator/src/ssa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ pub struct SsaEvaluatorOptions {
/// Skip the check for under constrained values
pub skip_underconstrained_check: bool,

/// Skip the missing Brillig call constraints check
pub skip_brillig_constraints_check: bool,
/// Enable the missing Brillig call constraints check
pub enable_brillig_constraints_check: bool,

/// The higher the value, the more inlined Brillig functions will be.
pub inliner_aggressiveness: i64,
Expand Down Expand Up @@ -112,7 +112,7 @@ pub(crate) fn optimize_into_acir(
));
}

if !options.skip_brillig_constraints_check {
if options.enable_brillig_constraints_check {
ssa_level_warnings.extend(time(
"After Check for Missing Brillig Call Constraints",
options.print_codegen_timings,
Expand Down
2 changes: 1 addition & 1 deletion compiler/noirc_evaluator/src/ssa/opt/hint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod tests {
expression_width: ExpressionWidth::default(),
emit_ssa: None,
skip_underconstrained_check: true,
skip_brillig_constraints_check: true,
enable_brillig_constraints_check: false,
inliner_aggressiveness: 0,
max_bytecode_increase_percent: None,
};
Expand Down
24 changes: 5 additions & 19 deletions docs/docs/how_to/using-devcontainers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,29 +60,15 @@ Github comes with a default codespace and you can use it to code your own devcon

#### 3. Create a folder called `.devcontainer` in the root of your repository.

#### 4. Create a Dockerfile in that folder, and paste the following code:

```docker
FROM --platform=linux/amd64 node:lts-bookworm-slim
SHELL ["/bin/bash", "-c"]
RUN apt update && apt install -y curl bash git tar gzip libc++-dev
RUN curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
ENV PATH="/root/.nargo/bin:$PATH"
RUN noirup
ENTRYPOINT ["nargo"]
```
#### 5. Create a file called `devcontainer.json` in the same folder, and paste the following code:
#### 4. Create a file called `devcontainer.json` in the same folder, and paste the following code:

```json
{
"name": "Noir on Codespaces",
"build": {
"context": ".",
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": ["noir-lang.vscode-noir"]
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/noir-lang/features/noir:latest": {
"version": "1.0.0-beta.1"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion test_programs/compilation_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ current_dir=$(pwd)
base_path="$current_dir/execution_success"

# Tests to be profiled for compilation report
tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression")
tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression" "global_var_regression_entry_points")

echo "{\"compilation_reports\": [ " > $current_dir/compilation_report.json

Expand Down
2 changes: 1 addition & 1 deletion test_programs/execution_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ current_dir=$(pwd)
base_path="$current_dir/execution_success"

# Tests to be profiled for execution report
tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression")
tests_to_profile=("sha256_regression" "regression_4709" "ram_blowup_regression" "global_var_regression_entry_points")

echo "{\"execution_reports\": [ " > $current_dir/execution_report.json

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "global_var_regression_entry_points"
type = "bin"
authors = [""]

[dependencies]
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
x = 0
y = 1
Loading

0 comments on commit da8a8a1

Please sign in to comment.