dtolnay/watt
View on GitHub ↗ ★ 1,532 Rust
Runtime for executing procedural macros as WebAssembly
17 mentions on Hacker News by 17 people: 2 stories, 15 comments · first 2019-10-14 · latest 2026-08-22
20082026
-
No good reason? Here's a list: https://github.com/dtolnay/watt#remaining-work (It mostly boils down to "somebody needs to do it". I'd really like proc macros precompiled to wasm by crates.io…)
comment by krautsauer · 2026-08-22 · in Malicious Rust crate Arrayref runs a build-time payload -
There’s already a runtime for sandboxing macros with wasm: https://github.com/dtolnay/watt
comment by cmrx64 · 2025-03-22 · in Crabtime: Zig’s Comptime in Rust -
…just not the default and they still have to be compiled once. I'm hopeful something like watt ( https://github.com/dtolnay/watt ) will land in Cargo that'll allow us to ship pre-compiled wasm blobs for proc-macros so we can just have…
comment by vlakreeh · 2023-11-10 · in Rust – Faster compilation with the parallel front-end in nightly -
…binary is not a sandboxed WASM binary. Despite the name "watt" it has nothing to do with https://github.com/dtolnay/watt . `watt::bytecode` refers to the serialization protocol used by the proc macro shim and the precompiled binary to…
comment by Arnavion · 2023-08-19 · in Rust devs push back as Serde project ships precompiled binaries -
This looks like a better link: https://github.com/dtolnay/watt This would be a lot more compelling if it were integrated into rustc and cargo.
comment by amluto · 2023-08-19 · in Rust devs push back as Serde project ships precompiled binaries -
There is a POC. https://github.com/dtolnay/watt
comment by the_mitsuhiko · 2023-03-18 · in Arbitrary code execution during compilation – rust -
The brightest minds in the Rust community are investigating! https://github.com/dtolnay/watt
comment by __jem · 2023-01-06 · in A practical comparison of build and test speed between C++ and Rust -
…LLVM to have no bugs exploitable by feeding it bad code, but at least it would raise the bar. [1] https://github.com/dtolnay/watt Edit: And someone on reddit brought up vscode's dev containers [2], to move everything into docker. Obviously…
comment by gpm · 2021-11-18 · in Backdooring Rust crates for fun and profit -
…but they're kinda tough to use together, and have obvious perf/debuggability/etc costs. e.g.: https://github.com/dtolnay/watt [1] unfortunate in many ways, but largely reasonable IMO (simpler abstractions of things we don't want to think…
comment by Groxx · 2021-11-05 · in RFC: Make NPM install scripts opt-in -
…help CI since the result would get cached locally The last idea I'm aware of in this area is watt ( https://github.com/dtolnay/watt ). If the design and implementation was finished to allow proc-macros (and maybe `build.rs` scripts) to…
comment by epage · 2021-11-01 · in GCC Rust Monthly Report – October 2021 -
…macros. Saves a bunch of compilation time by skipping the need to compile the macros up front. https://github.com/dtolnay/watt
comment by DarmokJalad1701 · 2021-08-09 · in Why WebAssembly is innovative even outside the browser -
…proposal and prototype for compiling proc macros to WASM so they can be run in a sandbox: https://github.com/dtolnay/watt But in the end it doesn't make that much difference: nothing prevents a random library from just reading your secrets…
comment by the_duke · 2021-05-14 · in Using Rust Macros to exfiltrate secrets -
…side effects. The W in "WASM" doesn't have to limit possible applications to just the web browser. https://github.com/dtolnay/watt
comment by dmit · 2020-03-26 · in Firefox's low-latency WebAssembly compiler -
…Cranelift[0], but these endeavours, while very promising, I wouldn't call production-ready yet. [0] https://github.com/dtolnay/watt [1] https://github.com/bytecodealliance/cranelift EDIT: Also, debugging. I'm not sure of the current state…
comment by NanoCoaster · 2020-01-22 · in Go's Tooling Is an Undervalued Technology -
…thing would be opt-in. It also provides no benefit for crates that don't use procedural macros. See https://github.com/dtolnay/watt for more details. The other possible avenue is MIR-only rlibs. When you compile a dependency, you get…
comment by GrayShade · 2019-12-11 · in Speeding Up the Rust Compiler