-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Comments
Probably necessary for doing dynamic loading and other reflection stuff. It's very tangled up in the |
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 ) |
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. |
I don't believe this is backwards incompatible, renominating. |
just a bug, removing milestone/nomination. |
dynamic loading is unlikely to be typesafe, but if we go there we're likely to do it based on type hashing |
This would hopefully be accomplished alongside the metadata reform that needs to happen. |
Still a problem. I have some ideas about it, will post to ML. |
+1, this is potentially useful for a lot of things, e.g.
|
Still an obvious but hard refactor. Not sure if this issue is still useful. |
@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. |
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.
Seems like a good next candidate for breaking up rustc. Metadata will likely be needed by the libraries for dynamic loading.
The text was updated successfully, but these errors were encountered: