-
Notifications
You must be signed in to change notification settings - Fork 62
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
WIP: feat(doc): Add a doc for beginners #474
base: master
Are you sure you want to change the base?
Conversation
1. Info on How to Enble Enable `rust-analyzer` Support 2. Info on How to Compile External Project with `cg_gcc`
Maybe it is possible to map the |
1. Run the program with (in the root dir of `rustc_codegen_gcc` )(where `--manifest-path` is the path to the `Cargo.toml` of the project to run `cargo` against): | ||
|
||
```shell | ||
./y.sh cargo --manifest-path="..." |
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.
No need for the indent.
|
||
|
||
```shell | ||
alias cargcc="/path/to/rustc_codegen_gcc/y.sh cargo" |
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.
No need for the indent.
./y.sh cargo --manifest-path="..." | ||
``` | ||
|
||
or you may as well add this alias in your `.bash_aliases`: |
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.
I'd drop this whole part. I never used .bash_aliases
, only .bashrc
for example. Having something so specific seems a bit too much imo.
2. Install rust-src with rustup: `rustup component add rust-src`. | ||
NOTE: Make sure you've switched to the corresponding toolchain as is used by cg_gcc | ||
3. Set the lsp option `rust-analyzer.rustc.source = "discover"` (you can also set it to an explicit path), depending on your editor. | ||
1. Neovim(nvim-lspconfig): |
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.
Please drop this part, there are a lot of IDEs, adding docs for some of them is not useful.
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.
I wrote this part for this comment.
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.
In my point of view, it may be trivial for us that these steps are necessary, but probably harder for others to figure it out. Adding this may potentially add to contributors(since we only have no more than 100 developers).
rust-analyzer
Supportcg_gcc