-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[WIP] build: add cargo feature to drop various tools #8381
Conversation
Update: When building with
|
@@ -135,8 +135,8 @@ impl DiagnosticBuffer { | |||
#[derive(Debug, Clone)] | |||
pub struct ErrorBuffer(Arc<RwLock<Vec<Diagnostic>>>); | |||
|
|||
impl ErrorBuffer { | |||
pub fn new() -> Self { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
aside: shouldn't this result in a clippy error currently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect so, but it seems that's only the case when having lib.rs
Closing in favor of #8640 |
This is really a prototype and is not intended to be landed.
This commit adds default cargo feature called "tools". When building with
--no-default-features
flag most of the tools included in the regular binary won't be included (TS support, doc generator, formatter, linter, bundler, file watcher) and produced binary will be able to load file only from local disk (so effectively no URL support and only "deno run" subcommand is operational). This reduces binary size from about 45Mb to 30Mb (on macOS).There are still about 50 "unused" warnings left.
To try out locally: