-
-
Notifications
You must be signed in to change notification settings - Fork 169
IDE issues #511
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
Comments
Hi @hyperswine As uefi-rs is a nostd+alloc library and uses procedural macros, IDE auto completion support is not as first class as for regular std crates. However, this is a general problem of the ecosystem and its tooling, not of uefi-rs in particular. What specific things are you missing? |
Im getting random errors and certain features like |
This is independent from vscode or rust analyzer. You can execute tests with The reason for this is that this is a no-std crate. All no-std crates need special handling for executing tests Does this help you? |
Well that helps, but im specifically looking for a better IDE developement experience. All good since no std is a second class citizen i suppose |
I admit IDE support is something of a blind spot for me. Just as a matter of personal preference I don't use rust analyzer or anything like that, so it didn't occur to me that we even have a problem here. I suspect that maybe some of the errors are related to us using I'm going to reopen this for now, when I find some time I'd like to play around with vscode and see what all the errors look like, and see if there's anything we can do to make it better (either in uefi-rs directly, or issues in rust-analyzer we can link to, or maybe instructions for how to configure the tools to understand this project better...) |
Finally got around to taking a look at this. I don't have much in the way of solutions, but here are some notes for future travelers: For my test case, I started with the template app. I made a copy of that directory and loaded it into vscode with the rust-analyzer extension installed. The first error I ran into is that rust-analyzer wouldn't run at all due to [build]
target = "x86_64-unknown-uefi" Or, for a solution scoped just to vscode, adding this to the project's {
"rust-analyzer.cargo.target": "x86_64-unknown-uefi"
} The next error I saw was {
"rust-analyzer.checkOnSave.allTargets": false
} With that change rust-analyzer seems to be working; hovering over types and such gives doc tooltips, and making an intentional mistake such as typing I'm not sure how best to fix running tests. I think ideally the tests would be run against the host target; we do that with That's as far as I got with this. I'll re-close the issue since I don't know if there's much more we can do. At least things should get a bit better if we get the UEFI targets to tier 2 so that |
any plans to make integration with e.g. vscode + rust analyzer better?
The text was updated successfully, but these errors were encountered: