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

make unspecified-repr be another combinatoric lever? #36

Closed
Gankra opened this issue Jun 30, 2024 · 0 comments · Fixed by #39
Closed

make unspecified-repr be another combinatoric lever? #36

Gankra opened this issue Jun 30, 2024 · 0 comments · Fixed by #39
Labels
enhancement New feature or request question Further information is requested

Comments

@Gankra
Copy link
Owner

Gankra commented Jun 30, 2024

Without a specified calling convention, we generate a test for every possible calling convention. We could also do the same thing for type repr (C, Rust, u8, ...). (Right now unspecified => repr C)

If we want to do this, it would have to become a new member of TestOptions, and therefore a part of every TestKey

abi-cafe/src/abis/mod.rs

Lines 90 to 98 in 6ba6865

/// Options for a test
#[derive(Clone, Debug, Serialize)]
pub struct TestOptions {
/// The calling convention
pub convention: CallingConvention,
pub functions: FunctionSelector,
pub val_writer: WriteImpl,
pub val_generator: ValueGeneratorKind,
}

I think the absolute amount of work involved isn't perse a ton, and I hopefully setup the code such that adding a new TestOptions field will give you compiler errors everywhere you need to deal with it.

That said it's a lot of tedious threading of options and has some weird decisions to make around "how do you prevent repr(rust) types from getting shoved into extern "C" interfaces (or do you?).

@Gankra Gankra added enhancement New feature or request question Further information is requested labels Jun 30, 2024
@Gankra Gankra closed this as completed in #39 Jul 1, 2024
@Gankra Gankra closed this as completed in 842036b Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant