The DWG reader of https://openedfile.com/tools/dwg/ — source code
=================================================================

The page reads DWG files with acadrust 0.6.7 (https://github.com/hakanaktt/acadrust,
Mozilla Public License 2.0), compiled to WebAssembly together with a small wrapper of ours.
acadrust is used unmodified. This archive holds everything the WebAssembly is built from:

  acadrust-0.6.7.crate        acadrust 0.6.7 exactly as crates.io serves it
                              (https://static.crates.io/crates/acadrust/acadrust-0.6.7.crate,
                              sha256 000d512cd910e55577d85ad2d09d743f6a16e033f1c57d7dfeda747ff013a2b3; the same release is the tag v0.6.7,
                              commit 1edc6c88645eaf850922e4a18d00115d60b27255, of the repository above).
                              It is a gzip-compressed tar file: tar -xzf acadrust-0.6.7.crate
  scripts/dwg/                our wrapper crate: Cargo.toml, Cargo.lock (every crate's version and
                              sha256), rust-toolchain.toml (Rust 1.99.1) and src/lib.rs
  scripts/build-dwg.sh        the build script

To rebuild (macOS; the script refuses other systems, see its head):

  1. Install rustup, then the toolchain of scripts/dwg/rust-toolchain.toml with the target
     wasm32-unknown-unknown, and wasm-bindgen-cli 0.2.129 (cargo install wasm-bindgen-cli
     --version 0.2.129 --locked).
  2. Put scripts/ in a folder of its own and run  bash scripts/build-dwg.sh
     Cargo fetches acadrust 0.6.7 and the other crates listed in Cargo.lock from crates.io and
     checks their sha256. The acadrust it fetches is the crate file in this archive (the same
     sha256); the copy here keeps the source available whatever happens to crates.io.
  3. The output is src/vendor/acadrust/acadrust_wasm_bg.wasm and acadrust_wasm.js. Built twice
     on the same Mac, it came out the same to the byte; the sha256 of the files the site serves
     is in the site's src/vendor/acadrust/SOURCE.md.

The license texts of acadrust (MPL 2.0), of ACadSharp (MIT; acadrust's DWG code is ported from
it) and of every other crate compiled in are at https://openedfile.com/licenses/dwg.txt
