wasm

command module
v0.0.0-...-601d287 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 24, 2023 License: MIT Imports: 21 Imported by: 0

README

WabAssembly plugin

This area contains wasm (WebAssembly) plugin for ECM. This plugin can be used in web browser extensions.

Build procedue

Please use the following instructions:

# build wasm executable
make

# copy exec_wasm.js file
make js

# copy wasm files to extension folder
cp ecm.wasm exec_wasm.js extension

Now, you can load your extension into a browser. The following steps are tested with Chrome based browser(s) (Chrome, Brave, etc.):

  • open Extention menu of your browser
  • click on Load unpacked
  • navigate to your extension folder and load it (the folder name)
  • the new extention will appear in your browser

In order to test wasm code you may user provided server. Please follow these steps:

  • build your ecm.wasm and exec_wasm.js files
  • copy these files to server folder, build and run the server code, e.g.
# copy necessary files to the stand-alone server for testing purposes
cp ecm.wasm wasm_exec.js server

# run go server to use wasm code
cd server
go run server.go

# visit localhost:9090 to see it in action

References

Go in the browser using WebAssembly and Go WebAssembly Wiki and Go WebAssembly handling HTTP requests

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL