-
Notifications
You must be signed in to change notification settings - Fork 47
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 static selectors #104
Add static selectors #104
Conversation
objc2/src/macros.rs
Outdated
// TODO: `::core` here could be replaced with some more | ||
// sophisticated logic so we don't rely on downstream users having | ||
// this setup. |
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.
You can re-export core
in your crate and then access it from this macro as e.g. $crate::_core
.
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.
Yeah I know, I was just carrying over a TODO from previous authors. Thanks for the review though!
The |
Using ordinary macros instead of hacky procedural macros like Nika Layzell originally did Co-authored-by: Nika Layzell <[email protected]>
Co-authored-by: Jeff Muizelaar <[email protected]> Co-authored-by: clavin <[email protected]> Co-authored-by: Michael Bradshaw <[email protected]>
Co-authored-by: clavin <[email protected]>
Co-authored-by: Jeff Muizelaar <[email protected]>
…o the same codegen unit Co-authored-by: clavin <[email protected]>
Co-authored-by: clavin <[email protected]>
Co-authored-by: Jeff Muizelaar <[email protected]> Co-authored-by: clavin <[email protected]>
This has no effect on the behavior, so moving them out makes this explicit.
This allows stripping accesses to unused selectors, while still loading the pointer correctly
I think I'm gonna merge this as-is now, allowing users to enable and test this with the The primary blocker for adopting this fully (in its most optimal form Also, we would probably have to have some parts of how the compiler works be more fully specified before we could really ensure that this is stable. |
My work on fixing upstream SSheldon/rust-objc#49.
A lot of work has gone into this, by many different people, see in particular the following:
@pcwalton
's investigation@mjbshaw
's investigation, their Rust issue on statics and incremental compilation and their comment on Rust's unstablelinkage
feature@jrmuizel
's Rust issue, similar to the above@clavin
's discussion about their approachThis implementation is a combination of the following (
git
co-author attribution given where relevant):objrs
' implementation@mystor
's implementation@jrmuizel
's implementation (fork of the above)@clavin
's implementation@nvzqz
's implementation (haven't yet looked at this)I've cut down heavily on procedural macro usage, because I think the code is much more readable without (ideally we'll find a way to get rid of them entirely).
TODO:
Set up ObjFW CI (ObjFW support #117)Postponed.trybuild
for testing compilation failures #35) and LLVM/Assembly/... outputSet up WinObjC CIDeferredMake this work on GNUStepDeferredMaybe make necessary changes to Rust to fix the linked issues with generics, incremental compilation and codegen units?Deferred, not really sure how it would be accomplishedShould we verify asciiness and such of the selectors like objrs does?Deferred, documented as ill-supported for now.See also:
ctor
defmt
's duplicate handling