diff --git a/docs/docs/explanations/_category_.json b/docs/docs/explanations/_category_.json new file mode 100644 index 00000000000..151ee204894 --- /dev/null +++ b/docs/docs/explanations/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 3, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/modules_packages_crates/_category_.json b/docs/docs/explanations/modules_packages_crates/_category_.json new file mode 100644 index 00000000000..1debcfe7675 --- /dev/null +++ b/docs/docs/explanations/modules_packages_crates/_category_.json @@ -0,0 +1,6 @@ +{ + "label": "Modules, Packages and Crates", + "position": 2, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/02_modules_packages_crates/crates_and_packages.md b/docs/docs/explanations/modules_packages_crates/crates_and_packages.md similarity index 99% rename from docs/docs/explanations/02_modules_packages_crates/crates_and_packages.md rename to docs/docs/explanations/modules_packages_crates/crates_and_packages.md index fb83a33d94e..aae6795b229 100644 --- a/docs/docs/explanations/02_modules_packages_crates/crates_and_packages.md +++ b/docs/docs/explanations/modules_packages_crates/crates_and_packages.md @@ -2,6 +2,7 @@ title: Crates and Packages description: Learn how to use Crates and Packages in your Noir project keywords: [Nargo, dependencies, package management, crates, package] +sidebar_position: 0 --- ## Crates diff --git a/docs/docs/explanations/02_modules_packages_crates/dependencies.md b/docs/docs/explanations/modules_packages_crates/dependencies.md similarity index 99% rename from docs/docs/explanations/02_modules_packages_crates/dependencies.md rename to docs/docs/explanations/modules_packages_crates/dependencies.md index 75f95aaa305..57f0f9fd420 100644 --- a/docs/docs/explanations/02_modules_packages_crates/dependencies.md +++ b/docs/docs/explanations/modules_packages_crates/dependencies.md @@ -4,6 +4,7 @@ description: Learn how to specify and manage dependencies in Nargo, allowing you to upload packages to GitHub and use them easily in your project. keywords: [Nargo, dependencies, GitHub, package management, versioning] +sidebar_position: 1 --- Nargo allows you to upload packages to GitHub and use them as dependencies. diff --git a/docs/docs/explanations/02_modules_packages_crates/modules.md b/docs/docs/explanations/modules_packages_crates/modules.md similarity index 99% rename from docs/docs/explanations/02_modules_packages_crates/modules.md rename to docs/docs/explanations/modules_packages_crates/modules.md index 147c9b284e8..f9f15aee8be 100644 --- a/docs/docs/explanations/02_modules_packages_crates/modules.md +++ b/docs/docs/explanations/modules_packages_crates/modules.md @@ -4,6 +4,7 @@ description: Learn how to organize your files using modules in Noir, following the same convention as Rust's module system. Examples included. keywords: [Noir, Rust, modules, organizing files, sub-modules] +sidebar_position: 2 --- Noir's module system follows the same convention as the _newer_ version of Rust's module system. diff --git a/docs/docs/explanations/02_modules_packages_crates/workspaces.md b/docs/docs/explanations/modules_packages_crates/workspaces.md similarity index 96% rename from docs/docs/explanations/02_modules_packages_crates/workspaces.md rename to docs/docs/explanations/modules_packages_crates/workspaces.md index a979ef9f0a5..67a1dafa372 100644 --- a/docs/docs/explanations/02_modules_packages_crates/workspaces.md +++ b/docs/docs/explanations/modules_packages_crates/workspaces.md @@ -1,5 +1,6 @@ --- title: Workspaces +sidebar_position: 3 --- Workspaces are a feature of nargo that allow you to manage multiple related Noir packages in a single repository. A workspace is essentially a group of related projects that share common build output directories and configurations. @@ -36,4 +37,4 @@ default-member = "crates/a" Libraries can be defined in a workspace. Inside a workspace, these are consumed as `{ path = "../to_lib" }` dependencies in Nargo.toml. -Inside a workspace, these are consumed as `{ path = "../to_lib" }` dependencies in Nargo.toml. \ No newline at end of file +Inside a workspace, these are consumed as `{ path = "../to_lib" }` dependencies in Nargo.toml. diff --git a/docs/docs/explanations/noir/_category_.json b/docs/docs/explanations/noir/_category_.json new file mode 100644 index 00000000000..448d8987d1a --- /dev/null +++ b/docs/docs/explanations/noir/_category_.json @@ -0,0 +1,6 @@ +{ + "label": "Noir", + "position": 0, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/00_noir/04_assert.md b/docs/docs/explanations/noir/assert.md similarity index 98% rename from docs/docs/explanations/00_noir/04_assert.md rename to docs/docs/explanations/noir/assert.md index 7427ec6cc63..c5f9aff139c 100644 --- a/docs/docs/explanations/00_noir/04_assert.md +++ b/docs/docs/explanations/noir/assert.md @@ -5,6 +5,7 @@ description: comparison expression that follows to be true, and what happens if the expression is false at runtime. keywords: [Noir programming language, assert statement, predicate expression, comparison expression] +sidebar_position: 4 --- Noir includes a special `assert` function which will explicitly constrain the predicate/comparison diff --git a/docs/docs/explanations/00_noir/09_comments.md b/docs/docs/explanations/noir/comments.md similarity index 98% rename from docs/docs/explanations/00_noir/09_comments.md rename to docs/docs/explanations/noir/comments.md index 3bb4d2f25a4..f76ab49094b 100644 --- a/docs/docs/explanations/00_noir/09_comments.md +++ b/docs/docs/explanations/noir/comments.md @@ -5,6 +5,7 @@ description: ignored by the compiler, but it can be read by programmers. Single-line and multi-line comments are supported in Noir. keywords: [Noir programming language, comments, single-line comments, multi-line comments] +sidebar_position: 9 --- A comment is a line in your codebase which the compiler ignores, however it can be read by diff --git a/docs/docs/explanations/00_noir/02_control_flow.md b/docs/docs/explanations/noir/control_flow.md similarity index 97% rename from docs/docs/explanations/00_noir/02_control_flow.md rename to docs/docs/explanations/noir/control_flow.md index a7f85360197..4ce65236db3 100644 --- a/docs/docs/explanations/00_noir/02_control_flow.md +++ b/docs/docs/explanations/noir/control_flow.md @@ -4,6 +4,7 @@ description: Learn how to use loops and if expressions in the Noir programming language. Discover the syntax and examples for for loops and if-else statements. keywords: [Noir programming language, loops, for loop, if-else statements, Rust syntax] +sidebar_position: 2 --- ## Loops diff --git a/docs/docs/explanations/00_noir/12_data_bus.md b/docs/docs/explanations/noir/data_bus.md similarity index 97% rename from docs/docs/explanations/00_noir/12_data_bus.md rename to docs/docs/explanations/noir/data_bus.md index 9ef5c33fcf6..6c7e9b60891 100644 --- a/docs/docs/explanations/00_noir/12_data_bus.md +++ b/docs/docs/explanations/noir/data_bus.md @@ -1,5 +1,6 @@ --- title: Data Bus +sidebar_position: 12 --- **Disclaimer** this feature is experimental, do not use it! @@ -8,10 +9,8 @@ In order to use it, you must define some inputs of the program entry points (usu function) with the `call_data` modifier, and the return values with the `return_data` modifier. These modifiers are incompatible with `pub` and `mut` modifiers. - ## Example - ```rust fn main(mut x: u32, y: call_data u32, z: call_data [u32;4] ) -> return_data u32 { let a = z[x]; @@ -20,4 +19,3 @@ fn main(mut x: u32, y: call_data u32, z: call_data [u32;4] ) -> return_data u32 ``` As a result, both call_data and return_data will be treated as private inputs and encapsulated into a read-only array each, for the backend to process. - diff --git a/docs/docs/explanations/noir/data_types/_category_.json b/docs/docs/explanations/noir/data_types/_category_.json new file mode 100644 index 00000000000..5d694210bbf --- /dev/null +++ b/docs/docs/explanations/noir/data_types/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 0, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/00_noir/00_data_types/04_arrays.md b/docs/docs/explanations/noir/data_types/arrays.md similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/04_arrays.md rename to docs/docs/explanations/noir/data_types/arrays.md index bdbd1798bef..075d39dadd4 100644 --- a/docs/docs/explanations/00_noir/00_data_types/04_arrays.md +++ b/docs/docs/explanations/noir/data_types/arrays.md @@ -10,6 +10,7 @@ keywords: examples, indexing, ] +sidebar_position: 4 --- An array is one way of grouping together values into one compound type. Array types can be inferred diff --git a/docs/docs/explanations/00_noir/00_data_types/02_booleans.md b/docs/docs/explanations/noir/data_types/booleans.md similarity index 97% rename from docs/docs/explanations/00_noir/00_data_types/02_booleans.md rename to docs/docs/explanations/noir/data_types/booleans.md index 885db167d83..69826fcd724 100644 --- a/docs/docs/explanations/00_noir/00_data_types/02_booleans.md +++ b/docs/docs/explanations/noir/data_types/booleans.md @@ -10,6 +10,7 @@ keywords: examples, logical operations, ] +sidebar_position: 2 --- diff --git a/docs/docs/explanations/00_noir/00_data_types/00_fields.md b/docs/docs/explanations/noir/data_types/fields.md similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/00_fields.md rename to docs/docs/explanations/noir/data_types/fields.md index 78d3d2af166..a1c67945d66 100644 --- a/docs/docs/explanations/00_noir/00_data_types/00_fields.md +++ b/docs/docs/explanations/noir/data_types/fields.md @@ -10,6 +10,7 @@ keywords: examples, best practices, ] +sidebar_position: 0 --- The field type corresponds to the native field type of the proving backend. diff --git a/docs/docs/explanations/00_noir/00_data_types/10_function_types.md b/docs/docs/explanations/noir/data_types/function_types.md similarity index 87% rename from docs/docs/explanations/00_noir/00_data_types/10_function_types.md rename to docs/docs/explanations/noir/data_types/function_types.md index 1ec92efd594..f6121af17e2 100644 --- a/docs/docs/explanations/00_noir/00_data_types/10_function_types.md +++ b/docs/docs/explanations/noir/data_types/function_types.md @@ -1,5 +1,6 @@ --- title: Function types +sidebar_position: 10 --- Noir supports higher-order functions. The syntax for a function type is as follows: @@ -22,4 +23,4 @@ fn main() { ``` A function type also has an optional capture environment - this is necessary to support closures. -See [Lambdas](../08_lambdas.md) for more details. +See [Lambdas](../lambdas.md) for more details. diff --git a/docs/docs/explanations/00_noir/00_data_types/index.md b/docs/docs/explanations/noir/data_types/index.md similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/index.md rename to docs/docs/explanations/noir/data_types/index.md index 2eda54575f6..56ed55c444b 100644 --- a/docs/docs/explanations/00_noir/00_data_types/index.md +++ b/docs/docs/explanations/noir/data_types/index.md @@ -79,7 +79,7 @@ fn main() { } ``` -Type aliases can also be used with [generics](@site/docs/explanations/00_noir/06_generics.md): +Type aliases can also be used with [generics](@site/docs/explanations/noir/generics.md): ```rust type Id = Size; diff --git a/docs/docs/explanations/00_noir/00_data_types/01_integers.md b/docs/docs/explanations/noir/data_types/integers.md similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/01_integers.md rename to docs/docs/explanations/noir/data_types/integers.md index b1e7ad11bfd..7d1e83cf4e9 100644 --- a/docs/docs/explanations/00_noir/00_data_types/01_integers.md +++ b/docs/docs/explanations/noir/data_types/integers.md @@ -2,6 +2,7 @@ title: Integers description: Explore the Integer data type in Noir. Learn about its methods, see real-world examples, and grasp how to efficiently use Integers in your Noir code. keywords: [noir, integer types, methods, examples, arithmetic] +sidebar_position: 1 --- An integer type is a range constrained field type. The Noir frontend supports arbitrarily-sized, both unsigned and signed integer types. diff --git a/docs/docs/explanations/00_noir/00_data_types/09_references.md b/docs/docs/explanations/noir/data_types/references.md similarity index 96% rename from docs/docs/explanations/00_noir/00_data_types/09_references.md rename to docs/docs/explanations/noir/data_types/references.md index b0c35ce2cb9..a5293d11cfb 100644 --- a/docs/docs/explanations/00_noir/00_data_types/09_references.md +++ b/docs/docs/explanations/noir/data_types/references.md @@ -1,5 +1,6 @@ --- title: References +sidebar_position: 9 --- Noir supports first-class references. References are a bit like pointers: they point to a specific address that can be followed to access the data stored at that address. You can use Rust-like syntax to use pointers in Noir: the `&` operator references the variable, the `*` operator dereferences it. diff --git a/docs/docs/explanations/00_noir/00_data_types/05_slices.mdx b/docs/docs/explanations/noir/data_types/slices.mdx similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/05_slices.mdx rename to docs/docs/explanations/noir/data_types/slices.mdx index 1be0ec4a137..4a6ee816aa2 100644 --- a/docs/docs/explanations/00_noir/00_data_types/05_slices.mdx +++ b/docs/docs/explanations/noir/data_types/slices.mdx @@ -2,6 +2,7 @@ title: Slices description: Explore the Slice data type in Noir. Understand its methods, see real-world examples, and learn how to effectively use Slices in your Noir programs. keywords: [noir, slice type, methods, examples, subarrays] +sidebar_position: 5 --- import Experimental from '@site/src/components/Notes/_experimental.mdx'; diff --git a/docs/docs/explanations/00_noir/00_data_types/03_strings.md b/docs/docs/explanations/noir/data_types/strings.md similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/03_strings.md rename to docs/docs/explanations/noir/data_types/strings.md index e647a58472f..8d76d4ca654 100644 --- a/docs/docs/explanations/00_noir/00_data_types/03_strings.md +++ b/docs/docs/explanations/noir/data_types/strings.md @@ -10,6 +10,7 @@ keywords: examples, concatenation, ] +sidebar_position: 3 --- diff --git a/docs/docs/explanations/00_noir/00_data_types/08_structs.md b/docs/docs/explanations/noir/data_types/structs.md similarity index 98% rename from docs/docs/explanations/00_noir/00_data_types/08_structs.md rename to docs/docs/explanations/noir/data_types/structs.md index 35421734639..dbf68c99813 100644 --- a/docs/docs/explanations/00_noir/00_data_types/08_structs.md +++ b/docs/docs/explanations/noir/data_types/structs.md @@ -10,6 +10,7 @@ keywords: examples, data structures, ] +sidebar_position: 8 --- A struct also allows for grouping multiple values of different types. Unlike tuples, we can also diff --git a/docs/docs/explanations/00_noir/00_data_types/07_tuples.md b/docs/docs/explanations/noir/data_types/tuples.md similarity index 98% rename from docs/docs/explanations/00_noir/00_data_types/07_tuples.md rename to docs/docs/explanations/noir/data_types/tuples.md index 5f6cab974a8..2ec5c9c4113 100644 --- a/docs/docs/explanations/00_noir/00_data_types/07_tuples.md +++ b/docs/docs/explanations/noir/data_types/tuples.md @@ -10,6 +10,7 @@ keywords: examples, multi-value containers, ] +sidebar_position: 7 --- A tuple collects multiple values like an array, but with the added ability to collect values of diff --git a/docs/docs/explanations/00_noir/00_data_types/06_vectors.mdx b/docs/docs/explanations/noir/data_types/vectors.mdx similarity index 99% rename from docs/docs/explanations/00_noir/00_data_types/06_vectors.mdx rename to docs/docs/explanations/noir/data_types/vectors.mdx index 4617e90d038..10e35711b74 100644 --- a/docs/docs/explanations/00_noir/00_data_types/06_vectors.mdx +++ b/docs/docs/explanations/noir/data_types/vectors.mdx @@ -2,6 +2,7 @@ title: Vectors description: Delve into the Vector data type in Noir. Learn about its methods, practical examples, and best practices for using Vectors in your Noir code. keywords: [noir, vector type, methods, examples, dynamic arrays] +sidebar_position: 6 --- import Experimental from '@site/src/components/Notes/_experimental.mdx'; diff --git a/docs/docs/explanations/00_noir/10_distinct.md b/docs/docs/explanations/noir/distinct.md similarity index 98% rename from docs/docs/explanations/00_noir/10_distinct.md rename to docs/docs/explanations/noir/distinct.md index e7ff7f5017a..b59e0296b23 100644 --- a/docs/docs/explanations/00_noir/10_distinct.md +++ b/docs/docs/explanations/noir/distinct.md @@ -1,5 +1,6 @@ --- title: Distinct Witnesses +sidebar_position: 10 --- The `distinct` keyword prevents repetitions of witness indices in the program's ABI. This ensures diff --git a/docs/docs/explanations/00_noir/01_functions.md b/docs/docs/explanations/noir/functions.md similarity index 90% rename from docs/docs/explanations/00_noir/01_functions.md rename to docs/docs/explanations/noir/functions.md index 9eeff5147d3..94f929038ee 100644 --- a/docs/docs/explanations/00_noir/01_functions.md +++ b/docs/docs/explanations/noir/functions.md @@ -4,6 +4,7 @@ description: Learn how to declare functions and methods in Noir, a programming language with Rust semantics. This guide covers parameter declaration, return types, call expressions, and more. keywords: [Noir, Rust, functions, methods, parameter declaration, return types, call expressions] +sidebar_position: 1 --- Functions in Noir follow the same semantics of Rust, though Noir does not support early returns. @@ -14,7 +15,7 @@ To declare a function the `fn` keyword is used. fn foo() {} ``` -By default, functions are visible only within the package they are defined. To make them visible outside of that package (for example, as part of a [library](@site/docs/explanations/02_modules_packages_crates/crates_and_packages.md#libraries)), you should mark them as `pub`: +By default, functions are visible only within the package they are defined. To make them visible outside of that package (for example, as part of a [library](@site/docs/explanations/modules_packages_crates/crates_and_packages.md#libraries)), you should mark them as `pub`: ```rust pub fn foo() {} @@ -61,7 +62,7 @@ fn main(x : [Field]) // can't compile, has variable size fn main(....// i think you got it by now ``` -Keep in mind [tests](@site/docs/getting_started/03_tooling/01_testing.md) don't differentiate between `main` and any other function. The following snippet passes tests, but won't compile or prove: +Keep in mind [tests](@site/docs/getting_started/tooling/testing.md) don't differentiate between `main` and any other function. The following snippet passes tests, but won't compile or prove: ```rust fn main(x : [Field]) { @@ -138,7 +139,7 @@ follows: assert(MyStruct::sum(s) == 42); ``` -It is also possible to specialize which method is chosen depending on the [generic](./06_generics.md) type that is used. In this example, the `foo` function returns different values depending on its type: +It is also possible to specialize which method is chosen depending on the [generic](./generics.md) type that is used. In this example, the `foo` function returns different values depending on its type: ```rust struct Foo {} @@ -177,7 +178,7 @@ let add_50 = |val| val + 50; assert(add_50(100) == 150); ``` -See [Lambdas](./08_lambdas.md) for more details. +See [Lambdas](./lambdas.md) for more details. ## Attributes @@ -188,8 +189,8 @@ Supported attributes include: - **builtin**: the function is implemented by the compiler, for efficiency purposes. - **deprecated**: mark the function as _deprecated_. Calling the function will generate a warning: `warning: use of deprecated function` - **field**: Used to enable conditional compilation of code depending on the field size. See below for more details -- **oracle**: mark the function as _oracle_; meaning it is an external unconstrained function, implemented in noir_js. See [Unconstrained](./05_unconstrained.md) and [NoirJS](@site/docs/reference/NoirJS/noir_js/index.md) for more details. -- **test**: mark the function as unit tests. See [Tests](@site/docs/getting_started/03_tooling/01_testing.md) for more details +- **oracle**: mark the function as _oracle_; meaning it is an external unconstrained function, implemented in noir_js. See [Unconstrained](./unconstrained.md) and [NoirJS](@site/docs/reference/NoirJS/noir_js/index.md) for more details. +- **test**: mark the function as unit tests. See [Tests](@site/docs/getting_started/tooling/testing.md) for more details ### Field Attribute diff --git a/docs/docs/explanations/00_noir/06_generics.md b/docs/docs/explanations/noir/generics.md similarity index 99% rename from docs/docs/explanations/00_noir/06_generics.md rename to docs/docs/explanations/noir/generics.md index 9fb4177c2a8..443ca2b45a5 100644 --- a/docs/docs/explanations/00_noir/06_generics.md +++ b/docs/docs/explanations/noir/generics.md @@ -2,6 +2,7 @@ title: Generics description: Learn how to use Generics in Noir keywords: [Noir, Rust, generics, functions, structs] +sidebar_position: 6 --- Generics allow you to use the same functions with multiple different concrete data types. You can diff --git a/docs/docs/explanations/00_noir/08_lambdas.md b/docs/docs/explanations/noir/lambdas.md similarity index 98% rename from docs/docs/explanations/00_noir/08_lambdas.md rename to docs/docs/explanations/noir/lambdas.md index ae1e6aecab1..e0a267adfda 100644 --- a/docs/docs/explanations/00_noir/08_lambdas.md +++ b/docs/docs/explanations/noir/lambdas.md @@ -2,6 +2,7 @@ title: Lambdas description: Learn how to use anonymous functions in Noir programming language. keywords: [Noir programming language, lambda, closure, function, anonymous function] +sidebar_position: 8 --- ## Introduction @@ -43,7 +44,7 @@ It may catch you by surprise that the following code fails to compile: ```rust fn foo(f: fn () -> Field) -> Field { - f() + f() } fn main() { @@ -69,7 +70,7 @@ with closures with any environment, as well as with regular functions: ```rust fn foo(f: fn[Env]() -> Field) -> Field { - f() + f() } fn main() { diff --git a/docs/docs/explanations/00_noir/07_mutability.md b/docs/docs/explanations/noir/mutability.md similarity index 99% rename from docs/docs/explanations/00_noir/07_mutability.md rename to docs/docs/explanations/noir/mutability.md index ad902c42c9b..58e9c1cecfb 100644 --- a/docs/docs/explanations/00_noir/07_mutability.md +++ b/docs/docs/explanations/noir/mutability.md @@ -4,6 +4,7 @@ description: Learn about mutable variables, constants, and globals in Noir programming language. Discover how to declare, modify, and use them in your programs. keywords: [noir programming language, mutability in noir, mutable variables, constants, globals] +sidebar_position: 7 --- Variables in noir can be declared mutable via the `mut` keyword. Mutable variables can be reassigned diff --git a/docs/docs/explanations/00_noir/03_ops.md b/docs/docs/explanations/noir/ops.md similarity index 99% rename from docs/docs/explanations/00_noir/03_ops.md rename to docs/docs/explanations/noir/ops.md index d5caa463765..977c8ba1203 100644 --- a/docs/docs/explanations/00_noir/03_ops.md +++ b/docs/docs/explanations/noir/ops.md @@ -14,6 +14,7 @@ keywords: short-circuiting, backend, ] +sidebar_position: 3 --- # Operations diff --git a/docs/docs/explanations/00_noir/11_shadowing.md b/docs/docs/explanations/noir/shadowing.md similarity index 98% rename from docs/docs/explanations/00_noir/11_shadowing.md rename to docs/docs/explanations/noir/shadowing.md index efd743e764f..b5a6b6b38b9 100644 --- a/docs/docs/explanations/00_noir/11_shadowing.md +++ b/docs/docs/explanations/noir/shadowing.md @@ -1,5 +1,6 @@ --- title: Shadowing +sidebar_position: 11 --- Noir allows for inheriting variables' values and re-declaring them with the same name similar to Rust, known as shadowing. diff --git a/docs/docs/explanations/00_noir/05_unconstrained.md b/docs/docs/explanations/noir/unconstrained.md similarity index 97% rename from docs/docs/explanations/00_noir/05_unconstrained.md rename to docs/docs/explanations/noir/unconstrained.md index 6b621eda3eb..7a61d3953ef 100644 --- a/docs/docs/explanations/00_noir/05_unconstrained.md +++ b/docs/docs/explanations/noir/unconstrained.md @@ -3,10 +3,9 @@ title: Unconstrained Functions description: "Learn about what unconstrained functions in Noir are, how to use them and when you'd want to." keywords: [Noir programming language, unconstrained, open] +sidebar_position: 5 --- - - Unconstrained functions are functions which do not constrain any of the included computation and allow for non-determinisitic computation. ## Why? diff --git a/docs/docs/explanations/standard_library/_category_.json b/docs/docs/explanations/standard_library/_category_.json new file mode 100644 index 00000000000..af04c0933fd --- /dev/null +++ b/docs/docs/explanations/standard_library/_category_.json @@ -0,0 +1,6 @@ +{ + "label": "Standard Library", + "position": 1, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/01_standard_library/black_box_fns.md b/docs/docs/explanations/standard_library/black_box_fns.md similarity index 100% rename from docs/docs/explanations/01_standard_library/black_box_fns.md rename to docs/docs/explanations/standard_library/black_box_fns.md diff --git a/docs/docs/explanations/standard_library/cryptographic_primitives/_category_.json b/docs/docs/explanations/standard_library/cryptographic_primitives/_category_.json new file mode 100644 index 00000000000..5d694210bbf --- /dev/null +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 0, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/04_ec_primitives.md b/docs/docs/explanations/standard_library/cryptographic_primitives/ec_primitives.md similarity index 99% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/04_ec_primitives.md rename to docs/docs/explanations/standard_library/cryptographic_primitives/ec_primitives.md index 6e6b19b6861..8d573adb3be 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/04_ec_primitives.md +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/ec_primitives.md @@ -1,6 +1,7 @@ --- title: Elliptic Curve Primitives keywords: [cryptographic primitives, Noir project] +sidebar_position: 4 --- Data structures and methods on them that allow you to carry out computations involving elliptic diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/03_ecdsa_sig_verification.mdx b/docs/docs/explanations/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx similarity index 98% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/03_ecdsa_sig_verification.mdx rename to docs/docs/explanations/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx index 72bce984821..1376c51dfde 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/03_ecdsa_sig_verification.mdx +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/ecdsa_sig_verification.mdx @@ -2,6 +2,7 @@ title: ECDSA Signature Verification description: Learn about the cryptographic primitives regarding ECDSA over the secp256k1 and secp256r1 curves keywords: [cryptographic primitives, Noir project, ecdsa, secp256k1, secp256r1, signatures] +sidebar_position: 3 --- import BlackBoxInfo from '@site/src/components/Notes/_blackbox.mdx'; diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/05_eddsa.mdx b/docs/docs/explanations/standard_library/cryptographic_primitives/eddsa.mdx similarity index 96% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/05_eddsa.mdx rename to docs/docs/explanations/standard_library/cryptographic_primitives/eddsa.mdx index 9a5beb55ee9..a9c10da6c06 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/05_eddsa.mdx +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/eddsa.mdx @@ -2,6 +2,7 @@ title: EdDSA Verification description: Learn about the cryptographic primitives regarding EdDSA keywords: [cryptographic primitives, Noir project, eddsa, signatures] +sidebar_position: 5 --- import BlackBoxInfo from '@site/src/components/Notes/_blackbox.mdx'; diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/00_hashes.mdx b/docs/docs/explanations/standard_library/cryptographic_primitives/hashes.mdx similarity index 99% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/00_hashes.mdx rename to docs/docs/explanations/standard_library/cryptographic_primitives/hashes.mdx index 38077af1ce1..9250cb4a0c0 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/00_hashes.mdx +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/hashes.mdx @@ -5,6 +5,7 @@ description: blake2s, pedersen, mimc_bn254 and mimc keywords: [cryptographic primitives, Noir project, sha256, blake2s, pedersen, mimc_bn254, mimc, hash] +sidebar_position: 0 --- import BlackBoxInfo from '@site/src/components/Notes/_blackbox.mdx'; diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/index.md b/docs/docs/explanations/standard_library/cryptographic_primitives/index.md similarity index 100% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/index.md rename to docs/docs/explanations/standard_library/cryptographic_primitives/index.md diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/01_scalar.mdx b/docs/docs/explanations/standard_library/cryptographic_primitives/scalar.mdx similarity index 97% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/01_scalar.mdx rename to docs/docs/explanations/standard_library/cryptographic_primitives/scalar.mdx index c7eed820a80..1e686303c18 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/01_scalar.mdx +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/scalar.mdx @@ -2,6 +2,7 @@ title: Scalar multiplication description: See how you can perform scalar multiplications over a fixed base in Noir keywords: [cryptographic primitives, Noir project, scalar multiplication] +sidebar_position: 1 --- import BlackBoxInfo from '@site/src/components/Notes/_blackbox.mdx'; diff --git a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/02_schnorr.mdx b/docs/docs/explanations/standard_library/cryptographic_primitives/schnorr.mdx similarity index 98% rename from docs/docs/explanations/01_standard_library/00_cryptographic_primitives/02_schnorr.mdx rename to docs/docs/explanations/standard_library/cryptographic_primitives/schnorr.mdx index c184ce28120..7a2c9c20226 100644 --- a/docs/docs/explanations/01_standard_library/00_cryptographic_primitives/02_schnorr.mdx +++ b/docs/docs/explanations/standard_library/cryptographic_primitives/schnorr.mdx @@ -2,6 +2,7 @@ title: Schnorr Signatures description: Learn how you can verify Schnorr signatures using Noir keywords: [cryptographic primitives, Noir project, schnorr, signatures] +sidebar_position: 2 --- import BlackBoxInfo from '@site/src/components/Notes/_blackbox.mdx'; diff --git a/docs/docs/explanations/01_standard_library/logging.md b/docs/docs/explanations/standard_library/logging.md similarity index 100% rename from docs/docs/explanations/01_standard_library/logging.md rename to docs/docs/explanations/standard_library/logging.md diff --git a/docs/docs/explanations/01_standard_library/merkle_trees.md b/docs/docs/explanations/standard_library/merkle_trees.md similarity index 93% rename from docs/docs/explanations/01_standard_library/merkle_trees.md rename to docs/docs/explanations/standard_library/merkle_trees.md index 86452a2ccb3..07fa2ccda79 100644 --- a/docs/docs/explanations/01_standard_library/merkle_trees.md +++ b/docs/docs/explanations/standard_library/merkle_trees.md @@ -17,7 +17,7 @@ keywords: ## compute_merkle_root -Returns the root of the tree from the provided leaf and its hash path, using a [Pedersen hash](@site/docs/explanations/01_standard_library/00_cryptographic_primitives/00_hashes.mdx#pedersen_hash). +Returns the root of the tree from the provided leaf and its hash path, using a [Pedersen hash](@site/docs/explanations/standard_library/cryptographic_primitives/hashes.mdx#pedersen_hash). ```rust fn compute_merkle_root(leaf : Field, index : Field, hash_path: [Field]) -> Field diff --git a/docs/docs/explanations/01_standard_library/options.md b/docs/docs/explanations/standard_library/options.md similarity index 100% rename from docs/docs/explanations/01_standard_library/options.md rename to docs/docs/explanations/standard_library/options.md diff --git a/docs/docs/explanations/01_standard_library/recursion.md b/docs/docs/explanations/standard_library/recursion.md similarity index 100% rename from docs/docs/explanations/01_standard_library/recursion.md rename to docs/docs/explanations/standard_library/recursion.md diff --git a/docs/docs/explanations/01_standard_library/zeroed.md b/docs/docs/explanations/standard_library/zeroed.md similarity index 100% rename from docs/docs/explanations/01_standard_library/zeroed.md rename to docs/docs/explanations/standard_library/zeroed.md diff --git a/docs/docs/getting_started/_category_.json b/docs/docs/getting_started/_category_.json new file mode 100644 index 00000000000..5d694210bbf --- /dev/null +++ b/docs/docs/getting_started/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 0, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/getting_started/01_create_a_project.md b/docs/docs/getting_started/create_a_project.md similarity index 93% rename from docs/docs/getting_started/01_create_a_project.md rename to docs/docs/getting_started/create_a_project.md index d32f397370c..76bed5be9b8 100644 --- a/docs/docs/getting_started/01_create_a_project.md +++ b/docs/docs/getting_started/create_a_project.md @@ -13,6 +13,8 @@ keywords: verify Noir program, step-by-step guide, ] +sidebar_position: 1 + --- Now that we have installed Nargo, it is time to make our first hello world program! @@ -67,7 +69,7 @@ x : Field, y : pub Field Program inputs in Noir are private by default (e.g. `x`), but can be labeled public using the keyword `pub` (e.g. `y`). To learn more about private and public values, check the -[Data Types](@site/docs/explanations/00_noir/00_data_types/index.md) section. +[Data Types](@site/docs/explanations/noir/data_types/index.md) section. The next line of the program specifies its body: @@ -77,7 +79,7 @@ assert(x != y); The Noir syntax `assert` can be interpreted as something similar to constraints in other zk-contract languages. -For more Noir syntax, check the [Language Concepts](@site/docs/explanations/00_noir/09_comments.md) chapter. +For more Noir syntax, check the [Language Concepts](@site/docs/explanations/noir/comments.md) chapter. ## Build In/Output Files @@ -137,4 +139,4 @@ corresponding error instead. Congratulations, you have now created and verified a proof for your very first Noir program! -In the [next section](@site/docs/getting_started/02_project_breakdown.md), we will go into more detail on each step performed. +In the [next section](@site/docs/getting_started/project_breakdown.md), we will go into more detail on each step performed. diff --git a/docs/docs/getting_started/installation/_category_.json b/docs/docs/getting_started/installation/_category_.json new file mode 100644 index 00000000000..0c02fb5d4d7 --- /dev/null +++ b/docs/docs/getting_started/installation/_category_.json @@ -0,0 +1,6 @@ +{ + "position": 0, + "label": "Install Nargo", + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/getting_started/00_installation/index.md b/docs/docs/getting_started/installation/index.md similarity index 100% rename from docs/docs/getting_started/00_installation/index.md rename to docs/docs/getting_started/installation/index.md diff --git a/docs/docs/getting_started/00_installation/other_install_methods.md b/docs/docs/getting_started/installation/other_install_methods.md similarity index 98% rename from docs/docs/getting_started/00_installation/other_install_methods.md rename to docs/docs/getting_started/installation/other_install_methods.md index cd27185a293..d90a10103d9 100644 --- a/docs/docs/getting_started/00_installation/other_install_methods.md +++ b/docs/docs/getting_started/installation/other_install_methods.md @@ -18,12 +18,13 @@ keywords: [ Uninstalling Nargo Noir vs code extension ] +sidebar_position: 1 --- ## Installation -The most common method of installing Nargo is through [Noirup](@site/docs/getting_started/00_installation/index.md) +The most common method of installing Nargo is through [Noirup](@site/docs/getting_started/installation/index.md) However, there are other methods for installing Nargo: @@ -166,7 +167,7 @@ The default backend for Noir (Barretenberg) doesn't provide Windows binaries at Step 1: Follow the instructions [here](https://learn.microsoft.com/en-us/windows/wsl/install) to install and run WSL. -step 2: Follow the [Noirup instructions](@site/docs/getting_started/00_installation/index.md). +step 2: Follow the [Noirup instructions](@site/docs/getting_started/installation/index.md). ## Uninstalling Nargo diff --git a/docs/docs/getting_started/02_project_breakdown.md b/docs/docs/getting_started/project_breakdown.md similarity index 96% rename from docs/docs/getting_started/02_project_breakdown.md rename to docs/docs/getting_started/project_breakdown.md index 8e4bf39522e..026127b9ed0 100644 --- a/docs/docs/getting_started/02_project_breakdown.md +++ b/docs/docs/getting_started/project_breakdown.md @@ -5,6 +5,7 @@ description: files, and how to prove and verify your program. keywords: [Nargo, Nargo project, Prover.toml, Verifier.toml, proof verification, private asset transfer] +sidebar_position: 2 --- This section breaks down our hello world program in section _1.2_. We elaborate on the project @@ -51,7 +52,7 @@ license = "MIT" ecrecover = {tag = "v0.9.0", git = "https://github.com/colinnielsen/ecrecover-noir.git"} ``` -Nargo.toml for a [workspace](@site/docs/explanations/02_modules_packages_crates/workspaces.md) will look a bit different. For example: +Nargo.toml for a [workspace](@site/docs/explanations/modules_packages_crates/workspaces.md) will look a bit different. For example: ```toml [workspace] @@ -74,7 +75,7 @@ The package section requires a number of fields including: #### Dependencies section -This is where you will specify any dependencies for your project. See the [Dependencies page](@site/docs/explanations/02_modules_packages_crates/dependencies.md) for more info. +This is where you will specify any dependencies for your project. See the [Dependencies page](@site/docs/explanations/modules_packages_crates/dependencies.md) for more info. `./proofs/` and `./contract/` directories will not be immediately visible until you create a proof or verifier contract respectively. diff --git a/docs/docs/getting_started/tooling/_category_.json b/docs/docs/getting_started/tooling/_category_.json new file mode 100644 index 00000000000..dff520ebc41 --- /dev/null +++ b/docs/docs/getting_started/tooling/_category_.json @@ -0,0 +1,6 @@ +{ + "position": 3, + "label": "Tooling", + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/getting_started/03_tooling/index.md b/docs/docs/getting_started/tooling/index.md similarity index 100% rename from docs/docs/getting_started/03_tooling/index.md rename to docs/docs/getting_started/tooling/index.md diff --git a/docs/docs/getting_started/03_tooling/00_language_server.md b/docs/docs/getting_started/tooling/language_server.md similarity index 99% rename from docs/docs/getting_started/03_tooling/00_language_server.md rename to docs/docs/getting_started/tooling/language_server.md index 48c01465f6e..81e0356ef8a 100644 --- a/docs/docs/getting_started/03_tooling/00_language_server.md +++ b/docs/docs/getting_started/tooling/language_server.md @@ -2,6 +2,7 @@ title: Language Server description: Learn about the Noir Language Server, how to install the components, and configuration that may be required. keywords: [Nargo, Language Server, LSP, VSCode, Visual Studio Code] +sidebar_position: 0 --- This section helps you install and configure the Noir Language Server. diff --git a/docs/docs/getting_started/03_tooling/01_testing.md b/docs/docs/getting_started/tooling/testing.md similarity index 98% rename from docs/docs/getting_started/03_tooling/01_testing.md rename to docs/docs/getting_started/tooling/testing.md index da767274efd..868a061200d 100644 --- a/docs/docs/getting_started/03_tooling/01_testing.md +++ b/docs/docs/getting_started/tooling/testing.md @@ -2,6 +2,7 @@ title: Testing in Noir description: Learn how to use Nargo to test your Noir program in a quick and easy way keywords: [Nargo, testing, Noir, compile, test] +sidebar_position: 1 --- You can test your Noir programs using Noir circuits. diff --git a/docs/docs/how_to/_category_.json b/docs/docs/how_to/_category_.json new file mode 100644 index 00000000000..23b560f610b --- /dev/null +++ b/docs/docs/how_to/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 1, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/index.md b/docs/docs/index.md index de04d263e41..754f9f6e31d 100644 --- a/docs/docs/index.md +++ b/docs/docs/index.md @@ -17,6 +17,7 @@ keywords: Proving System, Smart Contract Language, ] +sidebar_position: 0 --- ## What's new about Noir? @@ -37,7 +38,7 @@ programming. ### Solidity Developers Noir streamlines the creation of Solidity contracts that interface with SNARK systems. -[`Utilize the nargo codegen-verifier`](@site/docs/reference/00_nargo_commands.md#nargo-codegen-verifier) command to construct verifier +[`Utilize the nargo codegen-verifier`](@site/docs/reference/nargo_commands.md#nargo-codegen-verifier) command to construct verifier contracts efficiently. While the current alpha version offers this as a direct feature, future updates aim to modularize this process for even greater ease of use. @@ -81,4 +82,4 @@ Some libraries that are available today include: - [Fraction](https://github.com/resurgencelabs/fraction) - a library for accessing fractional number data type in Noir, allowing results that aren't whole numbers -See the section on [dependencies](@site/docs/explanations/02_modules_packages_crates/dependencies.md) for more information. +See the section on [dependencies](@site/docs/explanations/modules_packages_crates/dependencies.md) for more information. diff --git a/docs/docs/migration_notes.md b/docs/docs/migration_notes.md index 4964a85c833..a5fd10769f7 100644 --- a/docs/docs/migration_notes.md +++ b/docs/docs/migration_notes.md @@ -16,7 +16,7 @@ To update, please make sure this field in `Nargo.toml` matches the output of `na ## ≥0.14 -The index of the [for loops](@site/docs/explanations/00_noir/02_control_flow.md#loops) is now of type `u64` instead of `Field`. An example refactor would be: +The index of the [for loops](@site/docs/explanations/noir/control_flow.md#loops) is now of type `u64` instead of `Field`. An example refactor would be: ```rust for i in 0..10 { diff --git a/docs/docs/reference/NoirJS/noir_js/classes/Noir.md b/docs/docs/reference/NoirJS/noir_js/classes/Noir.md index e54116fb1d8..34e20d99684 100644 --- a/docs/docs/reference/NoirJS/noir_js/classes/Noir.md +++ b/docs/docs/reference/NoirJS/noir_js/classes/Noir.md @@ -75,7 +75,7 @@ async execute(inputs) ### generateFinalProof() ```ts -generateFinalProof(inputs): Promise +generateFinalProof(inputs, foreignCallHandler?): Promise ``` #### Parameters @@ -83,6 +83,7 @@ generateFinalProof(inputs): Promise | Parameter | Type | | :------ | :------ | | `inputs` | [`InputMap`](../type-aliases/InputMap.md) | +| `foreignCallHandler`? | [`ForeignCallHandler`](../type-aliases/ForeignCallHandler.md) | #### Returns @@ -95,7 +96,7 @@ Generates a witness and a proof given an object as input. #### Example ```typescript -async generateFinalproof(input) +async generateFinalProof(input) ``` *** diff --git a/docs/docs/reference/_category_.json b/docs/docs/reference/_category_.json new file mode 100644 index 00000000000..5b6a20a609a --- /dev/null +++ b/docs/docs/reference/_category_.json @@ -0,0 +1,5 @@ +{ + "position": 4, + "collapsible": true, + "collapsed": true +} diff --git a/docs/docs/reference/00_nargo_commands.md b/docs/docs/reference/nargo_commands.md similarity index 99% rename from docs/docs/reference/00_nargo_commands.md rename to docs/docs/reference/nargo_commands.md index 8c564ca494e..239e88d9691 100644 --- a/docs/docs/reference/00_nargo_commands.md +++ b/docs/docs/reference/nargo_commands.md @@ -1,5 +1,5 @@ --- -title: nargo +title: Nargo description: Noir CLI Commands for Noir Prover and Verifier to create, execute, prove and verify programs, generate Solidity verifier smart contract and compile into JSON file containing ACIR @@ -16,6 +16,7 @@ keywords: ABI of circuit, TypeScript, ] +sidebar_position: 0 --- ## General options @@ -212,7 +213,7 @@ you run `nargo test`. To print `println` statements in tests, use the `--show-ou Takes an optional `--exact` flag which allows you to select tests based on an exact name. -See an example on the [testing page](@site/docs/getting_started/03_tooling/01_testing.md). +See an example on the [testing page](@site/docs/getting_started/tooling/testing.md). ### Options diff --git a/docs/docs/tutorials/00_noirjs_app.md b/docs/docs/tutorials/noirjs_app.md similarity index 96% rename from docs/docs/tutorials/00_noirjs_app.md rename to docs/docs/tutorials/noirjs_app.md index 4a4161d70fc..e0f674fa09c 100644 --- a/docs/docs/tutorials/00_noirjs_app.md +++ b/docs/docs/tutorials/noirjs_app.md @@ -2,6 +2,7 @@ title: Tiny NoirJS app description: Learn how to setup a new app that uses Noir to generate and verify zero-knowledge SNARK proofs in a typescript or javascript environment keywords: [how to, guide, javascript, typescript, noir, barretenberg, zero-knowledge, proofs] +sidebar_position: 0 --- NoirJS works both on the browser and on the server, and works for both ESM and CJS module systems. In this page, we will learn how can we write a simple test and a simple web app to verify the standard Noir example. @@ -20,7 +21,7 @@ In this guide, we will be pinned to 0.17.0. Make sure you have Node installed on your machine by opening a terminal and executing `node --version`. If you don't see a version, you should install [node](https://github.com/nvm-sh/nvm). You can also use `yarn` if you prefer that package manager over npm (which comes with node). -First of all, follow the the [Nargo guide](@site/docs/getting_started/00_installation/index.md) to install nargo version 0.17.0 and create a new project with `nargo new circuit`. Once there, `cd` into the `circuit` folder. You should then be able to compile your circuit into `json` format and see it inside the `target` folder: +First of all, follow the the [Nargo guide](@site/docs/getting_started/installation/index.md) to install nargo version 0.17.0 and create a new project with `nargo new circuit`. Once there, `cd` into the `circuit` folder. You should then be able to compile your circuit into `json` format and see it inside the `target` folder: ```bash nargo compile diff --git a/docs/docusaurus.config.ts b/docs/docusaurus.config.ts index 14abaf04b47..98ef1fd680c 100644 --- a/docs/docusaurus.config.ts +++ b/docs/docusaurus.config.ts @@ -133,6 +133,16 @@ export default { }, }, plugins: [ + () => ({ + name: 'resolve-react', + configureWebpack() { + return { + optimization: { + innerGraph: false, + }, + }; + }, + }), [ 'docusaurus-plugin-typedoc', { diff --git a/docs/package.json b/docs/package.json index 6a95fcb89f5..86f15b0a311 100644 --- a/docs/package.json +++ b/docs/package.json @@ -5,7 +5,8 @@ "scripts": { "start": "docusaurus start", "build": "yarn version::stables && docusaurus build", - "version::stables": "node --loader ts-node/esm ./scripts/setStable.ts" + "version::stables": "node --loader ts-node/esm ./scripts/setStable.ts", + "serve": "serve build" }, "dependencies": { "@docusaurus/core": "^3.0.1", @@ -34,6 +35,7 @@ "docusaurus-plugin-typedoc": "1.0.0-next.18", "eslint-plugin-prettier": "^5.0.0", "prettier": "3.0.3", + "serve": "^14.2.1", "ts-node": "^10.9.1", "typedoc": "^0.25.0", "typedoc-plugin-frontmatter": "^0.0.2", diff --git a/docs/sidebars.js b/docs/sidebars.js index fba1c9ae1e7..016ead14a8f 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -20,34 +20,8 @@ export default { label: 'The Noir Language', items: [ { - type: 'category', - label: 'Language Concepts', - items: [ - { - type: 'autogenerated', - dirName: 'explanations/00_noir', - }, - ], - }, - { - type: 'category', - label: 'Standard Library', - items: [ - { - type: 'autogenerated', - dirName: 'explanations/01_standard_library', - }, - ], - }, - { - type: 'category', - label: 'Modules, Packages and Crates', - items: [ - { - type: 'autogenerated', - dirName: 'explanations/02_modules_packages_crates', - }, - ], + type: 'autogenerated', + dirName: 'explanations', }, ], }, diff --git a/yarn.lock b/yarn.lock index 7454ec947c8..bdb9c205d7b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6369,6 +6369,13 @@ __metadata: languageName: node linkType: hard +"@zeit/schemas@npm:2.29.0": + version: 2.29.0 + resolution: "@zeit/schemas@npm:2.29.0" + checksum: 3cea06bb67d790336aca0cc17580fd492ff3fc66ef4d180dce7053ff7ff54ab81b56bf718ba6f537148c581161d06306a481ec218d540bff922e0e009844ffd1 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -6535,6 +6542,18 @@ __metadata: languageName: node linkType: hard +"ajv@npm:8.11.0": + version: 8.11.0 + resolution: "ajv@npm:8.11.0" + dependencies: + fast-deep-equal: ^3.1.1 + json-schema-traverse: ^1.0.0 + require-from-string: ^2.0.2 + uri-js: ^4.2.2 + checksum: 5e0ff226806763be73e93dd7805b634f6f5921e3e90ca04acdf8db81eed9d8d3f0d4c5f1213047f45ebbf8047ffe0c840fa1ef2ec42c3a644899f69aa72b5bef + languageName: node + linkType: hard + "ajv@npm:^6.12.2, ajv@npm:^6.12.4, ajv@npm:^6.12.5": version: 6.12.6 resolution: "ajv@npm:6.12.6" @@ -6689,20 +6708,27 @@ __metadata: languageName: node linkType: hard -"arg@npm:^4.1.0": - version: 4.1.3 - resolution: "arg@npm:4.1.3" - checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 +"arch@npm:^2.2.0": + version: 2.2.0 + resolution: "arch@npm:2.2.0" + checksum: e21b7635029fe8e9cdd5a026f9a6c659103e63fff423834323cdf836a1bb240a72d0c39ca8c470f84643385cf581bd8eda2cad8bf493e27e54bd9783abe9101f languageName: node linkType: hard -"arg@npm:^5.0.0": +"arg@npm:5.0.2, arg@npm:^5.0.0": version: 5.0.2 resolution: "arg@npm:5.0.2" checksum: 6c69ada1a9943d332d9e5382393e897c500908d91d5cb735a01120d5f71daf1b339b7b8980cbeaba8fd1afc68e658a739746179e4315a26e8a28951ff9930078 languageName: node linkType: hard +"arg@npm:^4.1.0": + version: 4.1.3 + resolution: "arg@npm:4.1.3" + checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43 + languageName: node + linkType: hard + "argparse@npm:^1.0.7": version: 1.0.10 resolution: "argparse@npm:1.0.10" @@ -7175,6 +7201,22 @@ __metadata: languageName: node linkType: hard +"boxen@npm:7.0.0": + version: 7.0.0 + resolution: "boxen@npm:7.0.0" + dependencies: + ansi-align: ^3.0.1 + camelcase: ^7.0.0 + chalk: ^5.0.1 + cli-boxes: ^3.0.0 + string-width: ^5.1.2 + type-fest: ^2.13.0 + widest-line: ^4.0.1 + wrap-ansi: ^8.0.1 + checksum: b917cf7a168ef3149635a8c02d5c9717d66182348bd27038d85328ad12655151e3324db0f2815253846c33e5f0ddf28b6cd52d56a12b9f88617b7f8f722b946a + languageName: node + linkType: hard + "boxen@npm:^5.0.0": version: 5.1.2 resolution: "boxen@npm:5.1.2" @@ -7521,7 +7563,7 @@ __metadata: languageName: node linkType: hard -"camelcase@npm:^7.0.1": +"camelcase@npm:^7.0.0, camelcase@npm:^7.0.1": version: 7.0.1 resolution: "camelcase@npm:7.0.1" checksum: 86ab8f3ebf08bcdbe605a211a242f00ed30d8bfb77dab4ebb744dd36efbc84432d1c4adb28975ba87a1b8be40a80fbd1e60e2f06565315918fa7350011a26d3d @@ -7610,7 +7652,7 @@ __metadata: languageName: node linkType: hard -"chalk-template@npm:^0.4.0": +"chalk-template@npm:0.4.0, chalk-template@npm:^0.4.0": version: 0.4.0 resolution: "chalk-template@npm:0.4.0" dependencies: @@ -7619,6 +7661,13 @@ __metadata: languageName: node linkType: hard +"chalk@npm:5.0.1": + version: 5.0.1 + resolution: "chalk@npm:5.0.1" + checksum: 7b45300372b908f0471fbf7389ce2f5de8d85bb949026fd51a1b95b10d0ed32c7ed5aab36dd5e9d2bf3191867909b4404cef75c5f4d2d1daeeacd301dd280b76 + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -7936,6 +7985,17 @@ __metadata: languageName: node linkType: hard +"clipboardy@npm:3.0.0": + version: 3.0.0 + resolution: "clipboardy@npm:3.0.0" + dependencies: + arch: ^2.2.0 + execa: ^5.1.1 + is-wsl: ^2.2.0 + checksum: 2c292acb59705494cbe07d7df7c8becff4f01651514d32ebd80f4aec2d20946d8f3824aac67ecdf2d09ef21fdf0eb24b6a7f033c137ccdceedc4661c54455c94 + languageName: node + linkType: hard + "cliui@npm:^7.0.2": version: 7.0.4 resolution: "cliui@npm:7.0.4" @@ -8232,7 +8292,7 @@ __metadata: languageName: node linkType: hard -"compression@npm:^1.7.4": +"compression@npm:1.7.4, compression@npm:^1.7.4": version: 1.7.4 resolution: "compression@npm:1.7.4" dependencies: @@ -9183,6 +9243,7 @@ __metadata: react-spinners: ^0.13.8 rehype-katex: ^7.0.0 remark-math: ^6.0.0 + serve: ^14.2.1 ts-node: ^10.9.1 typedoc: ^0.25.0 typedoc-plugin-frontmatter: ^0.0.2 @@ -10139,7 +10200,7 @@ __metadata: languageName: node linkType: hard -"execa@npm:^5.0.0": +"execa@npm:^5.0.0, execa@npm:^5.1.1": version: 5.1.1 resolution: "execa@npm:5.1.1" dependencies: @@ -12483,6 +12544,13 @@ __metadata: languageName: node linkType: hard +"is-port-reachable@npm:4.0.0": + version: 4.0.0 + resolution: "is-port-reachable@npm:4.0.0" + checksum: 47b7e10db8edcef27fbf9e50f0de85ad368d35688790ca64a13db67260111ac5f4b98989b11af06199fa93f25d810bd09a5b21b2c2646529668638f7c34d3c04 + languageName: node + linkType: hard + "is-promise@npm:^4.0.0": version: 4.0.0 resolution: "is-promise@npm:4.0.0" @@ -16624,7 +16692,7 @@ __metadata: languageName: node linkType: hard -"rc@npm:1.2.8, rc@npm:^1.2.8": +"rc@npm:1.2.8, rc@npm:^1.0.1, rc@npm:^1.1.6, rc@npm:^1.2.8": version: 1.2.8 resolution: "rc@npm:1.2.8" dependencies: @@ -16946,6 +17014,16 @@ __metadata: languageName: node linkType: hard +"registry-auth-token@npm:3.3.2": + version: 3.3.2 + resolution: "registry-auth-token@npm:3.3.2" + dependencies: + rc: ^1.1.6 + safe-buffer: ^5.0.1 + checksum: c9d7ae160a738f1fa825556e3669e6c771d2c0239ce37679f7e8646157a97d0a76464738be075002a1f754ef9bfb913b689f4bbfd5296d28f136fbf98c8c2217 + languageName: node + linkType: hard + "registry-auth-token@npm:^4.0.0": version: 4.2.2 resolution: "registry-auth-token@npm:4.2.2" @@ -16964,6 +17042,15 @@ __metadata: languageName: node linkType: hard +"registry-url@npm:3.1.0": + version: 3.1.0 + resolution: "registry-url@npm:3.1.0" + dependencies: + rc: ^1.0.1 + checksum: 6d223da41b04e1824f5faa63905c6f2e43b216589d72794111573f017352b790aef42cd1f826463062f89d804abb2027e3d9665d2a9a0426a11eedd04d470af3 + languageName: node + linkType: hard + "registry-url@npm:^5.0.0": version: 5.1.0 resolution: "registry-url@npm:5.1.0" @@ -17759,7 +17846,7 @@ __metadata: languageName: node linkType: hard -"serve-handler@npm:^6.1.3, serve-handler@npm:^6.1.5": +"serve-handler@npm:6.1.5, serve-handler@npm:^6.1.3, serve-handler@npm:^6.1.5": version: 6.1.5 resolution: "serve-handler@npm:6.1.5" dependencies: @@ -17802,6 +17889,27 @@ __metadata: languageName: node linkType: hard +"serve@npm:^14.2.1": + version: 14.2.1 + resolution: "serve@npm:14.2.1" + dependencies: + "@zeit/schemas": 2.29.0 + ajv: 8.11.0 + arg: 5.0.2 + boxen: 7.0.0 + chalk: 5.0.1 + chalk-template: 0.4.0 + clipboardy: 3.0.0 + compression: 1.7.4 + is-port-reachable: 4.0.0 + serve-handler: 6.1.5 + update-check: 1.5.4 + bin: + serve: build/main.js + checksum: c39a517b5d795a0a5c2f9fb9ff088b7e4962c579e34ace5b85dd62f93e0eacbc8a90359792c153c444a83258ffda392113dff7bfd10d41ced574a2d1886c2994 + languageName: node + linkType: hard + "set-function-length@npm:^1.1.1": version: 1.1.1 resolution: "set-function-length@npm:1.1.1" @@ -19545,6 +19653,16 @@ __metadata: languageName: node linkType: hard +"update-check@npm:1.5.4": + version: 1.5.4 + resolution: "update-check@npm:1.5.4" + dependencies: + registry-auth-token: 3.3.2 + registry-url: 3.1.0 + checksum: 2c9f7de6f030364c5ea02a341e5ae2dfe76da6559b32d40dd3b047b3ac0927408cf92d322c51cd8e009688210a85ccbf1eba449762a65a0d1b14f3cdf1ea5c48 + languageName: node + linkType: hard + "update-notifier@npm:^5.1.0": version: 5.1.0 resolution: "update-notifier@npm:5.1.0"