Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
CodSpeed Performance ReportMerging #9134 will not alter performanceComparing 🎉 Hooray!
|
If Rust API is good enough, maybe we don't need to ship the js binding parts to browser, I'm not sure whether we need a light weight implementation or a full implementation, @h-a-n-a @chenjiahan what do you think? |
seems unnecessary cause the ntaivefs is used for native OS, we can just ship a browser_fs for browser side which even don't need std::fs |
This is necessary because:
So I just call |
|
I mean rspack/crates/rspack_fs/src/native_fs.rs Line 19 in 5a6ed31
I'm not sure which way is better |
not sure rspack_futures can be replaced with with tokio_stream and wether tokio_stream can be compatible with wasm
I agree persistent cache maybe not needed for browser at all if it's hard to be compatible |
|
@CPunisher do you plan to finish all tasks in this PR or separated into multi PRs |
I'm not sure whether |
I'm also considering, but I think both are ok. Because this feature consist of many small changes, it's very easy to separate it. But it seems that incomplete changes are useless. For example, incomplete stage 1 is not compilable and incomplete the whole feature is not avaliable for users. So what's your suggestion? |
|
that depends on how long would it take, I suggest when you can successfully compile rspack to wasm target(no need to actually run in browser) we can merge it first and introduce wasm target in CI so we wouldn't introduce wasm incompatible crate in the future. |
It would be great if a full implementation could be provided, which allows us to run Rsbuild on Stackblitz. |
|
Close as the wasm target is avaliable in Rspack 1.4 |
Description
Related: #4550
By following rolldown/rolldown#467, I have made an ugly MVP to run rspack in browser environment.
Since I find that support for wasm is a feature that involves lots of small changes in current codebase, I'd like to list all the known steps in the following tasklist and divide the process into stages:
.wasmfiles bynapi build. In this stage we mostly add#[cfg(not(target_family = "wasm"))]to distinguish platforms.Roadmap
--export-dynamicflag in wasi compilation napi-rs/napi-rs#2523checkVersion#10097module_exportinnapidoesn't support wasm target. refactor: use#[napi(module_exports)]#10437Debugging Hint (Browser)
profile.release.debug = trueinCargo.tomland ensure the wasm file is smaller than 1GB, which is the limitation of the browser