Skip to content

Conversation

@fnando
Copy link
Member

@fnando fnando commented Dec 1, 2025

What

Add wasm-opt's Feature::BulkMemory feature, so it can handle more contracts.

$ stellar contract optimize --wasm /Users/fnando/Downloads/02e9f32323236b7288dc2b3d4652db678dcd876301fb3852d9cfb7cfaf54e0d2.wasm --wasm-out ~/Downloads/optimized.wasm
⚠️ `stellar contract optimize` is deprecated and will be removed in future versions of the CLI. Use `stellar contract build --optimize` instead.
Reading: /Users/fnando/Downloads/02e9f32323236b7288dc2b3d4652db678dcd876301fb3852d9cfb7cfaf54e0d2.wasm (14026 bytes)
Optimized: /Users/fnando/Downloads/optimized.wasm (11453 bytes)

I optimized ALL contracts on the repo mentioned on #2290 successfully with this feature.

$ ls *.wasm | wc -l
    1799

$ ls optimized/*.wasm | wc -l
    1799

Why

Close #2290.

Known limitations

N/A

@fnando fnando self-assigned this Dec 1, 2025
@fnando fnando added the bug Something isn't working label Dec 1, 2025
@fnando fnando added this to DevX Dec 1, 2025
@github-project-automation github-project-automation bot moved this to Backlog (Not Ready) in DevX Dec 1, 2025
@fnando fnando moved this from Backlog (Not Ready) to Needs Review in DevX Dec 1, 2025
@fnando fnando merged commit fc2cc45 into main Dec 1, 2025
32 checks passed
@fnando fnando deleted the wasm-optimize-bulk-memory branch December 1, 2025 20:18
@github-project-automation github-project-automation bot moved this from Needs Review to Done in DevX Dec 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Optimize fails on many mainnet contracts

3 participants