diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-03-10 17:59:52 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-03-10 17:59:52 +0100 |
| commit | f5a82d852abdb3b6b3bd342572ac5adee6affb7b (patch) | |
| tree | eb00a168a1416f6669b665e83ac9d6b88a8c6fa7 | |
| parent | e930f7b71ba526f40210f3e89afc79b2288e2e91 (diff) | |
| download | sylt-f5a82d852abdb3b6b3bd342572ac5adee6affb7b.tar.gz | |
remove run_string and rand
| -rw-r--r-- | Cargo.lock | 64 | ||||
| -rw-r--r-- | Cargo.toml | 1 | ||||
| -rw-r--r-- | src/lib.rs | 7 |
3 files changed, 0 insertions, 72 deletions
@@ -195,17 +195,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "getrandom" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] name = "half" version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -372,12 +361,6 @@ dependencies = [ ] [[package]] -name = "ppv-lite86" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" - -[[package]] name = "proc-macro2" version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -396,46 +379,6 @@ dependencies = [ ] [[package]] -name = "rand" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", - "rand_hc", -] - -[[package]] -name = "rand_chacha" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" -dependencies = [ - "getrandom", -] - -[[package]] -name = "rand_hc" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" -dependencies = [ - "rand_core", -] - -[[package]] name = "rayon" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -574,7 +517,6 @@ dependencies = [ "criterion", "logos", "owo-colors", - "rand", "sylt_macro", ] @@ -647,12 +589,6 @@ dependencies = [ ] [[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] name = "wasm-bindgen" version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -12,7 +12,6 @@ name = "sylt" [dependencies] logos = "~0.11.4" owo-colors = { git="https://github.com/FredTheDino/owo-colors.git" } -rand = "0.8" sylt_macro = { path = "sylt_macro" } criterion = { version = "0.3", optional = true } @@ -47,13 +47,6 @@ pub fn run_file(path: &Path, print: bool, functions: Vec<(String, RustFunction)> run(path, print, functions) } -pub fn run_string(source: &str, print: bool, functions: Vec<(String, RustFunction)>) -> Result<(), Vec<Error>> { - let mut path = std::env::temp_dir(); - path.push(format!("test_{}.sy", rand::random::<u32>())); - std::fs::write(path.clone(), source).expect("Failed to write source to temporary file"); - run(&path, print, functions) -} - fn run(path: &Path, print: bool, functions: Vec<(String, RustFunction)>) -> Result<(), Vec<Error>> { let sections = sectionizer::sectionize(path); match compiler::Compiler::new(sections).compile("main", path, &functions) { |
