Skip to content

c6-dev/webdyff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

webdyff

A thin wrapper for dyff that builds a WebAssembly binary and provides a static webpage to run the diff with basic syntax highlighting, available here.

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, if desired:

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

About

A thin wrapper for dyff that builds a WebAssembly binary.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors