🖼️Combines a Javascript and WASM file into a single executable polygot PNG+HTML file.

Overview

WASIMAGE

Combines a Javascript and WASM file into a single executable polygot PNG+HTML file.

Usage:

  • cargo install wasimage
  • wasimage --wasm-file my.wasm --js-file my.js
  • This will generate index.png.html which will automatically unpack and execute, loading itself as a PNG and extracting the data from there

NOTE: By default file access is blocked in Chrome, so you can't test this locally unless you spin up an HTTP server. Start Chrome with the --allow-file-access-from-file to remove this restriction.

The Javascript will receive the WASM as a regular array in arguments[0]. See the examples folder for an example.

You can also pass --max-width to restrict the width of the generated PNG.

Inspiration and parts of the loader code come from pnginator by Gasman et al.

You might also like...
😱 Dead fast thumbnail library for browser and NodeJs! Built with Rust 🦀 and WebAssembly 🕸

thumbo-core 😱 Dead fast thumbnail library for browser and NodeJs Built with Rust 🦀 & WebAssembly 🕸 📖 About thumbo-core is a thubnail library for b

Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!
Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Takes a folder of images (as a palette), and an image, and figures out how to tile the palette to resemble the image!

Encoding and decoding images in Rust
Encoding and decoding images in Rust

Image Maintainers: @HeroicKatora, @fintelia How to contribute An Image Processing Library This crate provides basic image processing functions and met

Convert and save photomode screenshots from Red Dead Redemption 2 to JPEG format.
Convert and save photomode screenshots from Red Dead Redemption 2 to JPEG format.

RDR2 Screenshot converter Convert and save photomode screenshots from Red Dead Redemption 2 to JPEG format. QuickStart Just download the executable fi

Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings
Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings

Vulkano Rainbow Triangle Classical Rainbow Triangle using Rust and Vulkan via vulkano bindings. Based on the vulkano triangle example Quick Start $ ca

Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes
Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes

What is Lust? Lust is a static image server designed to automatically convert uploaded image to several formats and preset sizes with scaling in mind.

A linear algebra and mathematics library for computer graphics.

cgmath-rs A linear algebra and mathematics library for computer graphics. The library provides: vectors: Vector2, Vector3, Vector4 square matrices: Ma

Signed distance field font and image command line tool based on OpenCL.

SDFTool Signed distance field font and image command line tool based on OpenCL. Build Windows Run cargo build --release in Visual Studio developer x64

A programming language where comments are the first-class citizen and ASCII art flowcharts are the controls!
A programming language where comments are the first-class citizen and ASCII art flowcharts are the controls!

regretti 🍝 A programming language where comments are the first-class citizen and ASCII art flowcharts are the controls! Made for Lang Jam (jam0001) t

Owner
Nervive
Experimental Space
Nervive
Add image watermark for multiple file (jpeg, jpg, png, tiff, bmp,etc)

Rust image watermark Add image watermark CLI program for multiple image format (jpeg, jpg, png, tiff, bmp, etc.) manipulation, browser WASM build supp

Johnathan 5 Jan 20, 2023
PNG decoding and encoding library in pure Rust

PNG Decoder/Encoder PNG decoder/encoder in pure Rust. It contains all features required to handle the entirety of the PngSuite by Willem van Schack. p

image-rs 247 Dec 25, 2022
Refract - A guided AVIF/JPEG XL/WebP conversion utility for JPEG and PNG sources.

Refract GTK Refract is a guided image conversion tool written in Rust for x86-64 Linux systems with GTK. It takes JPEG and PNG image sources and produ

Blobfolio 34 Nov 28, 2022
Oxipng - a multithreaded lossless PNG compression optimizer

Oxipng Overview Oxipng is a multithreaded lossless PNG compression optimizer. It can be used via a command-line interface or as a library in other Rus

Josh Holmer 1.8k Dec 28, 2022
Converts images into textual line art.

img2utf Transform images to textual line art! Images require pre-processing to come out nice. It's expected that users will do the following: Apply ga

Lee 149 Dec 10, 2022
Convert your ascii diagram scribbles into happy little SVG

Svgbob Svgbob can create a nice graphical representation of your text diagrams. Svgbob provides a cli which takes text as an input and creates an svg

Jovansonlee Cesar 3.4k Dec 25, 2022
A cross-platform tool for embedding GPS data into photographs

nya-exif 中文 | English 介绍 nya-exif 是一个用于匹配照片 GPS 信息, 并写入文件 EXIF 信息的工具, 支持 JPEG 和 PNG 及各大相机厂商的主流RAW格式. 本工具基于 Rust 编写, 支持全平台使用 Features 支持 JPEG 和 PNG 及各大

Lyn Chen 32 Nov 16, 2023
mico (minimalistic config file format) encoder and decoder

mico This library implements a parser and emitter for mico (minimalistic config file format). Format example: Name: mico Description: minimalistic con

null 1 Jan 30, 2022
CLI and utilities for converting media files (images/videos) to ascii outputs (output media file or print to console)

CLI and utilities for converting media files (images/videos) to ascii outputs (output media file or print to console). Supports most standard image formats, and some video formats.

Michael 30 Jan 1, 2023
Camera RAW to DNG file format converter

DNGLab - A camera RAW to DNG file format converter Command line tool to convert camera RAW files to Digital Negative Format (DNG). It is currently in

null 92 Jan 6, 2023