Giter Club home page Giter Club logo

julia-wasm's Introduction

julia-wasm

The following will get you to an installation with emscripten and llvm, assuming a clean debian-like installation

# Install cmake latest
mkdir cmake
pushd cmake
wget https://github.com/Kitware/CMake/releases/download/v3.19.1/cmake-3.19.1-Linux-x86_64.sh
./cmake-3.19.1-Linux-x86_64.sh  # Say no will just create a /bin directory
export PATH=$PATH:`pwd`/bin
popd

Install GCC to compile llvm

sudo apt update
sudo apt install build-essential ninja-build gcc-multilib g++-multilib gfortran git vim python

Keno's boilerplate

git clone https://github.com/Keno/julia-wasm.git
pushd julia-wasm

Latest emsdk

git clone https://github.com/emscripten-core/emsdk.git
pushd emsdk
# Node is not required required but in my WSL emsdk can't find system's node
./emsdk install node-12.18.1-64bit
./emsdk install emscripten-master-64bit
./emsdk install binaryen-tag-1.38.31-64bit
./emsdk activate emscripten-master-64bit binaryen-tag-1.38.31-64bit
# Add binaries to PATH
source emsdk_env.sh
popd

Download LLVM Sources

git clone https://github.com/llvm/llvm-project

Make a dir for the build

mkdir llvm-build
pushd llvm-build

Tell CMake where to find GCC, G++, make and create Ninja files. Rest from Keno

CC=`which gcc` CXX=`which g++` CMAKE_MAKE_PROGRAM=`which make` cmake -G "Ninja" -DLLVM_ENABLE_PROJECTS="clang;lld" -DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm

Actually build llvm - this will run for some time

ninja
popd

julia-wasm's People

Contributors

keno avatar vchuravy avatar fonsp avatar simondanisch avatar viralbshah avatar inkydragon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.