Skip to content
This repository has been archived by the owner on May 11, 2020. It is now read-only.

How to run? #87

Open
bobomurod opened this issue Aug 26, 2018 · 3 comments
Open

How to run? #87

bobomurod opened this issue Aug 26, 2018 · 3 comments
Assignees

Comments

@bobomurod
Copy link

Hello, i need small instruction to run Wagon. Thank you!

@SamuelMarks
Copy link

No idea. My attempt:

$ cd "$GOPATH"
$ fname="$GOPATH/go.wasm" bin="${fname%.*}"; printf 'package main\nimport "fmt"\nfunc main() { fmt.Println("Hello, 世界") }\n' > "$fname"; GOOS=js GOARCH=wasm go build -o "$bin" -i "$fname"; wasm-run "$fname"
can't load package: package /go/go.wasm: import "/go/go.wasm": cannot import absolute path
wasm-run: could not read module: wasm: Invalid magic number

@sbinet sbinet self-assigned this Sep 27, 2018
@sbinet
Copy link
Contributor

sbinet commented Sep 27, 2018

apologies for the belated answer.
it's the usual time of year when I am a bit swamped with lectures.

I'll try to write a little example for wasm-run. in the meantime, there's this test:

which should give a rough idea of how it's supposed to work.
(wagon can not yet support the whole set of things that GOOS=js supports through syscall/js, unfortunately...)

@SamuelMarks
Copy link

Yeah, well I think the main thing that people want to see when they land on your page, is an interactive Go REPL.

If wagon isn't it, a link to one that is would be handy.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants