Skip to content

Expose macro_export in guest-rust-macro#431

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
AmitPr:main
Nov 15, 2022
Merged

Expose macro_export in guest-rust-macro#431
alexcrichton merged 2 commits intobytecodealliance:mainfrom
AmitPr:main

Conversation

@AmitPr
Copy link
Copy Markdown
Contributor

@AmitPr AmitPr commented Nov 15, 2022

This PR exposes the option to pass export_macro as an argument, which allows one to do something like:

wit_bindgen_guest_rust::generate!({
    default: "./wit/http_service.wit",
    name: "http_component",
    macro_export,
});

For context, setting the macro_export option to true adds a #[macro_export] to the generated export_{module_name} macro.

@alexcrichton alexcrichton merged commit 717ab1e into bytecodealliance:main Nov 15, 2022
@alexcrichton
Copy link
Copy Markdown
Member

Thanks!

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