Compare commits

...

75 Commits

Author SHA1 Message Date
7325296813 use local repo 2024-01-24 01:48:52 -08:00
e5c7ed6b75 debug insanity 2024-01-24 01:44:18 -08:00
9d6780a0b0 write discern_file + tweaks 2024-01-24 00:39:01 -08:00
4fd7795457 write colossal code 2024-01-23 23:55:14 -08:00
1ea68d96ef mega_double_join unused 2024-01-23 20:50:51 -08:00
4ced7f6210 change return Err to Err()? 2024-01-23 20:37:03 -08:00
db2c760c49 extract_script_overrides 2024-01-23 20:33:27 -08:00
8ee041918b tweaks 2024-01-23 20:19:00 -08:00
5384bbcb3b support Script.module.lua properly 2024-01-23 18:47:15 -08:00
9f3bd80403 woah 2024-01-23 18:43:32 -08:00
7863137174 tweaking 2024-01-23 18:43:32 -08:00
15fd698a21 colossal fixes & tweaks 2024-01-23 18:43:32 -08:00
07f0b03d45 ok I wrote this I guess 2024-01-23 18:43:32 -08:00
7e27b378e9 wip compile 2024-01-22 20:28:24 -08:00
48ab23bae5 tabs 2024-01-22 20:28:24 -08:00
97286612b7 path 2024-01-22 12:28:32 -08:00
8e589f7f0f download asset list 2024-01-16 21:50:35 -08:00
cbb5805d54 fix download path 2024-01-14 18:43:03 -08:00
d6add611fb fix error message 2024-01-14 13:24:33 -08:00
ebd5bb526e force update 2024-01-14 11:12:57 -08:00
858ed8a89c todo 2024-01-14 11:07:33 -08:00
35657d4d51 versions not correctly updated 2024-01-13 23:08:30 -08:00
15e8c8208f add --continue feature for download history 2024-01-13 21:24:50 -08:00
5574c34045 end_version for download_history + catch download error and write versions.json 2024-01-13 20:49:06 -08:00
e5322ad711 todo 2024-01-13 20:32:54 -08:00
0d0f1b1792 limit concurrent downloads using JoinSet 2024-01-12 17:07:06 -08:00
1b3a8be142 start version argument 2024-01-12 16:43:37 -08:00
eb20f8056d make download_history faster 2024-01-12 16:43:34 -08:00
b3f5dd6c4d opti 2024-01-12 15:53:25 -08:00
10f1ac313c DecompileStyle 2024-01-12 13:14:21 -08:00
2260d9a565 fix analyzer 2024-01-12 11:23:45 -08:00
ee8e59b898 rearrange and comment args 2024-01-12 11:20:22 -08:00
a9a40cd2f0 I think this is better 2024-01-11 22:25:00 -08:00
cef0f38482 pray rayon doesn't spawn 600 threads and crash 2024-01-11 22:07:01 -08:00
c2041b33e4 add rayon dep 2024-01-11 22:06:43 -08:00
29b4211484 limit stupid bs 2024-01-11 22:02:10 -08:00
bbbbd6bf64 wrong tab 2024-01-11 21:32:28 -08:00
e8ef06c2cb tokio looks like this on some random dude's webpage 2024-01-11 21:29:06 -08:00
9dc67a22c1 call this function because it makes it work better 2024-01-11 21:18:37 -08:00
67048cccf6 update deleted or moved files 2024-01-11 21:18:37 -08:00
b9eaefe056 note about default signature 2024-01-11 21:18:37 -08:00
1bdfbf96c3 write no empty commits 2024-01-11 21:18:37 -08:00
db44cf12be fix code duplication 2024-01-11 21:18:37 -08:00
30169ddc5b respect config 2024-01-11 21:18:37 -08:00
4d77895260 use less ram lol 2024-01-11 21:18:37 -08:00
aeb72503f0 print for each 2024-01-11 17:13:05 -08:00
1ba8d636f1 not sure if this drops file earlier 2024-01-11 17:13:05 -08:00
a5c01ff9cf DownloadAndDecompileHistoryIntoGit 2024-01-11 16:11:46 -08:00
c3ca545119 write some stupid stuff using unlimited scoped threads 2024-01-11 16:06:12 -08:00
def0d1a69a async decompile 2024-01-11 14:51:31 -08:00
00f4788169 prepare to write files with TOKIO!!! 2024-01-11 13:59:32 -08:00
e12c13a1dd add args for committer name and email 2024-01-11 13:48:57 -08:00
816461e9f4 async download -> unzip -> decompile -> git history 2024-01-11 02:47:20 -08:00
13ebb96ed6 refactor 2024-01-11 02:46:47 -08:00
097c92f602 add git2 dep 2024-01-11 02:06:50 -08:00
82eb78db23 rewrite stuff as functions 2024-01-11 02:06:15 -08:00
1434a11f28 pass tally into stack instruction to generate name override 2024-01-10 20:14:41 -08:00
1aef1f73d9 minor refactor to add/respect some cli options 2024-01-08 15:15:10 -08:00
eebc843cb4 comment for clarity 2024-01-08 15:11:28 -08:00
fdbe3251b3 more requests 2024-01-06 13:10:13 -08:00
b2f92a741c download version history 2024-01-06 13:10:13 -08:00
7e4a9f872c add version history deps 2024-01-06 12:39:16 -08:00
5f1178d0cf use output instead of key val pair 2024-01-06 12:38:43 -08:00
bb32d30896 error msg 2024-01-06 11:15:07 -08:00
03ae57e2e1 sanitize 2024-01-06 11:13:52 -08:00
589c1b044e invalid states are representable but I don't care 2024-01-05 21:36:21 -08:00
aed3b69ca0 decompile 2024-01-05 21:07:04 -08:00
4a081d5b8f delete useless enum 2024-01-05 13:47:32 -08:00
54ca5520b7 containerfile 2024-01-02 13:11:28 -08:00
23dfcadc85 only support one asset for now 2024-01-01 12:22:12 -08:00
1075d59a91 async upload 2024-01-01 12:22:12 -08:00
01676bb4da redo asset stuff as asset id and file list 2024-01-01 12:21:34 -08:00
df62258608 implement cookie and group as arg (bad) 2024-01-01 12:21:34 -08:00
dc4ec4547a release opti 2024-01-01 12:21:34 -08:00
929484855d async download 2024-01-01 12:21:33 -08:00
4 changed files with 1696 additions and 64 deletions

