-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
219 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
crates/rolldown/src/bundler/module_loader/module_task_context.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
use rolldown_fs::FileSystem; | ||
|
||
use crate::{ | ||
bundler::{options::input_options::InputOptions, plugin_driver::SharedPluginDriver}, | ||
bundler::{options::input_options::SharedInputOptions, plugin_driver::SharedPluginDriver}, | ||
SharedResolver, | ||
}; | ||
|
||
use super::Msg; | ||
|
||
/// Used to store common data shared between all tasks. | ||
pub struct ModuleTaskCommonData<'task, T: FileSystem + Default> { | ||
pub input_options: &'task InputOptions, | ||
pub struct ModuleTaskCommonData<T: FileSystem + Default> { | ||
pub input_options: SharedInputOptions, | ||
pub tx: tokio::sync::mpsc::UnboundedSender<Msg>, | ||
pub resolver: SharedResolver<T>, | ||
pub fs: T, | ||
pub plugin_driver: SharedPluginDriver, | ||
} | ||
|
||
impl<'task, T: FileSystem + Default> ModuleTaskCommonData<'task, T> { | ||
pub unsafe fn assume_static(&self) -> &'static ModuleTaskCommonData<'static, T> { | ||
impl<T: FileSystem + Default> ModuleTaskCommonData<T> { | ||
pub unsafe fn assume_static(&self) -> &'static Self { | ||
std::mem::transmute(self) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.