Skip to content

Enable wasm-opt#73

Open
Fantoni0 wants to merge 1 commit intomainfrom
fix/opt-wasm
Open

Enable wasm-opt#73
Fantoni0 wants to merge 1 commit intomainfrom
fix/opt-wasm

Conversation

@Fantoni0
Copy link
Copy Markdown
Contributor

Closes #48
Enables wasm-opt.
I couldn't fix it directly during crate compilation. It failed because I couldn't pass the required flags there.
So I had to use a post-build hook in Trunk.toml.

In general, the build was reduced by 50Kb, and the times are very similar.

@Fantoni0 Fantoni0 requested a review from maksimryndin January 21, 2026 08:38
@Fantoni0 Fantoni0 requested a review from NiDimi as a code owner January 21, 2026 08:38
Copy link
Copy Markdown
Contributor

@NiDimi NiDimi left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown
Contributor

@maksimryndin maksimryndin left a comment

Choose a reason for hiding this comment

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

Let's not hurry up here, probably, we just need some time to properly figure out how to do it with trunk

@maksimryndin
Copy link
Copy Markdown
Contributor

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4a39c5159b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Trunk.toml
stage = "post_build"
command = "sh"
command_arguments = ["-c", """
WASM_OPT="$HOME/.cache/trunk/wasm-opt-version_123/bin/wasm-opt"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Resolve wasm-opt path dynamically

The post-build hook hardcodes WASM_OPT to ~/.cache/trunk/wasm-opt-version_123/bin/wasm-opt, so any environment where Trunk downloads a different wasm-opt version (or stores cache under a different base path) will skip optimization entirely. Because this commit also sets data-wasm-opt="0" in app/index.html, those builds have no fallback optimization path and silently ship larger/slower WASM artifacts than intended.

Useful? React with 👍 / 👎.

torisamples pushed a commit to torisamples/stellar-private-payments that referenced this pull request Apr 9, 2026
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.

Enable optimizations and minifications for production app dist

3 participants