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

Support Assumed Declaration in MiniRust translation #533

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

R1kM
Copy link
Collaborator

@R1kM R1kM commented Feb 11, 2025

PR in support of scylla, to integrate external (assumed) declarations when transpiling from C to Rust.

This PR translates DExternal declarations in Ast to a new Assumed node in MiniRust.
In particular, the translation preserves the mutability that was specified by the external declaration, and uses it for the mutability inference in OptimizeMiniRust. This behavior is overriden for external, "builtin" definitions.

Assumed definitions are then filtered and not extracted to Rust: Rust clients are expected to provide them directly.

The extraction of hacl-rs from Low* remains the same with this PR.

Copy link
Contributor

@msprotz msprotz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks.

@R1kM R1kM enabled auto-merge February 14, 2025 16:09
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