Giter Site home page Giter Site logo

Comments (6)

hellerve avatar hellerve commented on July 18, 2024 6

Having played around a bit with compiling Carp to Webassembly today, I can say that we are able to compile it just fine. We’ll have to change the emitter some to be able to achieve JS interoperability (which requires some assistance to emscripten through annotations), but that should be fairly simple to do. I’ll keep y’all posted.

from carp.

hellerve avatar hellerve commented on July 18, 2024 4

A quick note here: I haven’t worked on this since my initial explorations, so don’t expect me to come up with anything quickly. What I can say is that emcc works perfectly as a C compiler for our emitted code.

As I said earlier, it’s missing the annotations, though, and I need to read up on that and then find a good way to optionally make the emitter spit those out, too. I’m not sure how to do that gracefully yet.

I do not see any major roadblocks coming up, though, which is either very good or very bad!

from carp.

bjorn3 avatar bjorn3 commented on July 18, 2024 3

+1 for WebAssembly

from carp.

eriksvedang avatar eriksvedang commented on July 18, 2024

These are all neat ideas. Unikernels seem really cool but it's not my expertise, so someone else will have to play around with that. The language should be a good fit for it though! If you want to experiment with Carp+WASM I can assist in the Gitter channel. Writing another emitter shouldn't be too hard, the current one is fairly small and straight forward (Emit.hs). Or you could use the emitted C code and pipe it into the web assembly compiler. Regarding dependent types I have some ideas for adding a little bit of support for it (think sized arrays), but the design of Carp is meant to be simple, so it definitely won't be another Idris / Agda.

from carp.

cwervo avatar cwervo commented on July 18, 2024

I initially came the Carp issues section to suggest WebAssembly support, really excited to see @hellerve's commetn, can't wait to see what comes of it!!

from carp.

hellerve avatar hellerve commented on July 18, 2024

Another note on WASM: @JAremko has been so kind to provide us with an Emscripten-ready Dockerfile that you can look at on Github or Dockerhub.

from carp.

Related Issues (20)

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.