signatures icon indicating copy to clipboard operation
signatures copied to clipboard

ml-dsa: large crate size due to test vectors

Open tarcieri opened this issue 1 year ago • 3 comments

I just noticed ml-dsa v0.1.0-pre.0 is 1.44MB in size due to the .json files for KATs/test vectors.

Perhaps we could omit these from the published crate to reduce its size?

cc @bifurcation

tarcieri avatar Jan 21 '25 19:01 tarcieri

I think removing the KAT files is reasonable, but if there ever is a way to cargo test on all dependencies as well, as discussed here:

https://internals.rust-lang.org/t/a-way-to-run-tests-for-all-your-dependencies-recursively/20584

Then perhaps a ml-dsa-kat package could be added with the data files and any additional test code. Dependents could add this to their dev dependencies. That's me thinking in Debian packaging terms though, so not sure if that's the correct approach in Rust land.

json420 avatar Mar 01 '25 13:03 json420

Yeah, I don't see a reason to package the tests in distributions. They're in the repo purely for development purposes; I wouldn't expect anyone importing the crate to use them. But I'm definitely not an expert in crate packaging.

bifurcation avatar Mar 01 '25 19:03 bifurcation

Fixed in #919

tarcieri avatar Mar 05 '25 13:03 tarcieri