Skip to main content

rustdom_x/
lib.rs

1#[macro_use]
2extern crate log;
3
4pub mod byte_string;
5pub mod common;
6pub mod hash;
7pub mod m128;
8pub mod memory;
9pub mod program;
10pub mod superscalar;
11pub mod vm;
12
13pub use crate::memory::VmMemory;
14pub use crate::vm::new_vm;
15
16#[test]
17fn test_hashing() {
18    use crate::memory::VmMemory;
19    use crate::vm::new_vm;
20    use std::sync::Arc;
21
22    let cache = Arc::new(VmMemory::full(b"test key 000"));
23    let mut vm = new_vm(cache);
24
25    for i in 0..10usize {
26        let hash = vm.calculate_hash(&i.to_be_bytes());
27        println!("{}", hash.to_hex())
28    }
29}