Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 2.03 KB

README.md

File metadata and controls

52 lines (41 loc) · 2.03 KB

Deno Dig

A white sock puppet underground between dinosaurs and skeletons

Deno Dig (/ˈdiːnoʊ ˈdɪɡ/) aka 🦖🍆 is a tool that excavates application code and npm packages from stand-alone Deno binaries.

It can handle all the different iterations of deno compile:

  1. >=1.6.0 <1.7.0: Bundle appended to the Deno binary
  2. >=1.7.0 <1.33.3: Metadata + bundle appended to the Deno binary
  3. >=1.33.3 <1.46: eszip appended to the Deno binary (introduction of npm package support)
  4. >= 1.46: eszip included in an object file section of the Deno binary

I've written an article where I go into more details about the whole process.

Usage

Usage: DenoDig [OPTIONS] --input <INPUT>

Options:
-i, --input <INPUT>
Input file path (required)
-o, --output-directory <OUTPUT_DIRECTORY>
Output directory (optional, defaults to the current working directory)
-h, --help
Print help
-V, --version
Print version

Demo

DenoDigDemo.mp4

WebAssembly version

The web directory contains a sexy webpage for the Wasm build of the deno-dig-lib.

The Wasm blob and JavaScript glue is not included in the repository. In order to build them, you need wasm-pack installed.

Now you can do something like this:

cd deno-dig-lib
wasm-pack build --target web --release --no-typescript --no-pack --out-dir "../web/pkg"
cd ../web
python3 -m http.server

Acknowledgements

  • Deno Land for creating an awesome project and letting me borrow some structs
  • Original Deno logo by Ryan Dahl (according to this)
  • The Googlers for creating the dinosaur sprite used in the web version