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

Move metadata handling into its own crate #2213

Closed
brson opened this issue Apr 15, 2012 · 11 comments
Closed

Move metadata handling into its own crate #2213

brson opened this issue Apr 15, 2012 · 11 comments
Labels
C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@brson
Copy link
Contributor

brson commented Apr 15, 2012

Seems like a good next candidate for breaking up rustc. Metadata will likely be needed by the libraries for dynamic loading.

@ghost ghost assigned brson Apr 15, 2012
@brson
Copy link
Contributor Author

brson commented Apr 21, 2012

Probably necessary for doing dynamic loading and other reflection stuff.

It's very tangled up in the syntax and ty modules so I think parts of ty have to go with it.

@mstewartgallus
Copy link
Contributor

I would appreciate this effort. I am currently working on wrapping the dlfcn API http://gitorious.org/rust-dlfcn/rust-dlfcn/trees and using it to load code dynamically. However this is not very good because I need to use the #[no_mangle] attribute (which doesn't work on static values #5972 )

@ssbr
Copy link

ssbr commented May 3, 2013

It would be nice if rustc::metadata were made be more easily usable for non-compilers. Essentially the entire public API assumes you've parsed a rust source file and are looking into its dependencies (or at least, that's how I interpret the tangling with syntax::ast and the usage in rustc's driver, but I never looked deeper than that.)

I tried to figure out how to use this to pull type information from crates to generate C header files; however, it can't be done with the public API as far as I can tell.

@pcwalton
Copy link
Contributor

I don't believe this is backwards incompatible, renominating.

@graydon
Copy link
Contributor

graydon commented May 30, 2013

just a bug, removing milestone/nomination.

@graydon
Copy link
Contributor

graydon commented May 30, 2013

dynamic loading is unlikely to be typesafe, but if we go there we're likely to do it based on type hashing

@emberian
Copy link
Member

This would hopefully be accomplished alongside the metadata reform that needs to happen.

@emberian
Copy link
Member

emberian commented Jan 6, 2014

Still a problem. I have some ideas about it, will post to ML.

@kmcallister
Copy link
Contributor

+1, this is potentially useful for a lot of things, e.g.

@kmcallister kmcallister changed the title Extract rustc::metadata into crate rustmeta Move metadata handling into its own crate Oct 7, 2014
@brson
Copy link
Contributor Author

brson commented Jan 13, 2015

Still an obvious but hard refactor. Not sure if this issue is still useful.

@steveklabnik
Copy link
Member

@brson yeah, I'd side on the 'ticket not actually useful' side of things. @kmcallister has a list of some things that this would be useful for, but those have individual tickets that are actually goal-focused.

bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
make clippy mandatory for bors, and silence another clippy lint

We don't currently trigger this but I saw it in a PR and I'd rather evaluate this on a case-by-case basis during review, thank you clippy.
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
C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

8 participants