-
Notifications
You must be signed in to change notification settings - Fork 234
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
Add a procedural macro frontend #1257
Comments
About the current status: Some things have their boxes ticked but don't have PRs yet. The reason for that is that most of the work I've been doing so far has not been under the assumption that we'll want to mix UDL and proc-macro interface definitions. However, recently I realized that this shouldn't be so hard and has a number of big advantages:
You can expect the first proc-macro PRs this week though 😉 |
This comment was marked as outdated.
This comment was marked as outdated.
Also I have a question that I wasn't sure whether to ask here or on Matrix: Why does the current scaffolding contain a separate |
It's part of a general policy to not implement the trait on any user types, in case those types came from another crate. It doesn't make that much sense for error types, but I guess there's a chance. Is this interfering with your work? Maybe we should try to tackle #1250 to simplify things. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This issue has definitely served its purpose ^^ |
This is a tracking issue for the proc-macro work, initially discussed in #385, on Matrix and recently in a video meeting.
Outline
#[uniffi::export]
that can go onto functions andimpl
blocks#[uniffi::default]
will be used to express binding properties that can't be expressed in Rust directly¹uniffi::FfiConvertible
to allow a custom type to be used in the FFI API²#[uniffi(default)]
will be used to express binding properties that can't be expressed in Rust directly³Progress
Result<T, E>
)Arc<_>
#[doc = "…"]
attributesimpl
blocksstatic
methods in some target languages)self
parametersSelf
keyword#[uniffi::constructor]
)¹ Using custom syntax like
foo: u32 = 0
the parameter list would be possible, but it's undesireable because (a) it would be confusing and (b) it would degrade IDE functionality² This could be handled by the same
#[uniffi::export]
attribute but that's undesireable for technical reasons³ Syntax difference is warranted due to proc-macro peculiarities
I can elaborate on any of these footnotes if somebody wants to know more ^^
┆Issue is synchronized with this Jira Task
┆friendlyId: UNIFFI-168
The text was updated successfully, but these errors were encountered: