Skip to content

chore: using rspack to bundle#1

Draft
hardfist wants to merge 13 commits into
mainfrom
rspack
Draft

chore: using rspack to bundle#1
hardfist wants to merge 13 commits into
mainfrom
rspack

Conversation

@hardfist

@hardfist hardfist commented Aug 12, 2024

Copy link
Copy Markdown
Owner

deno bundle using rspack poc
run following commands to test

cargo run --  bundle '/Users/bytedance/github/deno/tests/testdata/bundle/npm_import/index.mjs'
node output.js

current blocker for further integration

  • rspack only support mutli_thread of tokio, which conflict with deno
  • rspack use nightly version of rust, which conflict with deno's stable rust
  • the current rspack_core includes lots of features deno don't need, rspack_core can be split into features and supports includes only parts of it by feature
  • the release binary maybe increase (3M+, 103M -> 106M),and since rspack contains lots of builtin plugins now, which will be improved when support include plugins by features

Comment thread runtime/tokio_util.rs
tokio_configuration();

tokio::runtime::Builder::new_current_thread()
tokio::runtime::Builder::new_multi_thread()

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rspack only support multi thread mode now, but can support single thread in the future

Comment thread rust-toolchain.toml
@@ -1,3 +1,3 @@
[toolchain]
channel = "1.80.0"
channel = "nightly-2024-06-07"

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rspack use nightly version of rust,but can switch to stable version in the future

@hardfist hardfist changed the title chore: add rspack dep chore: using rspack to bundle Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant