Skip to content
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 #[link_type="object"] to link against object files #1303

Closed
erickt opened this issue Dec 14, 2011 · 2 comments
Closed

Add #[link_type="object"] to link against object files #1303

erickt opened this issue Dec 14, 2011 · 2 comments
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@erickt
Copy link
Contributor

erickt commented Dec 14, 2011

I need to write some wrapper functions in C for my zeromq bindings. It seems a bit heavyweight to create a shared library just to link these functions in, so I'm cheating and putting my .o files in the link_args for the zmq native mod. I'd rather put these functions in their own module rustzmq and just label it with #[link_type="object"], and have rustc automatically link against rustzmq.o.

@brson
Copy link
Contributor

brson commented Dec 14, 2011

Could you put your wrapper functions in a static library?

@catamorphism
Copy link
Contributor

Closing this because @brson 's question never got answered. Feel free to reopen.

flip1995 pushed a commit to flip1995/rust that referenced this issue May 6, 2021
…tion-lint, r=xFrednet

A metadata collection monster

This PR introduces a metadata collection lint as discussed in rust-lang#4310. It currently collects:
* The lint ID
* The lint declaration file and location (for rust-lang#1303)
* The lint group
* The documentation
* The applicability (if resolvable)
* If the suggestion is a multi-part-suggestion

This data has a slightly different structure than the current [lints.json](https://github.com/rust-lang/rust-clippy/blob/gh-pages/master/lints.json) and doesn't include depreciated lints yet. I plan to adapt the website to the new format and include depreciated lints in a follow-up PR :). The current collected json looks like this: [metadata_collection.json](https://gist.github.com/xFrednet/6b9e2c3f725f476ba88db9563f67e119)

The entire implementation is guarded behind the `metadata-collector-lint` feature and the `ENABLE_METADATA_COLLECTION` environment value to prevent default collection. You can test the implementation via:
```sh
$ ENABLE_METADATA_COLLECTION=1 cargo test --test dogfood --all-features
```

changelog: none

---

The size of this PR sadly also grew into a small monster, sorry! I definitely plan to improve on this! And it's totally okay if you take your time with this :)

r? `@phansch`
cc: `@flip1995`
flip1995 added a commit to flip1995/rust that referenced this issue Jul 29, 2021
…ormat, r=flip1995

Adapting the lint list to Clippy's new metadata format

This is close to the end of a long living project to rewrite the lint metadata collection for Clippy. Progress on this has been tracked in rust-lang#7172. This PR adds one of the last missing puzzle pieces, the actual display of all the changes that have been done in the background. A preview can be seen here: [Clippy's lint list](https://xfrednet.github.io/rust-clippy/master/index.html)

The styling has been discussed on [zulip](https://rust-lang.zulipchat.com/#narrow/stream/257328-clippy/topic/Styling.20feedback.20for.20Clippy's.20lint.20list/near/239601067) but is still open to suggestion.

Side note: It has been fun working on the website where we don't have unit tests and everything is just tested by playing around. However, it's good that this chaos is contained into this one part of Clippy. 🐛

---

Closes: rust-lang#1303
Closes: rust-lang#4310

This actually closes fewer things than I thought it would...

changelog: Reworked Clippy's [website](https://rust-lang.github.io/rust-clippy/master/index.html):
changelog: * Added applicability information about lints
changelog: * Added a link to jump to the specific lint implementation
changelog: * Adapted some styling and improved loading time

r? `@flip1995`
bjorn3 added a commit to bjorn3/rust that referenced this issue Dec 14, 2022
Earlier today CI started to fail on Linux with a crash during the
jit mode. Turns out ubuntu-latest switched from ubuntu-20.04 to
ubuntu-22.04. Let's switch back to ubuntu-20.04 for now to unbreak
CI until I figured out the root cause.

cc rust-lang#1303
bjorn3 added a commit to bjorn3/rust that referenced this issue Feb 9, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
celinval pushed a commit to celinval/rust-dev that referenced this issue Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-attributes Area: Attributes (`#[…]`, `#![…]`) A-linkage Area: linking into static, shared libraries and binaries C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

3 participants