diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..5d41d92 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: Build rbxlx-to-rojo +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build_windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v1 + - name: Build (All features) + run: | + cargo build --locked --release --all-features + - name: Upload selene + uses: actions/upload-artifact@v1 + with: + name: rbxlx-to-rojo-windows + path: ./target/release/rbxlx-to-rojo.exe + build_mac: + runs-on: macos-latest + steps: + - uses: actions/checkout@v1 + - name: Install Rust + run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + - name: Build (All features) + run: | + source $HOME/.cargo/env + cargo build --locked --release --all-features + - name: Upload rbxlx-to-rojo + uses: actions/upload-artifact@v1 + with: + name: rbxlx-to-rojo-macos + path: ./target/release/rbxlx-to-rojo \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..f668981 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: Test rbxlx-to-rojo +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Run tests + run: cargo test \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0664b81 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,14 @@ +# Changelog +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [Unreleased] + +## [1.0.0] - 2021-01-06 +### Added +- Added support for .rbxl and .rbxm, and not just .rbxlx. + +### Changed +- Changed file reading mechanism to be one that should be more optimized, increasing read times. You can further increase read times by switching to binary (.rbxl, .rbxm) files instead of using .rbxlx. diff --git a/Cargo.lock b/Cargo.lock index 6fce416..c648ed2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,580 +4,766 @@ name = "aho-corasick" version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" dependencies = [ - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "memchr", ] [[package]] name = "ansi_term" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] +[[package]] +name = "arrayref" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" + +[[package]] +name = "arrayvec" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" + [[package]] name = "atty" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" dependencies = [ - "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", - "termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "termion", + "winapi", ] [[package]] name = "autocfg" -version = "0.1.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "base64" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)", -] +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] name = "bitflags" -version = "1.0.4" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" + +[[package]] +name = "blake3" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46080006c1505f12f64dd2a09264b343381ed3190fa02c8005d5d662ac571c63" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if 0.1.10", + "constant_time_eq", + "crypto-mac", + "digest", +] [[package]] name = "byteorder" -version = "1.3.1" +version = "1.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" + +[[package]] +name = "cc" +version = "1.0.66" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" + +[[package]] +name = "cfg-if" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] name = "cfg-if" -version = "0.1.7" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "cloudabi" -version = "0.0.3" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" + +[[package]] +name = "crypto-mac" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4434400df11d95d556bac068ddfedd482915eb18fe8bea89bc80b6e4b1c179e5" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", + "subtle", ] [[package]] name = "ctor" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" dependencies = [ - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "quote 0.6.12", + "syn 0.15.34", ] [[package]] name = "difference" version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] -name = "env_logger" -version = "0.6.1" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", - "humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)", - "termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", + "generic-array", ] [[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "env_logger" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] [[package]] name = "gcc" version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" + +[[package]] +name = "generic-array" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +dependencies = [ + "typenum", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi", +] [[package]] name = "humantime" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" dependencies = [ - "quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", + "quick-error", ] [[package]] name = "itoa" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" [[package]] name = "lazy_static" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.54" +version = "0.2.81" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb" [[package]] name = "log" version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" dependencies = [ - "cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", + "cfg-if 0.1.10", +] + +[[package]] +name = "lz4" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aac20ed6991e01bf6a2e68cc73df2b389707403662a8ba89f68511fb340f724c" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dca79aa95d8b3226213ad454d328369853be3a1382d89532a854f4d69640acae" +dependencies = [ + "cc", + "libc", ] [[package]] name = "md5" -version = "0.6.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" [[package]] name = "memchr" version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" [[package]] name = "nfd" version = "0.0.4" source = "git+https://github.com/saurvs/nfd-rs#07578c5fea4d7b1f35fbf128f04b6264c3bf3c5a" dependencies = [ - "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)", + "gcc", +] + +[[package]] +name = "num-traits" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +dependencies = [ + "autocfg", ] [[package]] name = "numtoa" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" [[package]] name = "output_vt100" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] +[[package]] +name = "ppv-lite86" +version = "0.2.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" + [[package]] name = "pretty_assertions" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" dependencies = [ - "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", - "ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)", - "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "ansi_term", + "ctor", + "difference", + "output_vt100", ] [[package]] name = "proc-macro2" version = "0.4.30" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" dependencies = [ - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "unicode-xid 0.1.0", +] + +[[package]] +name = "proc-macro2" +version = "1.0.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" +dependencies = [ + "unicode-xid 0.2.1", ] [[package]] name = "quick-error" version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" [[package]] name = "quote" version = "0.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", ] [[package]] -name = "rand" -version = "0.6.5" +name = "quote" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", ] [[package]] -name = "rand_chacha" -version = "0.1.1" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "getrandom", + "libc", + "rand_chacha", + "rand_core", + "rand_hc", ] [[package]] -name = "rand_core" -version = "0.3.1" +name = "rand_chacha" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "ppv-lite86", + "rand_core", ] [[package]] name = "rand_core" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom", +] [[package]] name = "rand_hc" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rand_core", ] [[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "rbx_binary" +version = "0.6.0-dev" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "log", + "lz4", + "rbx_dom_weak 2.0.0-dev", + "rbx_reflection 4.0.0-dev", + "rbx_reflection_database", + "thiserror", ] [[package]] -name = "rand_jitter" -version = "0.1.4" +name = "rbx_dom_weak" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978b65ce742f3cb38c0b64ca48601a5590e6be9a14d12025b9cba2fe553b78c4" dependencies = [ - "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "lazy_static", + "md5", + "serde", + "serde_derive", + "serde_repr", + "uuid", ] [[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "rbx_dom_weak" +version = "2.0.0-dev" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)", - "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "rbx_types", + "serde", ] [[package]] -name = "rand_pcg" -version = "0.1.2" +name = "rbx_reflection" +version = "3.3.454" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9ccdde2a675eb13a8ecfe1f60879bf11ab29e9a671459d833929298873eedc4" dependencies = [ - "autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "bitflags", + "lazy_static", + "rbx_dom_weak 1.10.1", + "serde", ] [[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "rbx_reflection" +version = "4.0.0-dev" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "rbx_types", + "serde", ] [[package]] -name = "rbx_dom_weak" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "rbx_reflection_database" +version = "0.1.0" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "md5 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", + "rbx_reflection 4.0.0-dev", + "rmp-serde", + "serde", ] [[package]] -name = "rbx_reflection" -version = "3.2.389" -source = "registry+https://github.com/rust-lang/crates.io-index" +name = "rbx_types" +version = "0.2.0" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_dom_weak 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "bitflags", + "blake3", + "lazy_static", + "rand", + "serde", ] [[package]] name = "rbx_xml" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +version = "0.12.0-dev" +source = "git+https://github.com/rojo-rbx/rbx-dom/?branch=master#54531ee87511312fedfd3e3767d6b9f8d14a8a80" dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_dom_weak 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_reflection 3.2.389 (registry+https://github.com/rust-lang/crates.io-index)", - "xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", + "base64", + "log", + "rbx_dom_weak 2.0.0-dev", + "rbx_reflection 4.0.0-dev", + "rbx_reflection_database", + "xml-rs", ] [[package]] name = "rbxlx-to-rojo" -version = "0.1.0" +version = "1.0.0" dependencies = [ - "env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "nfd 0.0.4 (git+https://github.com/saurvs/nfd-rs)", - "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_dom_weak 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_reflection 3.2.389 (registry+https://github.com/rust-lang/crates.io-index)", - "rbx_xml 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", - "serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", + "env_logger", + "lazy_static", + "log", + "nfd", + "pretty_assertions", + "rbx_binary", + "rbx_dom_weak 2.0.0-dev", + "rbx_reflection 3.3.454", + "rbx_xml", + "serde", + "serde_json", ] [[package]] name = "redox_syscall" version = "0.1.54" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" [[package]] name = "redox_termios" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" dependencies = [ - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", + "redox_syscall", ] [[package]] name = "regex" version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" dependencies = [ - "aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", - "memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", + "utf8-ranges", ] [[package]] name = "regex-syntax" version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" dependencies = [ - "ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "ucd-util", +] + +[[package]] +name = "rmp" +version = "0.8.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f10b46df14cf1ee1ac7baa4d2fbc2c52c0622a4b82fa8740e37bc452ac0184f" +dependencies = [ + "byteorder", + "num-traits", +] + +[[package]] +name = "rmp-serde" +version = "0.14.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ce7d70c926fe472aed493b902010bccc17fa9f7284145cb8772fd22fdb052d8" +dependencies = [ + "byteorder", + "rmp", + "serde", ] [[package]] name = "ryu" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" [[package]] name = "serde" -version = "1.0.91" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06c64263859d87aa2eb554587e2d23183398d617427327cf2b3d0ed8c69e4800" dependencies = [ - "serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.91" +version = "1.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c84d3526699cd55261af4b941e4e725444df67aa4f9e6a3564f18030d12672df" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.58", ] [[package]] name = "serde_json" version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" +dependencies = [ + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dc6b7951b17b051f3210b063f12cc17320e2fe30ae05b0fe2a3abb068551c76" dependencies = [ - "itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)", - "ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.58", ] +[[package]] +name = "subtle" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d67a5a62ba6e01cb2192ff309324cb4875d0c451d55fe2319433abe7a05a8ee" + [[package]] name = "syn" version = "0.15.34" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" dependencies = [ - "proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)", - "quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "proc-macro2 0.4.30", + "quote 0.6.12", + "unicode-xid 0.1.0", +] + +[[package]] +name = "syn" +version = "1.0.58" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc60a3d73ea6594cd712d830cc1f0390fd71542d8c8cd24e70cc54cdfd5e05d5" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.8", + "unicode-xid 0.2.1", ] [[package]] name = "termcolor" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" dependencies = [ - "wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "wincolor", ] [[package]] name = "termion" version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" dependencies = [ - "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", - "numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)", - "redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libc", + "numtoa", + "redox_syscall", + "redox_termios", +] + +[[package]] +name = "thiserror" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76cc616c6abf8c8928e2fdcc0dbfab37175edd8fb49a4641066ad1364fdab146" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9be73a2caec27583d0046ef3796c3794f868a5bc813db689eed00c7631275cd1" +dependencies = [ + "proc-macro2 1.0.24", + "quote 1.0.8", + "syn 1.0.58", ] [[package]] name = "thread_local" version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" dependencies = [ - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static", ] +[[package]] +name = "typenum" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" + [[package]] name = "ucd-util" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" [[package]] name = "unicode-xid" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] name = "utf8-ranges" version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" [[package]] name = "uuid" -version = "0.7.4" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" dependencies = [ - "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)", + "rand", + "serde", ] +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + [[package]] name = "winapi" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" dependencies = [ - "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "wincolor" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" dependencies = [ - "winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", - "winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", + "winapi", + "winapi-util", ] [[package]] name = "xml-rs" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" - -[metadata] -"checksum aho-corasick 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e6f484ae0c99fec2e858eb6134949117399f222608d84cadb3f58c1f97c2364c" -"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" -"checksum atty 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "9a7d5b8723950951411ee34d271d99dddcc2035a16ab25310ea2c8cfd4369652" -"checksum autocfg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a6d640bee2da49f60a4068a7fae53acde8982514ab7bae8b8cea9e88cbcfd799" -"checksum base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)" = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -"checksum bitflags 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "228047a76f468627ca71776ecdebd732a3423081fcf5125585bcd7c49886ce12" -"checksum byteorder 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a019b10a2a7cdeb292db131fc8113e57ea2a908f6e7894b0c3c671893b65dbeb" -"checksum cfg-if 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "11d43355396e872eefb45ce6342e4374ed7bc2b3a502d1b28e36d6e23c05d1f4" -"checksum cloudabi 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -"checksum ctor 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "3b4c17619643c1252b5f690084b82639dd7fac141c57c8e77a00e0148132092c" -"checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" -"checksum env_logger 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b61fa891024a945da30a9581546e8cfaf5602c7b3f4c137a2805cf388f92075a" -"checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -"checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" -"checksum humantime 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca7e5f2e110db35f93b837c81797f3714500b81d517bf20c431b16d3ca4f114" -"checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" -"checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" -"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" -"checksum log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c84ec4b527950aa83a329754b01dbe3f58361d1c5efacd1f6d68c494d08a17c6" -"checksum md5 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e6bcd6433cff03a4bfc3d9834d504467db1f1cf6d0ea765d37d330249ed629d" -"checksum memchr 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2efc7bc57c883d4a4d6e3246905283d8dae951bb3bd32f49d6ef297f546e1c39" -"checksum nfd 0.0.4 (git+https://github.com/saurvs/nfd-rs)" = "" -"checksum numtoa 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b8f8bdf33df195859076e54ab11ee78a1b208382d3a26ec40d142ffc1ecc49ef" -"checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9" -"checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427" -"checksum proc-macro2 0.4.30 (registry+https://github.com/rust-lang/crates.io-index)" = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -"checksum quick-error 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9274b940887ce9addde99c4eee6b5c44cc494b182b97e73dc8ffdcb3397fd3f0" -"checksum quote 0.6.12 (registry+https://github.com/rust-lang/crates.io-index)" = "faf4799c5d274f3868a4aae320a0a182cbd2baee377b378f080e16a23e9d80db" -"checksum rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -"checksum rand_chacha 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -"checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -"checksum rand_core 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d0e7a549d590831370895ab7ba4ea0c1b6b011d106b5ff2da6eee112615e6dc0" -"checksum rand_hc 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -"checksum rand_isaac 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -"checksum rand_jitter 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -"checksum rand_os 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -"checksum rand_pcg 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -"checksum rand_xorshift 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -"checksum rbx_dom_weak 1.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "08ae7950cd5c252ae9596aac109ab7bfd12018d28d02afb8db1e39098769413b" -"checksum rbx_reflection 3.2.389 (registry+https://github.com/rust-lang/crates.io-index)" = "9ddf72ee29386f719cc1fa247322f6e7bb3220045fcf5541d4dc5afe4f8fc7ae" -"checksum rbx_xml 0.10.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f6df95f079a20ccdfc3a59bf119afa2ef48155a909e7afceea4a9f2122c164f" -"checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -"checksum redox_syscall 0.1.54 (registry+https://github.com/rust-lang/crates.io-index)" = "12229c14a0f65c4f1cb046a3b52047cdd9da1f4b30f8a39c5063c8bae515e252" -"checksum redox_termios 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7e891cfe48e9100a70a3b6eb652fef28920c117d366339687bd5576160db0f76" -"checksum regex 1.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "8f0a0bcab2fd7d1d7c54fa9eae6f43eddeb9ce2e7352f8518a814a4f65d60c58" -"checksum regex-syntax 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "dcfd8681eebe297b81d98498869d4aae052137651ad7b96822f09ceb690d0a96" -"checksum ryu 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)" = "b96a9549dc8d48f2c283938303c4b5a77aa29bfbc5b54b084fb1630408899a8f" -"checksum serde 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "a72e9b96fa45ce22a4bc23da3858dfccfd60acd28a25bcd328a98fdd6bea43fd" -"checksum serde_derive 1.0.91 (registry+https://github.com/rust-lang/crates.io-index)" = "101b495b109a3e3ca8c4cbe44cf62391527cdfb6ba15821c5ce80bcd5ea23f9f" -"checksum serde_json 1.0.39 (registry+https://github.com/rust-lang/crates.io-index)" = "5a23aa71d4a4d43fdbfaac00eff68ba8a06a51759a89ac3304323e800c4dd40d" -"checksum syn 0.15.34 (registry+https://github.com/rust-lang/crates.io-index)" = "a1393e4a97a19c01e900df2aec855a29f71cf02c402e2f443b8d2747c25c5dbe" -"checksum termcolor 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "4096add70612622289f2fdcdbd5086dc81c1e2675e6ae58d6c4f62a16c6d7f2f" -"checksum termion 1.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dde0593aeb8d47accea5392b39350015b5eccb12c0d98044d856983d89548dea" -"checksum thread_local 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)" = "c6b53e329000edc2b34dbe8545fd20e55a333362d0a321909685a19bd28c3f1b" -"checksum ucd-util 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "535c204ee4d8434478593480b8f86ab45ec9aae0e83c568ca81abf0fd0e88f86" -"checksum unicode-xid 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" -"checksum utf8-ranges 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)" = "796f7e48bef87609f7ade7e06495a87d5cd06c7866e6a5cbfceffc558a243737" -"checksum uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)" = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -"checksum winapi 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "f10e386af2b13e47c89e7236a7a14a086791a2b88ebad6df9bf42040195cf770" -"checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" -"checksum winapi-util 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "7168bab6e1daee33b4557efd0e95d5ca70a03706d39fa5f3fe7a236f584b03c9" -"checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -"checksum wincolor 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "561ed901ae465d6185fa7864d63fbd5720d0ef718366c9a4dc83cf6170d7e9ba" -"checksum xml-rs 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" +checksum = "541b12c998c5b56aa2b4e6f18f03664eef9a4fd0a246a55594efae6cc2d964b5" diff --git a/Cargo.toml b/Cargo.toml index 0721b47..599ebb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rbxlx-to-rojo" -version = "0.1.0" +version = "1.0.0" authors = ["Kampfkarren"] edition = "2018" @@ -15,11 +15,12 @@ required-features = ["cli"] [dependencies] env_logger = "0.6" -lazy_static = "1.3" +lazy_static = "1.4" log = "0.4" -rbx_dom_weak = "1.8" +rbx_binary = { git = "https://github.com/rojo-rbx/rbx-dom/", branch = "master" } +rbx_dom_weak = { git = "https://github.com/rojo-rbx/rbx-dom/", branch = "master" } rbx_reflection = "3" # TODO: This won't always be latest, and that's an issue -rbx_xml = "0.10" +rbx_xml = { git = "https://github.com/rojo-rbx/rbx-dom/", branch = "master" } serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/README.md b/README.md index 403257c..3051f5d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -# rbxlx-to-rojo -Tool to convert existing Roblox games into Rojo projects by reading their `rbxlx` place files. +# rbxlx-to-rojo (now supports .rbxl!) +Tool to convert existing Roblox games into Rojo projects by reading their `rbxl` or `rbxlx` place files. # Using rbxlx-to-rojo ## Setup @@ -12,18 +12,14 @@ If there aren't any scripts in the rbxlx file, rbxlx-to-rojo will return an erro Download the latest release of rbxlx-to-rojo here: https://github.com/rojo-rbx/rbxlx-to-rojo/releases ## Porting the game -Before you can port your game into Rojo projects, you need a .rbxlx file. If you have an existing game that isn't a .rbxlx file: +Before you can port your game into Rojo projects, you need a place/model file. If you have an existing game that isn't exported: - Go to studio, click on any place, and then click on File -> Save to file as. -- Click on the drop-down menu where it says "Roblox Place Files (.rbxl)". - -- Click on the "Roblox XML Place Files (.rbxlx)", and then click "Save". - - Create a folder and name it whatever you want. ### Steps to port the game: 1. Double-click on rbxlx-to-rojo on wherever you installed it. -2. Select the .rbxlx file you saved earlier. +2. Select the .rbxl file you saved earlier. 3. Now, select the folder that you just created. If you followed the steps correctly, you should see something that looks like this: diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 535bb75..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,64 +0,0 @@ -cache: - - c:\cargo\registry - - c:\cargo\git - -init: - - mkdir c:\cargo - - mkdir c:\rustup - - SET PATH=c:\cargo\bin;%PATH% - -clone_folder: c:\projects\rbxlx-to-rojo - -environment: - CARGO_HOME: "c:\\cargo" - RUSTUP_HOME: "c:\\rustup" - CARGO_TARGET_DIR: "c:\\projects\\rbxlx-to-rojo\\target" - global: - PROJECT_NAME: rbxlx-to-rojo - RUST_BACKTRACE: full - matrix: - - TARGET: x86_64-pc-windows-msvc - CHANNEL: stable - BITS: 64 - -matrix: - fast_finish: true - -# Install Rust and Cargo -# (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml) -install: - - curl -sSf -o rustup-init.exe https://win.rustup.rs/ - - rustup-init.exe -y --default-host %TARGET% - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - set PATH=C:\msys64\mingw%BITS%\bin;%PATH% - - rustc -V - - cargo -V - -# Hack to work around a harmless warning in Appveyor builds? -build: false - -# Equivalent to Travis' `script` phase -test_script: - - cargo test --verbose - -before_deploy: - # Generate artifacts for release - - cargo build --release --bin rbxlx-to-rojo --features cli - - appveyor PushArtifact target\release\rbxlx-to-rojo.exe - -deploy: - description: 'Automatically deployed release' - # All the zipped artifacts will be deployed - artifact: /.*\.exe/ - auth_token: - secure: UjSht2BayAT7CT+vcoJRKQUMJwTU9XJIYyWOFRStg4NOAWylm1x3ukut8a4BryWX - provider: GitHub - # deploy when a new tag is pushed and only on the stable channel - on: - CHANNEL: stable - appveyor_repo_tag: true - -branches: - only: - - /^\d+\.\d+\.\d+$/ - - master diff --git a/src/cli.rs b/src/cli.rs index bc86e74..cd9abb2 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -1,29 +1,36 @@ use log::info; use rbxlx_to_rojo::{filesystem::FileSystem, process_instructions}; use std::{ + borrow::Cow, fmt, fs, - io::{self, Write}, + io::{self, BufReader, Write}, path::PathBuf, sync::{Arc, RwLock}, }; #[derive(Debug)] enum Problem { - DecodeError(rbx_xml::DecodeError), + BinaryDecodeError(rbx_binary::DecodeError), + InvalidFile, IoError(&'static str, io::Error), NFDCancel, NFDError(String), + XMLDecodeError(rbx_xml::DecodeError), } impl fmt::Display for Problem { fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result { match self { - Problem::DecodeError(error) => write!( + Problem::BinaryDecodeError(error) => write!( formatter, - "While attempting to decode the place file, at {} rbx_xml didn't know what to do", + "While attempting to decode the place file, at {} rbx_binary didn't know what to do", error, ), + Problem::InvalidFile => { + write!(formatter, "The file provided does not have a recognized file extension") + } + Problem::IoError(doing_what, error) => { write!(formatter, "While attempting to {}, {}", doing_what, error) } @@ -35,6 +42,12 @@ impl fmt::Display for Problem { "Something went wrong when choosing a file: {}", error, ), + + Problem::XMLDecodeError(error) => write!( + formatter, + "While attempting to decode the place file, at {} rbx_xml didn't know what to do", + error, + ), } } } @@ -81,9 +94,9 @@ fn routine() -> Result<(), Problem> { info!("rbxlx-to-rojo {}", env!("CARGO_PKG_VERSION")); info!("Select a place file."); - let rbxlx_path = PathBuf::from(match std::env::args().nth(1) { + let file_path = PathBuf::from(match std::env::args().nth(1) { Some(text) => text, - None => match nfd::open_file_dialog(Some("rbxlx,rbxmx"), None) + None => match nfd::open_file_dialog(Some("rbxl,rbxm,rbxlx,rbxmx"), None) .map_err(|error| Problem::NFDError(error.to_string()))? { nfd::Response::Okay(path) => path, @@ -93,15 +106,29 @@ fn routine() -> Result<(), Problem> { }); info!("Opening place file"); - let rbxlx_source = fs::File::open(&rbxlx_path) - .map_err(|error| Problem::IoError("read the place file", error))?; + let file_source = BufReader::new( + fs::File::open(&file_path) + .map_err(|error| Problem::IoError("read the place file", error))?, + ); info!("Decoding place file, this is the longest part..."); - let tree = rbx_xml::from_reader_default(&rbxlx_source).map_err(Problem::DecodeError)?; + + let tree = match file_path + .extension() + .map(|extension| extension.to_string_lossy()) + { + Some(Cow::Borrowed("rbxmx")) | Some(Cow::Borrowed("rbxlx")) => { + rbx_xml::from_reader_default(file_source).map_err(Problem::XMLDecodeError) + } + Some(Cow::Borrowed("rbxm")) | Some(Cow::Borrowed("rbxl")) => { + rbx_binary::from_reader_default(file_source).map_err(Problem::BinaryDecodeError) + } + _ => Err(Problem::InvalidFile), + }?; info!("Select the path to put your Rojo project in."); let root = PathBuf::from(match std::env::args().nth(2) { Some(text) => text, - None => match nfd::open_pick_folder(Some(&rbxlx_path.parent().unwrap().to_string_lossy())) + None => match nfd::open_pick_folder(Some(&file_path.parent().unwrap().to_string_lossy())) .map_err(|error| Problem::NFDError(error.to_string()))? { nfd::Response::Okay(path) => path, @@ -110,7 +137,7 @@ fn routine() -> Result<(), Problem> { }, }); - let mut filesystem = FileSystem::from_root(root.join(rbxlx_path.file_stem().unwrap()).into()); + let mut filesystem = FileSystem::from_root(root.join(file_path.file_stem().unwrap()).into()); log_file.write().unwrap().replace( fs::File::create(root.join("rbxlx-to-rojo.log")) diff --git a/src/lib.rs b/src/lib.rs index 1d8e273..f9930a1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,8 @@ use log::debug; -use rbx_dom_weak::{RbxId, RbxInstance, RbxTree, RbxValue}; +use rbx_dom_weak::{ + types::{Ref, Variant}, + Instance, WeakDom, +}; use std::{ borrow::Cow, collections::{HashMap, HashSet}, @@ -22,19 +25,19 @@ lazy_static::lazy_static! { struct TreeIterator<'a, I: InstructionReader + ?Sized> { instruction_reader: &'a mut I, path: &'a Path, - tree: &'a RbxTree, + tree: &'a WeakDom, } fn repr_instance<'a>( base: &'a Path, - child: &'a RbxInstance, - has_scripts: &'a HashMap, + child: &'a Instance, + has_scripts: &'a HashMap, ) -> Option<(Vec>, Cow<'a, Path>)> { - if has_scripts.get(&child.get_id()) != Some(&true) { + if has_scripts.get(&child.referent()) != Some(&true) { return None; } - match child.class_name.as_str() { + match child.class.as_str() { "Folder" => { let folder_path = base.join(&child.name); let owned: Cow<'a, Path> = Cow::Owned(folder_path); @@ -61,7 +64,7 @@ fn repr_instance<'a>( } "Script" | "LocalScript" | "ModuleScript" => { - let extension = match child.class_name.as_str() { + let extension = match child.class.as_str() { "Script" => ".server", "LocalScript" => ".client", "ModuleScript" => "", @@ -69,12 +72,12 @@ fn repr_instance<'a>( }; let source = match child.properties.get("Source").expect("no Source") { - RbxValue::String { value } => value, + Variant::String(value) => value, _ => unreachable!(), } .as_bytes(); - if child.get_children_ids().is_empty() { + if child.children().is_empty() { Some(( vec![Instruction::CreateFile { filename: Cow::Owned(base.join(format!("{}{}.lua", child.name, extension))), @@ -95,12 +98,12 @@ fn repr_instance<'a>( ); let script_children_count = child - .get_children_ids() + .children() .iter() .filter(|id| has_scripts.get(id) == Some(&true)) .count(); - let total_children_count = child.get_children_ids().len(); + let total_children_count = child.children().len(); let folder_path: Cow<'a, Path> = Cow::Owned(base.join(&child.name)); // If there's no script children, make a named meta file @@ -165,13 +168,6 @@ fn repr_instance<'a>( other_class => { // When all else fails, we can make a meta folder if there's scripts in it - - // let mut tree = RbxTree::new(RbxInstanceProperties { - // name: "VirtualInstance".to_string(), - // class_name: "DataModel".to_string(), - // properties: HashMap::new(), - // }); - match rbx_reflection::get_class_descriptor(other_class) { Some(reflected) => { let treat_as_service = RESPECTED_SERVICES.contains(other_class); @@ -182,7 +178,7 @@ fn repr_instance<'a>( if treat_as_service { // Don't represent empty services - if child.get_children_ids().is_empty() { + if child.children().is_empty() { return None; } @@ -194,7 +190,7 @@ fn repr_instance<'a>( .push(Instruction::add_to_tree(&child, new_base.to_path_buf())); } - if !child.get_children_ids().is_empty() { + if !child.children().is_empty() { instructions.push(Instruction::CreateFolder { folder: new_base.clone(), }); @@ -212,7 +208,7 @@ fn repr_instance<'a>( // If there are scripts, we'll need to make a .meta.json folder let folder_path: Cow<'a, Path> = Cow::Owned(base.join(&child.name)); let meta = MetaFile { - class_name: Some(child.class_name.clone()), + class_name: Some(child.class.clone()), // properties: properties.into_iter().collect(), ignore_unknown_instances: true, }; @@ -234,38 +230,16 @@ fn repr_instance<'a>( ], folder_path, )) - - // let properties = RbxInstanceProperties { - // name: child.name.clone(), - // class_name: other_class.to_string(), - // properties, - // }; - - // let root_id = tree.get_root_id(); - // let id = tree.insert_instance(properties, root_id); - - // let mut buffer = Vec::new(); - // rbx_xml::to_writer_default(&mut buffer, &tree, &[id]).map_err(Error::XmlEncodeError)?; - // Ok(( - // vec![Instruction::CreateFile { - // filename: Cow::Owned(base.join(&format!("{}.rbxmx", child.name))), - // contents: Cow::Owned(buffer), - // }], - // Cow::Borrowed(base), - // )) } } } impl<'a, I: InstructionReader + ?Sized> TreeIterator<'a, I> { - fn visit_instructions(&mut self, instance: &RbxInstance, has_scripts: &HashMap) { - for child_id in instance.get_children_ids() { - let child = self - .tree - .get_instance(*child_id) - .expect("got fake child id?"); - - let (instructions_to_create_base, path) = if child.class_name == "StarterPlayer" { + fn visit_instructions(&mut self, instance: &Instance, has_scripts: &HashMap) { + for child_id in instance.children() { + let child = self.tree.get_by_ref(*child_id).expect("got fake child id?"); + + let (instructions_to_create_base, path) = if child.class == "StarterPlayer" { // We can't respect StarterPlayer as a service, because then Rojo // tries to delete StarterPlayerScripts and whatnot, which is not valid. let folder_path: Cow<'a, Path> = Cow::Owned(self.path.join(&child.name)); @@ -279,13 +253,13 @@ impl<'a, I: InstructionReader + ?Sized> TreeIterator<'a, I> { instructions.push(Instruction::AddToTree { name: child.name.clone(), partition: TreePartition { - class_name: child.class_name.clone(), + class_name: child.class.clone(), children: child - .get_children_ids() + .children() .iter() .filter(|id| has_scripts.get(id) == Some(&true)) .map(|child_id| { - let child = self.tree.get_instance(*child_id).unwrap(); + let child = self.tree.get_by_ref(*child_id).unwrap(); ( child.name.clone(), Instruction::partition( @@ -325,34 +299,34 @@ impl<'a, I: InstructionReader + ?Sized> TreeIterator<'a, I> { } fn check_has_scripts( - tree: &RbxTree, - instance: &RbxInstance, - has_scripts: &mut HashMap, + tree: &WeakDom, + instance: &Instance, + has_scripts: &mut HashMap, ) -> bool { let mut children_have_scripts = false; - for child_id in instance.get_children_ids() { + for child_id in instance.children() { let result = check_has_scripts( tree, - tree.get_instance(*child_id).expect("fake child id?"), + tree.get_by_ref(*child_id).expect("fake child id?"), has_scripts, ); children_have_scripts = children_have_scripts || result; } - let result = match instance.class_name.as_str() { + let result = match instance.class.as_str() { "Script" | "LocalScript" | "ModuleScript" => true, _ => children_have_scripts, }; - has_scripts.insert(instance.get_id(), result); + has_scripts.insert(instance.referent(), result); result } -pub fn process_instructions(tree: &RbxTree, instruction_reader: &mut dyn InstructionReader) { - let root = tree.get_root_id(); - let root_instance = tree.get_instance(root).expect("fake root id?"); +pub fn process_instructions(tree: &WeakDom, instruction_reader: &mut dyn InstructionReader) { + let root = tree.root_ref(); + let root_instance = tree.get_by_ref(root).expect("fake root id?"); let path = PathBuf::new(); let mut has_scripts = HashMap::new(); diff --git a/src/structures.rs b/src/structures.rs index 7bd68aa..fa4053b 100644 --- a/src/structures.rs +++ b/src/structures.rs @@ -1,4 +1,4 @@ -use rbx_dom_weak::RbxInstance; +use rbx_dom_weak::Instance; use serde::{Deserialize, Serialize, Serializer}; use std::{ borrow::Cow, @@ -73,16 +73,16 @@ pub enum Instruction<'a> { } impl<'a> Instruction<'a> { - pub fn add_to_tree(instance: &RbxInstance, path: PathBuf) -> Self { + pub fn add_to_tree(instance: &Instance, path: PathBuf) -> Self { Instruction::AddToTree { name: instance.name.clone(), partition: Instruction::partition(&instance, path), } } - pub fn partition(instance: &RbxInstance, path: PathBuf) -> TreePartition { + pub fn partition(instance: &Instance, path: PathBuf) -> TreePartition { TreePartition { - class_name: instance.class_name.clone(), + class_name: instance.class.clone(), children: BTreeMap::new(), ignore_unknown_instances: true, path: Some(path), diff --git a/src/tests.rs b/src/tests.rs index 9a35ea8..7c48034 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -1,14 +1,19 @@ use crate::{filesystem::FileSystem, process_instructions, structures::*}; use log::info; use pretty_assertions::assert_eq; -use rbx_dom_weak::RbxInstanceProperties; +use rbx_dom_weak::types::Variant; use serde::{Deserialize, Serialize}; -use std::{collections::BTreeMap, fs, io::ErrorKind, time::Instant}; +use std::{ + collections::{BTreeMap, HashMap}, + fs, + io::ErrorKind, + time::Instant, +}; #[derive(Deserialize, Serialize, Debug, PartialEq)] enum VirtualFileContents { Bytes(String), - Instance(RbxInstanceProperties), + Instance(HashMap), Vfs(VirtualFileSystem), } @@ -76,12 +81,9 @@ impl InstructionReader for VirtualFileSystem { contents: if rbxmx { let tree = rbx_xml::from_str_default(&contents_string) .expect("couldn't decode encoded xml"); - let child_id = tree - .get_instance(tree.get_root_id()) - .unwrap() - .get_children_ids()[0]; - let child_instance = tree.get_instance(child_id).unwrap().clone(); - VirtualFileContents::Instance((*child_instance).clone()) + let child_id = tree.root().children()[0]; + let child_instance = tree.get_by_ref(child_id).unwrap().clone(); + VirtualFileContents::Instance(child_instance.properties.to_owned()) } else { VirtualFileContents::Bytes(contents_string) },