diff --git a/.cargo/config.toml b/.cargo/config.toml new file mode 100644 index 0000000..d3d204d --- /dev/null +++ b/.cargo/config.toml @@ -0,0 +1,6 @@ +[env] +# We only use these blocking::unblock threads for prompting +# for interactive input using stdin, the default amount of +# threads is 500 which is unnecessarily high, we probably +# only need one thread here but lets do 10 just in case +BLOCKING_MAX_THREADS = "10" diff --git a/.lune/csv_printer.luau b/.lune/csv_printer.luau index 95853e1..da2940b 100644 --- a/.lune/csv_printer.luau +++ b/.lune/csv_printer.luau @@ -15,7 +15,9 @@ assert(fs.isFile(path), "Input file path does not exist") local csvTable = {} for index, rawLine in string.split(fs.readFile(path), LINE_SEPARATOR) do - csvTable[index] = string.split(rawLine, COMMA_SEPARATOR) + if #rawLine > 0 then + csvTable[index] = string.split(rawLine, COMMA_SEPARATOR) + end end -- Gather the maximum widths of strings diff --git a/Cargo.lock b/Cargo.lock index bb15df9..2238c13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "aho-corasick" -version = "0.7.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" -dependencies = [ - "memchr", -] - [[package]] name = "anyhow" version = "1.0.69" @@ -803,6 +794,7 @@ dependencies = [ "reqwest", "serde", "serde_json", + "serde_yaml", "tokio", "tokio-tungstenite", ] @@ -819,7 +811,6 @@ dependencies = [ "lazy_static", "lune", "regex", - "reqwest", "serde", "serde_json", "serde_yaml", @@ -1103,8 +1094,6 @@ version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ - "aho-corasick", - "memchr", "regex-syntax", ] diff --git a/Cargo.toml b/Cargo.toml index ad48ea2..eb1483f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,4 @@ [workspace] - members = ["packages/cli", "packages/lib"] default-members = ["packages/cli"] @@ -13,22 +12,23 @@ readme = "README.md" keywords = ["cli", "lua", "luau", "scripts"] categories = ["command-line-interface"] -[profile.release] -strip = true # Automatically strip symbols from the binary. -opt-level = "z" # Optimize for size. -lto = true # Enable link-time optimization -panic = "abort" # Remove extra panic info - [workspace.dependencies] - console = "0.15.5" +futures-util = "0.3.26" lazy_static = "1.4.0" serde = { version = "1.0.152", features = ["derive"] } serde_json = { version = "1.0.91", features = ["preserve_order"] } +serde_yaml = "0.9.17" tokio = { version = "1.24.2", features = ["full"] } [workspace.dependencies.reqwest] version = "0.11.14" default-features = false features = ["rustls-tls"] + +[profile.release] +strip = true # Automatically strip symbols from the binary. +opt-level = "z" # Optimize for size. +lto = true # Enable link-time optimization +panic = "abort" # Remove extra panic info diff --git a/packages/cli/Cargo.toml b/packages/cli/Cargo.toml index ab53a4f..ae185f5 100644 --- a/packages/cli/Cargo.toml +++ b/packages/cli/Cargo.toml @@ -19,16 +19,15 @@ path = "src/main.rs" lune = { path = "../lib" } console.workspace = true +futures-util.workspace = true lazy_static.workspace = true -serde_json.workspace = true serde.workspace = true +serde_json.workspace = true +serde_yaml.workspace = true tokio.workspace = true -reqwest.workspace = true anyhow = "1.0.68" -futures-util = "0.3.26" -regex = "1.7.1" -serde_yaml = "0.9.17" clap = { version = "4.1.1", features = ["derive"] } full_moon = { version = "0.17.0", features = ["roblox"] } +regex = { version = "1.7.1", default-features = false, features = ["std"] } diff --git a/packages/lib/Cargo.toml b/packages/lib/Cargo.toml index fb00df3..e1b86d2 100644 --- a/packages/lib/Cargo.toml +++ b/packages/lib/Cargo.toml @@ -16,9 +16,11 @@ path = "src/lib.rs" [dependencies] console.workspace = true +futures-util.workspace = true lazy_static.workspace = true -serde_json.workspace = true serde.workspace = true +serde_json.workspace = true +serde_yaml.workspace = true tokio.workspace = true reqwest.workspace = true @@ -26,7 +28,6 @@ async-trait = "0.1.64" blocking = "1.3.0" dialoguer = "0.10.3" directories = "4.0.1" -futures-util = "0.3.26" pin-project = "1.0.12" os_str_bytes = "6.4.1"