diff --git a/Cargo.lock b/Cargo.lock index f242aa5..f5e29e6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -468,30 +468,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "crossbeam-deque" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" -dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" -dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", - "scopeguard", -] - [[package]] name = "crossbeam-utils" version = "0.8.18" @@ -1156,7 +1132,6 @@ dependencies = [ "path-clean", "pin-project", "rand", - "rayon", "rbx_binary", "rbx_cookie", "rbx_dom_weak", @@ -1170,7 +1145,6 @@ dependencies = [ "serde_json", "serde_yaml", "thiserror", - "tikv-jemallocator", "tokio", "tokio-tungstenite", "toml", @@ -1223,15 +1197,6 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -1588,26 +1553,6 @@ dependencies = [ "getrandom 0.2.11", ] -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "rbx_binary" version = "0.7.3" @@ -2337,26 +2282,6 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "tikv-jemallocator" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" -dependencies = [ - "libc", - "tikv-jemalloc-sys", -] - [[package]] name = "time" version = "0.2.27" diff --git a/Cargo.toml b/Cargo.toml index b0bb3bd..6474e9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,8 +83,6 @@ tracing-subscriber = { version = "0.3", features = ["env-filter"] } mlua = { version = "0.9.1", features = ["luau", "luau-jit", "serialize"] } tokio = { version = "1.24", features = ["full", "tracing"] } os_str_bytes = { version = "6.4", features = ["conversions"] } -[target.'cfg(not(target_env = "msvc"))'.dependencies] -tikv-jemallocator = "0.5" ### SERDE @@ -126,7 +124,6 @@ regex = { optional = true, version = "1.7", default-features = false, features = "unicode-perl", ] } rustyline = { optional = true, version = "12.0" } -rayon = "1.8" ### ROBLOX diff --git a/src/executor.rs b/src/executor.rs index 183bc31..18e025e 100644 --- a/src/executor.rs +++ b/src/executor.rs @@ -1,12 +1,8 @@ -use std::{env, ops::ControlFlow, process::ExitCode, sync::Mutex}; +use std::{env, ops::ControlFlow, process::ExitCode}; use lune::Lune; use anyhow::Result; -use rayon::{ - iter::{IndexedParallelIterator, ParallelIterator}, - slice::ParallelSlice, -}; use tokio::fs::read as read_to_vec; /** @@ -37,8 +33,8 @@ pub async fn check_env() -> (bool, Vec, Vec) { Discovers, loads and executes the bytecode contained in a standalone binary. */ pub async fn run_standalone(signature: Vec, bin: Vec) -> Result { - let bytecode_offset = Mutex::new(0); - let bytecode_size = Mutex::new(0); + let mut bytecode_offset = 0; + let mut bytecode_size = 0; // standalone binary structure (reversed, 8 bytes per field) // [0] => signature @@ -56,13 +52,10 @@ pub async fn run_standalone(signature: Vec, bin: Vec) -> Result, bin: Vec) -> Result, bin: Vec) -> Result ExitCode { tracing_subscriber::fmt()