-
Notifications
You must be signed in to change notification settings - Fork 5
Minimal codegen support: numbers and function parameters #2
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
Conversation
Thanks for getting this started! Is it possible to put bootstrap and CI into its own PR so that can be merged first, before the codegen part? (it will take me a little while to review this all, still don't have my usual github access) |
Understood, I'm working on #3 |
This can be rebased now that #3 merged. If it is possible to split this further for smaller review units then that would be great (e.g. AST crate first and codegen separately), but if not than this shouldn't be too bad with bootstrap out of the picture. |
Could you put the license files into a separate PR that we can merge right away? Guess we are currently unlicensed. Otherwise I'll try to look at this tomorrow-ish. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some initial comments, but I still have a lot more to go through.
Could you please add documentation comments? Most everything that isn't a trait implementation or a trivial function could benefit (it's a bit tough to figure out how things fit together without them).
|
#6 merged so this can be rebased again. It may be nice to just close this and open a new PR from the same branch to start fresh, since many of the comments here are related to things that have already merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing else stands out to me so I think we should merge this, then follow up with issues for any problems that come up. Please resolve the last remaining open discussion then clean up history.
This is a minimal yet complete C code generation implementation, capable of compiling functions with number-typed parameters and
as
expressions.The structure is organized as follows:
crates/rustc_codegen_c
: Implementation of the codegen backend.crates/rustc_codegen_c_ast
: C syntax structure for generating C source code.bootstrap
: Build system for executingrustc
with this codegen backend enabled.example
: Example files demonstrating the capabilities of the codegen backend.tests
: Test cases for validating functionality.