-
Notifications
You must be signed in to change notification settings - Fork 39
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
Replace macro_rules!
macros with proc_macros
+ general cleanup
#97
Merged
danielhenrymantilla
merged 15 commits into
ffi-safe-dyn-traits
from
cleanup-replace-macro-rules-with-proc-macros
Jun 29, 2022
Merged
Replace macro_rules!
macros with proc_macros
+ general cleanup
#97
danielhenrymantilla
merged 15 commits into
ffi-safe-dyn-traits
from
cleanup-replace-macro-rules-with-proc-macros
Jun 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9b503c2
to
63a04b0
Compare
49f62d5
to
8c2eb48
Compare
63f68ba
to
5fdc807
Compare
…rt!` logic. - this gets rid of the need of the macros in `layout/macros.rs` unless the `js` feature is enabled and we are dealing with a `repr(C, node_js)` type. - most macros are thus implemented using procedural macro code. - Most of the header generation logic is factored out into a pluggable `headers/languages/` system thanks to a new `dyn HeaderLanguage` trait. - Incidentally, this implements `rename =`ing on `#[derive_ReprC(…)]`, as well as fixing the issue with a generic opaque type. It also makes it so more instances of unit and braced structs are supported.
* Builder::generate_with_definer has been splitted in subfunction for better readability * added type alias GenerationFunction * added NameConvention option on builder Co-Authored-By: Ronan Demimuid <ronan@ditto.live>
3918d05
to
b22bd95
Compare
@ronan-ditto I've cleaned up the commit history; but if that were to cause trouble for your other branch, you can |
4a78abb
to
7f515a9
Compare
7f515a9
to
64cd908
Compare
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #46
Implemented the new
#[derive_ReprC]
and some accompanyingffi_export!
logic.this gets rid of the need of the macros in
layout/macros.rs
unless thejs
experimental feature is enabled and we are dealing with arepr(C, node_js)
type.most macros are thus implemented using procedural macro code.
most of the header generation logic is factored out into a pluggable
headers/languages/
system thanks to a newdyn HeaderLanguage
trait.Incidentally, this implements
rename =
ing on#[derive_ReprC(…)]
, as well as fixing the issue with a generic opaque type (Using generics in struct does not create separate monomorphized types #99).It also makes it so more instances of unit and braced structs are supported.