0xPolygonMiden / miden-base

Core components of the Polygon Miden rollup
MIT License
68 stars 41 forks source link

fix: Add testing feature flag to no-std build #869

Closed igamigo closed 2 weeks ago

igamigo commented 2 weeks ago

Since the testing feature flag is additive in the sense that it just adds code, it should be OK to add it directly to the no-std make target to detect potential problems in that code.

bobbinth commented 2 weeks ago

Since the testing feature flag is additive in the sense that it just adds code, it should be OK to add it directly to the no-std make target to detect potential problems in that code.

Generally, I think this is right - but I can also imagine a situation where a different version of a struct is used for testing vs. not (e.g., for testing we make fields of a struct public but they are private otherwise). So, I'm not sure we can always guarantee that if it works with testing feature enabled, it will work without it as well.