An open API service indexing awesome lists of open source software.

https://github.com/c6-dev/webdyff

A thin wrapper for dyff that builds a WebAssembly binary.
https://github.com/c6-dev/webdyff

dyff golang wasm yaml

Last synced: 3 months ago
JSON representation

A thin wrapper for dyff that builds a WebAssembly binary.

Awesome Lists containing this project

README

          

# webdyff

A thin wrapper for [dyff](https://github.com/homeport/dyff) that builds a WebAssembly binary and provides a static webpage to run the diff with basic syntax highlighting, available [here](https://c6-dev.github.io/webdyff/).

## Build

GOOS=js GOARCH=wasm go build -trimpath -ldflags="-s -w" -o web/app.wasm ./cmd/wasm
cp "$(go env GOROOT)/lib/wasm/wasm_exec.js" web/wasm_exec.js
The /web directory will contain all the necessary files to deploy to any static site hosting.

The binary can be further optimized with [wasm-opt](https://github.com/WebAssembly/binaryen), if desired:

wasm-opt -Oz web/app.wasm -o web/app.wasm --all-features