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

Rust: support for interface bundles? #540

Open
tahina-pro opened this issue Feb 19, 2025 · 2 comments
Open

Rust: support for interface bundles? #540

tahina-pro opened this issue Feb 19, 2025 · 2 comments

Comments

@tahina-pro
Copy link
Member

tahina-pro commented Feb 19, 2025

Thanks a lot @R1kM and @msprotz for #533 !

Based on that, I have a feature request. Consider the following two interfaces:

module AuxA
val foo: bool -> bool

module AuxB
val bar: bool -> bool

I can implement those two interfaces and extract a single Rust file with -bundle AuxA+AuxB=[rename=Aux,rename-prefix]. Karamel produces a single aux.rs file, as I expect.

However, at this point, if I write a client for those interfaces and extract it to Rust with that bundle, it will still produce calls to auxa::foo and auxb::bar instead of aux::foo and aux::bar (see be223e4).

Would it be possible to have Karamel Rust backend support such interface bundles? Thanks in advance!

@msprotz
Copy link
Contributor

msprotz commented Feb 19, 2025

Thanks for the report, this looks like something we can look into

@msprotz
Copy link
Contributor

msprotz commented Feb 20, 2025

Pushed a commit to fix this on your branch. Please review! Cheers

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

2 participants