Simon Danisch / Dec 19 2018
Webassembly Base
Webassembly Base
#Add some dependencies we need: apt-get update apt-get install git python -y # Julia dependencies # https://github.com/JuliaLang/julia/#required-build-tools-and-external-libraries apt-get install build-essential libatomic1 python gfortran perl wget m4 cmake pkg-config # Install Webassembly SDK git clone https://github.com/juj/emsdk.git cd emsdk ./emsdk install latest ./emsdk activate latest # Compile Julia on master cd .. git clone https://github.com/JuliaLang/julia.git cd julia # Checkout Keno's wasm branch # make -j8 # Make a backup of the flisp files #p src/julia_flisp.boot src/julia_flisp.boot.bak #p src/julia_flisp.boot.inc src/julia_flisp.boot.ink.bak
source .//emsdk/emsdk_env.sh cd julia git checkout kf/wasm echo "override CC=emcc override CXX=emcc JULIACODEGEN=none CFLAGS=-s WASM=1 override OS=wasm override JULIA_THREADS=0 override USE_SYSTEM_BLAS=1 override USE_SYSTEM_LAPACK=1 override USE_SYSTEM_LIBM=1 override USE_SYSTEM_DSFMT=1 override DISABLE_LIBUNWIND=1" >> Make.user touch src/julia_flisp.boot touch src/julia_flisp.boot.inc make -C deps/ clean-utf8proc make -C deps/ install-utf8proc make -C src emcc -Isrc/support -Lusr/lib -ljulia ui/repl-wasm.c --preload-file base/boot.jl --no-heap-copy -g4 -s -s WASM=1 -s ASSERTIONS=1 -s ALLOW_MEMORY_GROWTH=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -o hello.html
install http server master branch to run a server
julia -e 'using Pkg; pkg"add HTTP#master"'