Skip to content

Add emit c decl map flag to c2rust wrapper#1

Open
Crocodoctopus wants to merge 1 commit into
mainfrom
bg/emit-c-decl-map-in-c2rust-wrapper
Open

Add emit c decl map flag to c2rust wrapper#1
Crocodoctopus wants to merge 1 commit into
mainfrom
bg/emit-c-decl-map-in-c2rust-wrapper

Conversation

@Crocodoctopus

@Crocodoctopus Crocodoctopus commented Jul 1, 2026

Copy link
Copy Markdown

This adds --emit-c-decl-map to the c2rust transpile invocation in C2RustWrapper.

I assume can just inline the flag, as that appears to be the convention already?

@Crocodoctopus Crocodoctopus requested a review from fw-immunant July 1, 2026 17:43
@fw-immunant

fw-immunant commented Jul 1, 2026

Copy link
Copy Markdown

Because the --emit-c-decl-map flag places the C decl map alongside the generated Rust sources, I don't think it should be a problem to produce these files even when not strictly desired, but just for cleanliness it might be good to gate this behavior on a corresponding outer Hayroll flag.

I'm also curious, in this case where is the resulting C decl map left for the rest of the CRISP loop, and which preprocessor variant of the C sources does it refer to? I would think we need to merge the C decl map across multiple preprocessed variants of the C sources to include the union of all preprocessor-gated functions/lines, at the very least.

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

Successfully merging this pull request may close these issues.

2 participants