Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter Rust output format to be standalone #65

Open
str4d opened this issue Jan 8, 2022 · 0 comments
Open

Alter Rust output format to be standalone #65

str4d opened this issue Jan 8, 2022 · 0 comments

Comments

@str4d
Copy link
Contributor

str4d commented Jan 8, 2022

Currently, the Rust output format is intended to be copy-pasted into a #[test] function in other codebases. That was fine for small test vectors, but we have much larger ones now, and so it makes more sense to have the output be a valid standalone Rust file.

We should use the following format style:

pub(crate) struct TestVector {
    pub(crate) NAME: TYPE,
    ...,
}

// From https://github.com/zcash-hackworks/zcash-test-vectors/...
pub(crate) const TEST_VECTORS: &[TestVector] = &[
    TestVector {
        NAME: VALUE,
        ...,
    },
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant