Skip to content

Comments

Rust::com Interface declarative macro for com-api#159

Draft
bharatGoswami8 wants to merge 1 commit intoeclipse-score:mainfrom
bharatGoswami8:declarative_macro_for_interface
Draft

Rust::com Interface declarative macro for com-api#159
bharatGoswami8 wants to merge 1 commit intoeclipse-score:mainfrom
bharatGoswami8:declarative_macro_for_interface

Conversation

@bharatGoswami8
Copy link
Contributor

  • Enabled the interface and dependent type generation with macro for user

eclipse-score/score#2561

* Enabled the interface and dependent type generation with macro for user
)

rust_library(
name = "com-api-interface-macros",
Copy link
Contributor

Choose a reason for hiding this comment

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

why seperate lib ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can not export declarative_macro form proc_macro crate.

error: cannot export macro_rules! macros from a proc-macro crate type currently

Copy link
Contributor

Choose a reason for hiding this comment

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

cant this be part of main crate ?

$crate::paste! {
pub struct [<$id Interface>] {}
impl com_api::Interface for [<$id Interface>] {
const INTERFACE_ID: &'static str = stringify!($id);
Copy link
Contributor

Choose a reason for hiding this comment

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

misssing fully qualified path ?

SampleMaybeUninit, SampleMut, ServiceDiscovery, Subscriber, Subscription,
};

pub use com_api_concept_interface_macros::interface; No newline at end of file
Copy link
Contributor

Choose a reason for hiding this comment

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

missing empty line at the end

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