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
I'm not sure what section of the book to put this in, so dropping it in this issue for now, but per foundry-rs/forge-std#225 (comment) we may want to add something like this to the book:
Many projects use the solc optimizer, either directly or with via-ir. A config file may look like this for regular compilation:
The optimizer can significantly slow down compilation speeds, so one trick is to have a lite profile that has the optimizer off and use this for development. The updated config file for regular compilation may look like this:
(note that there are additional optimizer details you can configure, see here for more info)
Running forge build (or test or script) still uses the standard profile, so by default a forge script invocation will deploy your contracts with the production setting. Running FOUNDRY_PROFILE=lite forge build (and again, same for test/script) will use the lite profile to reduce compilation times
The text was updated successfully, but these errors were encountered:
I'm not sure what section of the book to put this in, so dropping it in this issue for now, but per foundry-rs/forge-std#225 (comment) we may want to add something like this to the book:
Many projects use the solc optimizer, either directly or with via-ir. A config file may look like this for regular compilation:
Or like this for via-ir:
The optimizer can significantly slow down compilation speeds, so one trick is to have a
lite
profile that has the optimizer off and use this for development. The updated config file for regular compilation may look like this:Or like this for via-ir:
(note that there are additional optimizer details you can configure, see here for more info)
Running
forge build
(ortest
orscript
) still uses the standard profile, so by default aforge script
invocation will deploy your contracts with the production setting. RunningFOUNDRY_PROFILE=lite forge build
(and again, same for test/script) will use the lite profile to reduce compilation timesThe text was updated successfully, but these errors were encountered: