Git Product home page Git Product logo

ocaml-wasm-docker's Introduction

Current steps to get a working manual gc environment:

  • make build-image-fast-manual-gc
  • make run-container-dev-manual-gc
  • make copy-sources-manual-gc
  • docker attach
  • make wasi

TODO: change the text below:

OCaml wasm in a separate docker container

Intended for development on OCaml wasm.

To be able to edit the projects locally, a volume is used which maps to workspace.

First time:

  • make install

Does the following:

  • pulls a docker image from dockerhub
  • copy the sources from the image to the workspace volume via rsync (will most likely take a while)

Editing:

  • open the correct folder inside workspace in your editor, once done choose one of the following build commands

Build OCaml:

  • make build-ocaml

Build OCaml for incremental development:

  • make ocaml

Build LLD:

  • make build-lld

Build WABT:

  • make build-wabt

Build instructions for docker image:

  • make build-image
  • tag the image
  • push to dockerhub
  • update the tag in the make file
  • push changes to github

Using spidermonkey to try out experimental wasm

  • make build-sm to build spidermonkey
  • make run-sm-wabt to run and connect to the container interactively. This will load the bash shell. To log into the spidermonkey shell directly, use make run-sm
  • Once attached to the container (ocaml-wasm-spidermonkey-container) sm-wabt-wrapper is available to you in the path. Use sm-wabt-wrapper output.wasm input.wat to create .wasm files from .wat inside the workspace directory

Note: On Linux 4.19, due to a bug in METACOPY, docker has issues building images, because of which you may encounter Invalid cross-device link or dpkg: error: error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link. Run the following before building the sm image in case you do.

echo N | sudo tee /sys/module/overlay/parameters/metacopy

Issues

If you are using docker-for-mac or docker-for-windows, you'll probably need to increase limit resources available to Docker. You can find these settings at Docker > Preferences > Advanced.

Following setup is working fine. If you need less resources, a quick binary search would help.

  • CPUs: 3
  • Memory: 4.0 GiB
  • Swap: 3.5 giB

ocaml-wasm-docker's People

Contributors

sanderspies avatar manasjayanth avatar persianturtle avatar exced avatar

Stargazers

Tom Ekander avatar  avatar  avatar Van der Auwermeulen Grégoire avatar Siva avatar Syrus Akbary avatar Ulugbek Abdullaev avatar  avatar Zach Ploskey avatar  avatar Rodrigo Oler avatar Sibelius Seraphini avatar Gabriel Rubens Abreu avatar Juan Bono avatar

Watchers

James Cloos avatar  avatar Juan Bono avatar  avatar

Forkers

zploskey exced

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.