Git Product home page Git Product logo

Comments (2)

ldesgoui avatar ldesgoui commented on May 18, 2024

Slowly making my way in this repo: https://github.com/ldesgoui/tf2.link
My goal is to produce terraform configurations able to deploy Cloudflare Worker scripts with wasm attachments
I've analyzed wrangler (the Cloudflare tool to deploy Worker scripts), which shell out to wasm-pack, which shells out to the version of wasm-bindgen that matches the one in your Cargo.toml. Instead of going through all these impure hoops, I lock the version of wasm-bindgen (with wasm-bindgen = "= 0.2.67") and packaged the cli at that exact version.
I also plan on having multiple wasm binaries and decided that I might as well compile and process them together (they're packaged together anyways, they will share lots of dependencies so compilation times should be shorter) but that probably will hurt incremental compilation

from naersk.

malte-v avatar malte-v commented on May 18, 2024

I think that since Cargo is doing all the heavy lifting for us, we basically already have WASM support. You just need to set CARGO_BUILD_TARGET to wasm32-unknown-unknown and maybe use lld as the linker. What doesn't work currently is copying the generated .wasm file to the derivation output path (I think you can work around that using a hacky postInstall hook. Haven't tried yet). You have to enable copyLibs.

I'm not sure if calling wasm-bindgen is in scope of this project, since you can easily do it yourself once you have the WASM module.

from naersk.

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.