-
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
Allow UDL to avoid the [Rust=...]
attribute by using a plain-old ty…
#2199
Conversation
4ecbac7
to
1e53592
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am all here for the simplification!
c30c046
to
d9dd9ff
Compare
name, | ||
}, | ||
"custom" => panic!("don't know builtin"), | ||
"interface" | "impl" => Type::Object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I should call out that I added a couple of names compared to the Rust attribute. In particular, struct
as an alias for record
above, and impl
as an alias for interface
here. My thinking was that these names more closely match what a Rust programmer is likely to think of - ie, a derive(uniffi::Record)
lives on a struct
defn while uniffi::export
lives on an impl
block.
On the negative side, impl
is also used for traits.
I personally quite like these names, but don't feel too strongly about it, so will happily concede to someone who strongly dislikes them!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm +1 on this.
34baacc
to
b600a0b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me.
name, | ||
}, | ||
"custom" => panic!("don't know builtin"), | ||
"interface" | "impl" => Type::Object { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm +1 on this.
b600a0b
to
032e873
Compare
Note that I snuck in a change to move a previously misplaced CHANGELOG entry here. |
…pedef
This is a WIP and needs a little cleaning up, but thought I'd throw it out there. It allows people to stop using the
[Rust=...]
attribute in UDL.This doesn't seem that interesting now, but it will really make sense once Ben's other work lands and we could take this further and use it with
[External]
(to, eg, drop the entireExternalInterface
attribute) and with[Remote]
.