-
Notifications
You must be signed in to change notification settings - Fork 156
Large generated lib
file is unusable by development tools such as intellij-rust
#116
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
This was previously how svd2rust worked. It was changed (presumably) because it meant you'd have to reparse the svd for each peripheral. I think however an utility tool for splitting large .rs files into multiple files could be something to look into. |
I wrote such a utility: https://crates.io/crates/form |
@djmcgill the form utility is great! I just used it on s32k144 and it's great to be able to see the code in the github viewer. And also beeing able to use git diffs on an isolated part of the generated code is very usefull when verifying that the regenerated code still makes sense. Currently in the documentation |
@kjetilkjeka I'm glad you like it! I would recommend holding off on making it "official" until form has reached at least 1.0, its certainly not stable yet. |
@djmcgill I tried it on stm32f103xx -- works great, thanks a lot! P.S. Just make it official, that will make it stable really fast (after you get and fix all those thousands of issues like "why does it use |
Another annoyance caused by the huge |
Closing due to |
Due to the huge contiguous file size of the
lib.rs
generated output, intellij-rust (and possibly other development help tools) is unable to parse the library for intelligent completion support. I've been able to manually fix this by breaking top-level modules into their own files (you can see an example here), but this is a tedious process that involves fixing scopes by inserting newuse
statements manually, etc.I think it'd be helpful if svd2rust had an option to output top-level modules (or further, perhaps every module) to individual module files for easier navigation and completion.
The text was updated successfully, but these errors were encountered: