Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Tracking issue for build/bundler changes #70762

Closed
36 of 49 tasks
radical opened this issue Jun 15, 2022 · 7 comments
Closed
36 of 49 tasks

[wasm] Tracking issue for build/bundler changes #70762

radical opened this issue Jun 15, 2022 · 7 comments
Assignees
Labels
arch-wasm WebAssembly architecture area-Build-mono
Milestone

Comments

@radical
Copy link
Member

radical commented Jun 15, 2022

Implementation plan

Deployment scenarios

Deployment shapes

  • Smallest possible loader + emscripten.js X one dotnet.js
  • Inlined config in loader X separate config file
  • Dlls/webcil and other assets X memory snapshot

It will cover various needs

  • NPM/react/etc integration: "we want single file that is webpack friendly"
  • Blazor leaves config loading to runtime, but doesn't loose perf boost from not waiting on dotnet.js download
  • Separate assets beter utilize HTTP cache

Browser vs Wasi

  • The same SDK Microsoft.NET.Sdk.WebAssembly.Pack
    • All the code could probably be ported to existing runtime sdk
  • Trigger by RID browser-wasm x wasi-wasm
    • RID defaults to browser-wasm
  • Shares a common package Microsoft.NET.Sdk.WebAssembly.Pack
    • Differences based on RID, can possibly split the package in the future

Browser SDK responsibilities

StaticWebAssets SDK <- (Runtime) Wasm SDK <- Blazor SDK

  • StaticWebAssets SDK
    • FileFingerPrinting
    • BrotliCompress
    • GzipCompress
  • Wasm SDK
    • BootJson
    • ServiceWorker
    • GetFileHash
    • AppSettings.json
    • BlazorWasm.web.config
    • Bundle transformation + ResourceLoader
  • Blazor SDK
    • BlazorTrimming
    • Blazor specific config bits

From blazor

others

JS startup

@radical radical added arch-wasm WebAssembly architecture area-Build-mono labels Jun 15, 2022
@radical radical added this to the 7.0.0 milestone Jun 15, 2022
@radical radical self-assigned this Jun 15, 2022
@ghost
Copy link

ghost commented Jun 15, 2022

Tagging subscribers to 'arch-wasm': @lewing
See info in area-owners.md if you want to be subscribed.

Issue Details

TODO

  • add compression step like blazor
  • Adopt blazor.boot.json like format, instead of mono-config.json
  • Allow Blazor's build to be able to extend wasm sdk one
  • And same for wasi
  • split it into configurable steps
Author: radical
Assignees: radical
Labels:

arch-wasm, area-Build-mono

Milestone: 7.0.0

@pavelsavara pavelsavara self-assigned this Jun 15, 2022
@pavelsavara
Copy link
Member

pavelsavara commented Jun 15, 2022

I don't understand the WASI requirement. It is closer to mono on windows than to mono on the browser.
There is no JS, no fetch, no downloading stuff, no Emscripten to configure. @lewing

@radical
Copy link
Member Author

radical commented Jun 15, 2022

re:wasi, idea is to be able to support building for that also, with our toolchain.

@lewing
Copy link
Member

lewing commented Jul 25, 2022

The wasi bundler embeds the assemblies, we should enable that option on wasm as well.

@radical
Copy link
Member Author

radical commented Oct 21, 2022

I would suggest adding your name against the item that you are working on.

radical added a commit that referenced this issue Jun 28, 2023
- Update `WasmAppBuilder` to produce the same boot config schema as `GenerateWasmBootJson`
- Update AppBundle layout to match blazor layout. 
    - All the runtime files (js, wasm, icu) are deployed to `_framework` folder.
    - This behavior can be overriden by setting `<WasmRuntimeAssetsLocation>` property. The empty value is overriden to default `_framework`, but `./` can be used to flatten the output structure.
    - WBT test with flat output
    - The only remaining difference is `AppBundle` vs `wwwrooot` folder name.
- `JSHost.ImportAsync` now requires the same relative paths as in blazor (`./module.js` => `../module.js`)

Contributes to #70762
---------

Co-authored-by: Ankit Jain <radical@gmail.com>
@pavelsavara pavelsavara removed their assignment Jul 12, 2023
@radical
Copy link
Member Author

radical commented Aug 11, 2023

The remaining bits are all for milestone 9.0 .

@maraf
Copy link
Member

maraf commented May 28, 2024

Closing this issue as remaining tasks are tracked individual issues

@maraf maraf closed this as completed May 28, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
arch-wasm WebAssembly architecture area-Build-mono
Projects
None yet
Development

No branches or pull requests

4 participants