-
Notifications
You must be signed in to change notification settings - Fork 225
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into abi-to-witness-map
* master: chore(ssa): Predicate for store instruction (#829) feat(std_lib): println statements (#630) chore(ci): Make Kev the committer on release lockfile updates (#845) feat(stdlib): Add higher order array functions (#833) chore(ssa): Remove values from array type (#771)
- Loading branch information
Showing
31 changed files
with
741 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,7 @@ jobs: | |
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ fromJSON(needs.release-please.outputs.release-pr).headBranchName }} | ||
token: ${{ secrets.NOIR_RELEASES_TOKEN }} | ||
|
||
- name: Setup toolchain | ||
uses: dtolnay/[email protected] | ||
|
@@ -46,8 +47,8 @@ jobs: | |
- name: Configure git | ||
run: | | ||
git config user.name github-actions[bot] | ||
git config user.email 41898282+github-actions[bot]@users.noreply.github.com | ||
git config user.name kevaundray | ||
git config user.email kevtheappdev@gmail.com | ||
- name: Commit updates | ||
run: | | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
message = "hello world" | ||
y = 5 | ||
hex_as_string = "0x41" | ||
hex_as_field = "0x41" | ||
hex_as_field = "0x41" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,56 @@ | ||
fn main(message : pub str<11>, hex_as_string : str<4>, hex_as_field : Field) { | ||
use dep::std; | ||
|
||
fn main(message : pub str<11>, y : Field, hex_as_string : str<4>, hex_as_field : Field) { | ||
let mut bad_message = "hello world"; | ||
|
||
constrain message == "hello world"; | ||
bad_message = "helld world"; | ||
let x = 10; | ||
let z = x * 5; | ||
std::println(10); | ||
|
||
std::println(z); // x * 5 in println not yet supported | ||
std::println(x); | ||
|
||
let array = [1, 2, 3, 5, 8]; | ||
constrain y == 5; // Change to y != 5 to see how the later print statements are not called | ||
std::println(array); | ||
|
||
std::println(bad_message); | ||
constrain message != bad_message; | ||
|
||
let hash = std::hash::pedersen([x]); | ||
std::println(hash); | ||
|
||
constrain hex_as_string == "0x41"; | ||
// constrain hex_as_string != 0x41; This will fail with a type mismatch between str[4] and Field | ||
constrain hex_as_field == 0x41; | ||
} | ||
|
||
#[test] | ||
fn test_prints_strings() { | ||
let message = "hello world!"; | ||
|
||
std::println(message); | ||
std::println("goodbye world"); | ||
} | ||
|
||
#[test] | ||
fn test_prints_array() { | ||
let array = [1, 2, 3, 5, 8]; | ||
|
||
// TODO: Printing structs currently not supported | ||
// let s = Test { a: 1, b: 2, c: [3, 4] }; | ||
// std::println(s); | ||
|
||
std::println(array); | ||
|
||
let hash = std::hash::pedersen(array); | ||
std::println(hash); | ||
} | ||
|
||
struct Test { | ||
a: Field, | ||
b: Field, | ||
c: [Field; 2], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.