-
Notifications
You must be signed in to change notification settings - Fork 547
"Navigating the compiler from the outside" #74
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
Also, I remember seeing a tutorial a while back which steps you through using It'd be nice to add a link to those sorts of tutorials if they aren't too outdated because they help to give you a starting point to build off of. |
Hmm... So far the guide had been about how the compiler itself works, but I'm not opposed to adding this here. We could also add the shiny new rustdoc README... |
On second thoughts I don't think it'd be necessary to write anything specific to those using
Rustdoc has a new README? 😮 |
I frankly don't know that much about this topic, so I would defer to you on what would be most useful in such a chapter :)
Indeed! rust-lang/rust#48283 |
Unfortunately not me :( |
Perhaps you are thinking of https://github.com/nrc/stupid-stats? |
Yep, that's the one! Given how the compiler is currently going from being pass-based to query-based, does anyone know if this |
I'm currently working on a project which uses
rustc
internals to analyse a crate so I can then generate FFI bindings. Kinda likecbindgen
, except where they focus on static linking at compile time or dynamically when your program gets loaded into memory, I'm trying to load a dynamic library at runtime usingdlopen
(*nix) andLoadLibrary
(windows).Seeing as this is a guide on how
rustc
works under the hood, would it be worth adding a chapter that mentions:rustc
internals as a library,rustc_driver
to run some code after a particular phase, andMy code is on GitLab so people in a similar situation or writing this chapter can use that as a reference.
This is slightly off topic, but I'm really impressed with how easy the compiler internals (especially the HIR and
Session
) are to work with once you understand how they're designed! It was initially a bit confusing because there are loads of data structures (unfortunately, not many have doc-comments) and lots of complexity, but after an hour or two of jumping around the crate docs I was able to be quite proficient in finding the information I want.The text was updated successfully, but these errors were encountered: