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

Shrink Bun's binary by 3.5 MB #15121

Merged
merged 20 commits into from
Nov 14, 2024
Merged

Shrink Bun's binary by 3.5 MB #15121

merged 20 commits into from
Nov 14, 2024

Conversation

Jarred-Sumner
Copy link
Collaborator

What does this PR do?

Make some global static initializer symbols function scoped

How did you verify your code works?

@robobun
Copy link

robobun commented Nov 13, 2024

@@ -4333,7 +4339,7 @@ pub const PackageManager = struct {
try network_task.forTarball(
this.allocator,
&.{
.package_manager = &PackageManager.instance, // https://github.com/ziglang/zig/issues/14005
.package_manager = PackageManager.get(), // https://github.com/ziglang/zig/issues/14005
Copy link
Member

Choose a reason for hiding this comment

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

I think the linked issue can be removed, and PackageManager.get() -> this

Copy link
Member

@dylan-conway dylan-conway left a comment

Choose a reason for hiding this comment

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

Looks good

@Jarred-Sumner Jarred-Sumner changed the title Make some global static initializer symbols function scoped Shrink Bun's binary by 3.5 MB Nov 14, 2024
@Jarred-Sumner Jarred-Sumner merged commit 357581c into main Nov 14, 2024
24 of 25 checks passed
@Jarred-Sumner Jarred-Sumner deleted the jarred/init branch November 14, 2024 14:02
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.

3 participants