WebGHC / wasm-cross

Nix expressions for cross compiling to WebAssembly
141 stars 5 forks source link

more notes to easy up the first steps #27

Closed gspia closed 4 years ago

gspia commented 5 years ago

Hi

I collected some of the commands that help starting trials based on irc-discussion. Maybe there is no point in adding too much instructions, if things are in early, possibly changing, state? Anyhow, if doable in couple of lines at the notes section, at least some people could try these tools.

nix run -f release.nix wasm.ghc will put you in a shell with the wasm GHC. This makes it easy to try something small. (*)

nix build -f release.nix examples.wasm.othello builds one example. After that, 'cd results' and start the web-server (e.g. hserv or warp). Remember to try with chromium or chrome.

nix build -f release.nix examples.wasm builds all examples. There will be many results-directories.

(*) what is the recommend way to try to something larger? E.g. somethings that needs several libs including reflex and reflex-dom. And thus something that needs cabal files etc.

Is the following the easiest way?

Ok, I can easily try if those work, and I assume that they won't. This is something I think also other people would benefit (that is, if there is shown enough steps to follow to get things going on).

dfordivam commented 4 years ago

@gspia This has finally been fixed. Please take a look at the usage instructions and let me know if more is needed.