You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Apart from the default kernel/core/alloc cfg provided in rust/Makefile, can i specify my own extra cfgs for rustc so that my in-kernel rust driver source can find the crate i introduce?
Are there any built-in rlib recipes so that i can designate a lib.rs and produce a rlib file and then make it to the linking stage?
It seems that in the current implementation of 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 and serde_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?
forfolderinextra_dirs:
forpathinfolder.rglob("*.rs"):
logging.info("Checking %s", path)
name=path.name.replace(".rs", "")
# Skip those that are not crate roots.ifnotis_root_crate(path.parent/"Makefile", name) and \
notis_root_crate(path.parent/"Kbuild", name):
continuelogging.info("Adding %s", name)
append_crate(
name,
path,
["core", "alloc", "kernel"],
cfg=cfg,
)
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,serdeandserde_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!