trunk-rs/trunk

Support custom build command / other wasm targets

Offen

#830 geöffnet am 25.07.2024

 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (315 Forks)auto 404
enhancementhelp wanted

Repository-Metriken

Stars
 (4.347 Sterne)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Problem

Trunk is currently hard coded to build for wasm32-unknown-unknown, making it hard to work with other wasm targets (wasm64, wasi targets)

Solution

A simple way to unblock other wasm targets is to provide an option to disable the default wasm32 build. I think a default_build = true entry in Trunk.toml would suffice. If the option is explicitly set to false, we just don't add the default wasm32 build here https://github.com/trunk-rs/trunk/blob/d61478448bd093449708b63dcb3e7baf286a191c/src/pipelines/html.rs#L150

See this discussion for more context.

If this is the right approach I can work on a PR.

Contributor Guide