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

chore: using rspack to bundle #1

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

chore: using rspack to bundle #1

wants to merge 13 commits into from

Conversation

hardfist
Copy link
Owner

@hardfist hardfist commented Aug 12, 2024

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

@@ -26,7 +26,8 @@ pub fn create_basic_runtime() -> tokio::runtime::Runtime {
let (event_interval, global_queue_interval, max_io_events_per_tick) =
tokio_configuration();

tokio::runtime::Builder::new_current_thread()
tokio::runtime::Builder::new_multi_thread()
Copy link
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

@@ -1,3 +1,3 @@
[toolchain]
channel = "1.80.0"
channel = "nightly-2024-06-07"
Copy link
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