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
In development mode, assets are stored twice in Rspack:
Assets being stored in Compilation.asset on the Rust side
Assets being emitted to OutputFileSystem on the Node side in memfs
BoxSource is the backing struct of CompilationAsset. It contains non-continuous memory spreading across internal sources.
This is the same as webpack's implementation. Additionally, assets are emitted to memfs as well.
We can might migrate memfs from Node.js to Rust, of course with some tinkering to let assets only being stored once.
On top of rust memfs, again this is just a basic idea, so it might not be as precise, we can use a data structure using path and BoxSource to store code, skipping another buffer copy.
What does the proposed API of configuration look like?
~
The text was updated successfully, but these errors were encountered:
What problem does this feature solve?
In development mode, assets are stored twice in Rspack:
Compilation.asset
on the Rust sideOutputFileSystem
on the Node side inmemfs
BoxSource
is the backing struct ofCompilationAsset
. It contains non-continuous memory spreading across internal sources.This is the same as webpack's implementation. Additionally, assets are emitted to
memfs
as well.We can might migrate
memfs
from Node.js to Rust, of course with some tinkering to let assets only being stored once.On top of rust
memfs
, again this is just a basic idea, so it might not be as precise, we can use a data structure using path andBoxSource
to store code, skipping another buffer copy.What does the proposed API of configuration look like?
~
The text was updated successfully, but these errors were encountered: