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: Optimize build #157

Merged
merged 1 commit into from
Jun 3, 2024
Merged

Feat: Optimize build #157

merged 1 commit into from
Jun 3, 2024

Conversation

gluax
Copy link
Collaborator

@gluax gluax commented May 30, 2024

Motivation

I hate docker soooo.

This will make it so we can add more optimizations in the future, as well, which is cool, IMO.

Explanation of Changes

Used xtask to add more complicated custom cargo commands. It's used by cargo and rust!

The new command is cargo wasm-opt, and it outputs it to /target/seda_contract.wasm.

This requires a local version of wasm-opt, which you can install with NPM: npm i -g wasm-opt.

The cargo wasm command by adds the RUSTFLAG as well.

Testing

The command works and produces the same size wasm as the docker container.

Related PRs and Issues

N/A

@gluax gluax requested review from FranklinWaller and mariocao May 30, 2024 16:26
@gluax gluax self-assigned this May 30, 2024
@gluax gluax force-pushed the chore/opt-without-docker branch from 5d36285 to 79b58d3 Compare June 3, 2024 18:21
@gluax gluax merged commit 79b58d3 into main Jun 3, 2024
2 checks passed
@gluax gluax deleted the chore/opt-without-docker branch June 3, 2024 18:24
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.

2 participants