You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not exactly sure at what layer this should be in, but webdev seems like an most appropriate place. Happy to hear what other's think! Perhaps it does make sense directly as a dart subcommand, not sure.
I think webdev should have a release mode that generates output with both dart2js (dart compile js) and dart2wasm (dart compile wasm). Then it should generate a JS script which chooses between them based on browser capabilities.
Developers can technically do this themselves, but I imagine it will be common enough that it's worth having some built-in functionality to do so.
Perhaps for a while, this can be a separate mode from the existing --release, but eventually I'd expect this to be the default.
\cc @kevmoo@jakemac53 For general thoughts, including about where this functionality could live.
The text was updated successfully, but these errors were encountered:
This probably has to be a part of the build package explicitly, because usually we don't support compiling the same app with multiple compilers (as a part of a single build). We could though, and I had just yesterday started some informal conversations regarding how we should do the switching too, as a part of dart-lang/build#3621 :).
Functionally I think we'd want something like this:
webdev serve: Do DDC compilation + serve up result
webdev build: Do dart2js & dart2wasm compilation; plus bundle up in some out folder with bootstrapping logic that selects between JS and Wasm in the browser.
That seems pretty reasonable, and I was looking into doing this before, but I need good direction from the dart2js/wasm teams on how to implement the JS/Wasm switching.
I'm not exactly sure at what layer this should be in, but
webdev
seems like an most appropriate place. Happy to hear what other's think! Perhaps it does make sense directly as adart
subcommand, not sure.Building on dart-lang/sdk@0df58fc and eventually dart-lang/build#3621:
I think
webdev
should have a release mode that generates output with bothdart2js
(dart compile js
) anddart2wasm
(dart compile wasm
). Then it should generate a JS script which chooses between them based on browser capabilities.Developers can technically do this themselves, but I imagine it will be common enough that it's worth having some built-in functionality to do so.
Perhaps for a while, this can be a separate mode from the existing
--release
, but eventually I'd expect this to be the default.\cc @kevmoo @jakemac53 For general thoughts, including about where this functionality could live.
The text was updated successfully, but these errors were encountered: