Skip to content

Commit

Permalink
support automatic optimizer builds of different feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Feb 25, 2025
1 parent e7f3e28 commit 51e2ed8
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 14 additions & 7 deletions contracts/external/cw-tokenfactory-issuer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,22 @@ repository = { workspace = true }
# the default DAO DAO license
license = "Apache-2.0"


exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
# configure different optimizer builds for each tokenfactory standard used by
# different chains
[package.metadata.optimizer]
standard-build = false
builds = [
{ name = "osmosis", features = [
"osmosis_tokenfactory",
], default-features = false },
{ name = "cosmwasm", features = [
"cosmwasm_tokenfactory",
], default-features = false },
{ name = "kujira", features = [
"kujira_tokenfactory",
], default-features = false },
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
12 changes: 12 additions & 0 deletions contracts/external/cw-vesting/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

# configure different optimizer builds for whether or not staking is enabled by
# the chain
[package.metadata.optimizer]
standard-build = false
builds = [
{ name = "staking", features = [
"staking",
], default-features = false },
{ name = "no_staking", features = [
], default-features = false },
]

[lib]
crate-type = ["cdylib", "rlib"]

Expand Down
7 changes: 0 additions & 7 deletions contracts/proposal/dao-proposal-multiple/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ license = { workspace = true }
repository = { workspace = true }
version = { workspace = true }

exclude = [
# Those files are rust-optimizer artifacts. You might want to commit them for convenience but they should not be part of the source code publication.
"contract.wasm",
"hash.txt",
]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib", "rlib"]

Expand Down

0 comments on commit 51e2ed8

Please sign in to comment.