Skip to content

OS X Framework support #2023

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

Closed
ashgti opened this issue Mar 18, 2012 · 3 comments
Closed

OS X Framework support #2023

ashgti opened this issue Mar 18, 2012 · 3 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-macos Operating system: macOS

Comments

@ashgti
Copy link

ashgti commented Mar 18, 2012

Currently, I do not see any way of linking against a native framework in OS X. For instance, if you wanted to link against OpenGL on OS X, it currently fails to find the native library.

Its possible to just create .o files and link them but it would be nice if there was some way for this to work with the rust compiler.

One possibility could be to add a #[framework_name = "OpenGL"] attribute to the native mod, similar to #[link_name].

@pcwalton
Copy link
Contributor

pcwalton commented Aug 7, 2012

You can work around this via #[link_args]. See how rust-cocoa does it: https://github.com/pcwalton/rust-cocoa

(Update from pnkfelix: link above is dead, but I think this is suitable replacement: https://github.com/pcwalton/rust-core-foundation/ e.g. data.rs )

@metajack
Copy link
Contributor

Since framework names are quite platform specific, one suggestion might be to use this syntax:

#[link_name="OpenGL.framework"]

and have rustc do the right thing on OS X and fail on other platforms.

Here's a more specific example of how this is currently done: https://github.com/mozilla-servo/rust-core-foundation/blob/master/base.rs#L151

@emberian
Copy link
Member

Triage bump

Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
… skipping of link-checking (rust-lang#2023)

* Remove properly tracked config file from .gitignore

The file is part of the git history and is a configuration file.

Fixes: rust-lang#2018

* Add  env. variable support

* Refactoring

* Really skip linkcheck if requested
Kobzol pushed a commit to Kobzol/rust that referenced this issue Dec 30, 2024
… skipping of link-checking (rust-lang#2023)

* Remove properly tracked config file from .gitignore

The file is part of the git history and is a configuration file.

Fixes: rust-lang#2018

* Add  env. variable support

* Refactoring

* Really skip linkcheck if requested
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-driver Area: rustc_driver that ties everything together into the `rustc` compiler A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. O-macos Operating system: macOS
Projects
None yet
Development

No branches or pull requests

4 participants