219
Cargo.lock generated

@ -26,6 +26,21 @@ dependencies = [
"memchr",
]
[[package]]
name = "android-tzdata"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0"
[[package]]
name = "android_system_properties"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"
dependencies = [
"libc",
]
[[package]]
name = "anstream"
version = "0.6.5"
@ -97,16 +112,21 @@ name = "asset-tool"
version = "0.1.0"
dependencies = [
"anyhow",
"chrono",
"clap",
"flate2",
"futures",
"git2",
"lazy-regex",
"pollster",
"rayon",
"rbx_binary",
"rbx_dom_weak",
"rbx_reflection_database",
"rbx_xml",
"reqwest",
"serde",
"serde_json",
"tokio",
]
@ -192,6 +212,7 @@ version = "1.0.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0"
dependencies = [
"jobserver",
"libc",
]
@ -201,6 +222,21 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
[[package]]
name = "chrono"
version = "0.4.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38"
dependencies = [
"android-tzdata",
"iana-time-zone",
"js-sys",
"num-traits",
"serde",
"wasm-bindgen",
"windows-targets 0.48.5",
]
[[package]]
name = "clap"
version = "4.4.12"
@ -306,6 +342,31 @@ dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345"
[[package]]
name = "deranged"
version = "0.3.11"
@ -315,6 +376,12 @@ dependencies = [
"powerfmt",
]
[[package]]
name = "either"
version = "1.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07"
[[package]]
name = "encoding_rs"
version = "0.8.33"
@ -492,6 +559,21 @@ version = "0.28.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253"
[[package]]
name = "git2"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fbf97ba92db08df386e10c8ede66a2a0369bd277090afd8710e19e38de9ec0cd"
dependencies = [
"bitflags 2.4.1",
"libc",
"libgit2-sys",
"log",
"openssl-probe",
"openssl-sys",
"url",
]
[[package]]
name = "h2"
version = "0.3.22"
@ -600,6 +682,29 @@ dependencies = [
"tokio-native-tls",
]
[[package]]
name = "iana-time-zone"
version = "0.1.59"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6a67363e2aa4443928ce15e57ebae94fd8949958fd1223c4cfc0cd473ad7539"
dependencies = [
"android_system_properties",
"core-foundation-sys",
"iana-time-zone-haiku",
"js-sys",
"wasm-bindgen",
"windows-core",
]
[[package]]
name = "iana-time-zone-haiku"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"
dependencies = [
"cc",
]
[[package]]
name = "idna"
version = "0.2.3"
@ -653,6 +758,15 @@ version = "1.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c"
[[package]]
name = "jobserver"
version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d"
dependencies = [
"libc",
]
[[package]]
name = "js-sys"
version = "0.3.66"
@ -697,6 +811,46 @@ version = "0.2.151"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4"
[[package]]
name = "libgit2-sys"
version = "0.16.1+1.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c"
dependencies = [
"cc",
"libc",
"libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
]
[[package]]
name = "libssh2-sys"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2dc8a030b787e2119a731f1951d6a773e2280c660f8ec4b0f5e1505a386e71ee"
dependencies = [
"cc",
"libc",
"libz-sys",
"openssl-sys",
"pkg-config",
"vcpkg",
]
[[package]]
name = "libz-sys"
version = "1.1.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "295c17e837573c8c821dbaeb3cceb3d745ad082f7572191409e69cbc1b3fd050"
dependencies = [
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "linux-raw-sys"
version = "0.4.12"
@ -913,9 +1067,9 @@ checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de"
[[package]]
name = "proc-macro2"
version = "1.0.71"
version = "1.0.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "75cb1540fadbd5b8fbccc4dddad2734eba435053f725621c070711a14bb5f4b8"
checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c"
dependencies = [
"unicode-ident",
]
@ -957,9 +1111,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.33"
version = "1.0.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae"
checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
dependencies = [
"proc-macro2",
]
@ -994,11 +1148,29 @@ dependencies = [
"getrandom",
]
[[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"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad50c13afe91296dad6508ea7e29f4b665fa56cb664ad01eaf8fdbd3da69d5e1"
dependencies = [
"log",
"lz4",
@ -1012,8 +1184,6 @@ dependencies = [
[[package]]
name = "rbx_dom_weak"
version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843a2e0e1446623625943f7228d9d4b5cf3883017e3964733600682506864b34"
dependencies = [
"rbx_types",
"serde",
@ -1022,8 +1192,6 @@ dependencies = [
[[package]]
name = "rbx_reflection"
version = "4.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41e762dfca3217d2d37da631de2fa0d1616edaa61a0a2633263d5d3305baf8c3"
dependencies = [
"rbx_types",
"serde",
@ -1033,8 +1201,6 @@ dependencies = [
[[package]]
name = "rbx_reflection_database"
version = "0.2.9+roblox-596"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b18f088a2b4aa66324ec97b5b6ffacb53188aef19f3497d95d6a1d1dbb28e66"
dependencies = [
"lazy_static",
"rbx_reflection",
@ -1045,8 +1211,6 @@ dependencies = [
[[package]]
name = "rbx_types"
version = "1.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a991523e3ad5f43a4d121cb4a1e5bc23f7826bb4a1db5aa51e94f1073150ec"
dependencies = [
"base64 0.13.1",
"bitflags 1.3.2",
@ -1060,8 +1224,6 @@ dependencies = [
[[package]]
name = "rbx_xml"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc87343301303ff0510903fb7eb3dbd1c75bdb6ab780fea6091bdc3f58b5829f"
dependencies = [
"base64 0.13.1",
"log",
@ -1230,18 +1392,18 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.193"
version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89"
checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.193"
version = "1.0.195"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3"
checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c"
dependencies = [
"proc-macro2",
"quote",
@ -1250,9 +1412,9 @@ dependencies = [
[[package]]
name = "serde_json"
version = "1.0.108"
version = "1.0.111"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4"
dependencies = [
"itoa",
"ryu",
@ -1298,9 +1460,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
version = "2.0.43"
version = "2.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee659fb5f3d355364e1f3e5bc10fb82068efbf824a1e9d1c9504244a6469ad53"
checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f"
dependencies = [
"proc-macro2",
"quote",
@ -1629,6 +1791,15 @@ dependencies = [
"wasm-bindgen",
]
[[package]]
name = "windows-core"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9"
dependencies = [
"windows-targets 0.52.0",
]
[[package]]
name = "windows-sys"
version = "0.48.0"

@ -7,14 +7,24 @@ edition = "2021"
[dependencies]
anyhow = "1.0.75"
chrono = { version = "0.4.31", features = ["serde"] }
clap = { version = "4.4.2", features = ["derive"] }
flate2 = "1.0.28"
futures = "0.3.30"
git2 = "0.18.1"
lazy-regex = "3.1.0"
pollster = "0.3.0"
rbx_binary = "0.7.1"
rbx_dom_weak = "2.5.0"
rbx_reflection_database = "0.2.7"
rbx_xml = "0.13.1"
reqwest = { version = "0.11.23", features = ["cookies"] }
rayon = "1.8.0"
rbx_binary = { path = "../rbx-dom/rbx_binary"}
rbx_dom_weak = { path = "../rbx-dom/rbx_dom_weak"}
rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database"}
rbx_xml = { path = "../rbx-dom/rbx_xml"}
reqwest = { version = "0.11.23", features = ["cookies", "json"] }
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
tokio = { version = "1.35.1", features = ["macros", "rt-multi-thread", "fs"] }
[profile.release]
#lto = true
strip = true
codegen-units = 1

23
Containerfile Normal file

@ -0,0 +1,23 @@
# Using the `rust-musl-builder` as base image, instead of
# the official Rust toolchain
FROM clux/muslrust:stable AS chef
USER root
RUN cargo install cargo-chef
WORKDIR /app
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
# Notice that we are specifying the --target flag!
RUN cargo chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json
COPY . .
RUN cargo build --release --target x86_64-unknown-linux-musl --bin asset-tool
FROM alpine AS runtime
RUN addgroup -S myuser && adduser -S myuser -G myuser
COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/asset-tool /usr/local/bin/
USER myuser
CMD ["/usr/local/bin/asset-tool"]

File diff suppressed because it is too large Load Diff