-
Notifications
You must be signed in to change notification settings - Fork 420
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
In-tree crate built-in.rlib support? #1091
Comments
Yeah, that's me. :) Thanks for Reply I will discuss this in zulip :) |
I think maybe adding a %.rlib compilation rule in the Makefile.build and automatically generate externs is enough to do the job.
Kbuild will just search the foo/lib.rs and use rustc to finish the compilation and also generate flags to append to the rust_cmd in the Makefile.build so that rustc will use flags when doing module-specific works. And in linking stage, the ld will also include the rlib files correspondingly. Fo in-tree module, it should be enough. |
Hello, everyone. So recently i've been working on a possible rewrite of a filesystem module in rust. I'm already implemented a small and thin core-only crate (which is also used for userspace progs) and i want to embed it into kernel tree . Given the current status of vfs, the code only provides some ffi hooks to the original C implementations before the virtual filesystem abstraction is ready to be merged. But i have some problems here.
generate_rust_analyzer.py
, the code only provides only minimal deps configs for kernel/core/alloc crate and does not respect the KBuild/Makefile if i want to introduce some module-local crates that also depends on kernel crate there. I've looked through Third-party crates support:proc-macro2
,quote
,syn
,serde
andserde_derive
#1007 which seems to introduce those crates kernel-wide, however i want to keep it module-local. So maybe we need some enhancements on this part too?Any help or replies are much appreciated! Thanks!
The text was updated successfully, but these errors were encountered: