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 standalone modules for wit file generation. #3

Open
sviezypan opened this issue Feb 4, 2024 · 0 comments
Open

Support standalone modules for wit file generation. #3

sviezypan opened this issue Feb 4, 2024 · 0 comments

Comments

@sviezypan
Copy link
Collaborator

Right now in order to generate WIT file from Rust code, we annotate inner module:

#[golem_rust::create_wit_file]
mod golem_component2 {

    pub struct BidderId {
        pub bidder_id: String
    }
    trait AuctionService {
        fn create_bidder(full_name: String) -> BidderId;
    }
}

This ticket is to implement another solution if possible - to have top level attribute in a module file and having wit file generated out of it.

E.g. there's a auction_app.rs file with a top level attribute #![golem_rust::create_wit_file]. File would contain only structs, traits, enums and type aliases. Than module would be imported in main.rs with mod auction_app

@sviezypan sviezypan changed the title Explore possibilities to support standalone modules for wit file generation. Support standalone modules for wit file generation. Feb 4, 2024
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

1 participant