You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
forest 9d551e8a9a test println 2 months ago
.vscode first commit 2 months ago
.gitignore first commit 2 months ago
ReadMe.md first commit 2 months ago
global.d.ts first commit 2 months ago
package-lock.json first commit 2 months ago
package.json blah 2 months ago
tinygo_shim.go test println 2 months ago
tinygo_shim.js panic: ValueOf: invalid value 2 months ago
tinygo_shim.ts first commit 2 months ago
tsconfig.json panic: ValueOf: invalid value 2 months ago
wasm_exec.js first commit 2 months ago

ReadMe.md

The Plan

  1. The developer will write code in golang that they want to expose to the web browser
  2. The developer will import the tinygo_shim go module and inside main() they will call some sort of tinygo_shim.register(...) function
  3. the developer will compile the main module to a WASM binary file my_module.wasm
  4. The application will import tinygo_shim.ts and then call InstantiateWASMModule('my_module.wasm')
  5. InstantiateWASMModule will use go.importObject to attach a javascript function to TODO BLAH
  6. func main() in the go code (my_module.wasm) will be run when the module is instantiated, calling tinygo_shim.register which will return some configuration info that will be passed to TODO BLAH
  7. TODO BLAH will generate the instance of ShimmedWASMModule based on the configuration
  8. instance of ShimmedWASMModule will be returned to the application