Module utils

Module utils 

Source
Expand description

Utility functions for commands.

Traits§

StrUtils

Functions§

create_output_dir
Construct our dist directory in the crate.
elapsed
Render a Duration to a form suitable for display on a console
get_crate_path
If an explicit path is given, then use it, otherwise assume the current directory is the crate path.
get_install_cache
Get wasm-pack’s binary cache.
read_and_compress
Reads a file from input_path and returns its contents compressed using DEFLATE as an in-memory vector of bytes (Vec<u8>).