Hacker GitHub

← All repos

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

Mentions per year 17 mentions · busiest year 2021 (5)
20082026
  1. 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…)
  2. 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
  3. …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…
  4. …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…
  5. 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.
  6. There is a POC. https://github.com/dtolnay/watt
  7. The brightest minds in the Rust community are investigating! https://github.com/dtolnay/watt
  8. ▲ 1
    watt: Runtime for executing (Rust) procedural macros as WebAssembly
    story by notamy · 2022-05-27 · 0 comments
  9. …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…
  10. …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
  11. …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…
  12. …macros. Saves a bunch of compilation time by skipping the need to compile the macros up front. https://github.com/dtolnay/watt
  13. …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
  14. …side effects. The W in "WASM" doesn't have to limit possible applications to just the web browser. https://github.com/dtolnay/watt
  15. …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
  16. …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
  17. ▲ 165
    Watt: A runtime for executing Rust procedural macros compiled as WebAssembly
    story by mmastrac · 2019-10-14 · 18 comments