You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the optimizer assumes that all contracts in a workspace are located in the contracts/ directory. However, this is not always the case, especially with larger libraries such as ibc-rs. For instance, ibc-rs has its 07-tendermint contract in ./ibc-clients/ics07-tendermint/cw-contract, which is not detected by the optimizer. It would be beneficial to define a build process that specifies the contract packages in Cargo.toml.
Proposal: Look for [package.metadata.optimizer]
Currently, the optimizer only iterates over Cargo.toml files of the packages in the contracts/ directory. While retaining this behavior, extend the optimizer to iterate over all Cargo.toml files of all packages in the workspace and treat the packages that have [package.metadata.optimizer] as contracts to be built.
This enhancement will provide greater flexibility and support for projects with different directory structures, ensuring all relevant contracts are detected and optimized.
The text was updated successfully, but these errors were encountered:
srdtrk
changed the title
FR: Enhance optimizer to detect contracts outside the contracts/ directory using Cargo.toml
FR: Detect contracts outside the contracts/ directory using Cargo.tomlJul 16, 2024
Description
Currently, the optimizer assumes that all contracts in a workspace are located in the contracts/ directory. However, this is not always the case, especially with larger libraries such as ibc-rs. For instance,
ibc-rs
has its07-tendermint
contract in./ibc-clients/ics07-tendermint/cw-contract
, which is not detected by the optimizer. It would be beneficial to define a build process that specifies the contract packages inCargo.toml
.Proposal: Look for
[package.metadata.optimizer]
Currently, the optimizer only iterates over
Cargo.toml
files of the packages in the contracts/ directory. While retaining this behavior, extend the optimizer to iterate over allCargo.toml
files of all packages in the workspace and treat the packages that have[package.metadata.optimizer]
as contracts to be built.This enhancement will provide greater flexibility and support for projects with different directory structures, ensuring all relevant contracts are detected and optimized.
The text was updated successfully, but these errors were encountered: