hoppetosse: I reread the gist, the only big thing I've left out is what I thought it was... you have to 1) build llvm from http://prereleases.llvm.org/6.0.0/ adding the DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=WebAssembly to CMake
then build zig where -DCMAKE_PREFIX_PATH is set to the install directory of that llvm
off of the llvm6 branch
and from there I think the gist is accurate
so many hoops to jump through but it works
looks like this: