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

Can't specify specific contract for build in workspace repositories #152

Open
CyberHoward opened this issue May 15, 2024 · 1 comment
Open

Comments

@CyberHoward
Copy link
Contributor

Problem

Recurring WASM compilation is required when developing smart-contracts that require WASM blob based testing (osmosis-test-tube / testnets). When working in a Rust workspace environment using the optimizer for these recompiles can take a lot of time as each contract in the workspace is recompiled. This slows down development and can really hurt productivity.

While tools like cw-optimizoooor exists, they don't have the WASM build options integration, making it an unsuitable tool for more advanced repositories.

Possible Solution

We could add an optional argument to the docker execution that specifies which contracts to build. This way the developer can specify only the contract that they want to compile as part of the workspace without having to resort to other tools or workflows.

Alternatively the builder could be called from the contract's specific directory. However in its current state this will fail because the builder will not make use of the workspace Cargo.toml that is oftentimes referenced by workspace members.

@webmaster128
Copy link
Member

I don't think CosmWasm/optimizer belongs in a dev workflow. You have a much easier life with a simple build script like this: https://github.com/noislabs/nois-contracts/blob/main/devtools/build_integration_wasm.sh

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

No branches or pull requests

2 participants