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

Feat: Package compiled OS as gzip #369

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

notlesh
Copy link
Collaborator

@notlesh notlesh commented Sep 12, 2024

Problem:

The compiled OS JSON is around 40M in size, and this gets absorbed as-is into the binary as a result of include_bytes(...). In addition, we didn't include this in our source tree, requiring downstream users to figure out how to build it.

Solution:

Gzip the OS JSON (this gets us from roughly 40M to 1M) and include this in the binary instead, then decompress it during runtime. Also, include this gzipped JSON so users will not have to worry about it.

The bad:

The downside of this is that we must decompress it at runtime, which looks to add about 0.07sec at runtime on my machine.

Additionally, including the compiled OS artifact in our source tree is less ideal than having a robust build system generate it as needed.

Issue Number: N/A

Type

  • feature
  • bugfix
  • dev (no functional changes, no API changes)
  • fmt (formatting, renaming)
  • build
  • docs
  • testing

Description

Breaking changes?

  • yes
  • no

crates/bin/prove_block/src/lib.rs Outdated Show resolved Hide resolved
tests/integration/common/transaction_utils.rs Outdated Show resolved Hide resolved
@notlesh notlesh changed the title Package compiled OS as gzip Feat: Package compiled OS as gzip Sep 13, 2024
@whichqua whichqua self-requested a review September 18, 2024 15:33
@HermanObst HermanObst self-requested a review as a code owner September 19, 2024 20:35
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.

5 participants