-
Notifications
You must be signed in to change notification settings - Fork 238
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
Improve docs re: proc macros #1848
Conversation
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.
Fantastic, thanks, just a couple of tweaks which I think are worthwhile.
All you need to do is add this to the top of `lib.rs`: | ||
|
||
```rust | ||
uniffi::setup_scaffolding!(); |
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.
please add something like: The setup_scaffolding function takes one optional parameter, the ["namespace"](../udl/namespace,md] used by the component. If not specified, the name of the crate will be used as the namespace.
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.
Good call; that's super helpful.
|
||
Use `generate --library` to generate foreign bindings by using a cdylib file built for your library. | ||
This flag was added in UniFFI 0.24 and can be more convenient than specifying the UDL file -- especially when multiple UniFFI-ed crates are built together in one library. | ||
The plan is to make library mode the default in a future UniFFI version. | ||
The plan is to make library mode the default in a future UniFFI version, and it is highly recommended to specify the flag for now. |
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.
maybe add here "because some features simply don't work otherwise"?
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.
Done.
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.
Thank you!
Closes #1816.