-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Implement `sys_rand`, add the corresponding integration test * Fix lint error * Make this new file an example * Reorder enums * Fix `len` usage * Fix `len` again and move the test to rv32im tests * Remove native test * Remove redundant `eprintln`
- Loading branch information
1 parent
53b27eb
commit 0a77e95
Showing
9 changed files
with
91 additions
and
136 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
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,4 +27,5 @@ pub const CSRRW_FUNCT3: u8 = 0b001; | |
pub enum PhantomImm { | ||
HintInput = 0, | ||
PrintStr, | ||
HintRandom, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#![cfg_attr(not(feature = "std"), no_main)] | ||
#![cfg_attr(not(feature = "std"), no_std)] | ||
|
||
extern crate alloc; | ||
|
||
use std::collections::HashMap; | ||
|
||
openvm::entry!(main); | ||
|
||
fn main() { | ||
let mut map = HashMap::new(); | ||
map.insert(1, 2); | ||
map.insert(2, 8); | ||
assert!(map.get(&1) == Some(&2)); | ||
assert!(map.get(&2) == Some(&8)); | ||
assert!(!map.contains_key(&3)); | ||
println!("{:?}", map.get(&1).unwrap()); | ||
} |
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