Comments (2)
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.
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 You have to enable postInstall
hook. Haven't tried yet).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)
- `[lib]` is not copied over in `Cargo.toml` HOT 2
- Using workspaces with small closures HOT 3
- Simple example for working with workspace with multiple binaries HOT 4
- Naersk handles multi-toolchain builds incorrectly HOT 2
- crate that is necessary fo building is removed from the `crates` directory when trying to build `nu-shell` HOT 6
- error: ... does not provide attribute 'packages.aarch64-darwin.default' or 'defaultPackage.aarch64-darwin' HOT 2
- `overrideAttrs` and `buildInputs` doesn't include override inputs in environment HOT 4
- Updating git repository during build throws "failed to resolve address" error HOT 5
- New discovery algorithm doesn't handle symlinks HOT 1
- Naersk has linking failures when building natively on aarch64-linux HOT 2
- Explain what `naersk` is
- How to cargo publish? HOT 2
- two step builds fail if CMake is used in a `build.rs` HOT 5
- Building crate that has a git submodule that is a crate that one depends on as a path dependency seems to fail? HOT 4
- no matching package named `sea-orm` HOT 4
- Cargo/rustc linker serach path when in developer shell HOT 7
- how do i build examples like cargo build --example example_name HOT 3
- Passing options to clippy HOT 2
- Monorepo with multiple crates that can not share a workspace is not possible to build? HOT 6
- Project's build.rs file not getting executed at all HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from naersk.