Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

scripts: generate_rust_analyzer: Add ffi crate

Commit d072acda4862 ("rust: use custom FFI integer types") did not
update rust-analyzer to include the new crate.

To enable rust-analyzer support for these custom ffi types, add the
`ffi` crate as a dependency to the `bindings`, `uapi` and `kernel`
crates, which all directly depend on it.

Fixes: d072acda4862 ("rust: use custom FFI integer types")
Signed-off-by: Lukas Fischer <kernel@o1oo11oo.de>
Reviewed-by: Tamir Duberstein <tamird@gmail.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250404125150.85783-2-kernel@o1oo11oo.de
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>

authored by

Lukas Fischer and committed by
Miguel Ojeda
05a2b001 0af2f6be

+9 -3
+9 -3
scripts/generate_rust_analyzer.py
··· 112 112 cfg=["kernel"], 113 113 ) 114 114 115 + append_crate( 116 + "ffi", 117 + srctree / "rust" / "ffi.rs", 118 + ["core", "compiler_builtins"], 119 + ) 120 + 115 121 def append_crate_with_generated( 116 122 display_name, 117 123 deps, ··· 137 131 "exclude_dirs": [], 138 132 } 139 133 140 - append_crate_with_generated("bindings", ["core"]) 141 - append_crate_with_generated("uapi", ["core"]) 142 - append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "bindings", "uapi"]) 134 + append_crate_with_generated("bindings", ["core", "ffi"]) 135 + append_crate_with_generated("uapi", ["core", "ffi"]) 136 + append_crate_with_generated("kernel", ["core", "macros", "build_error", "pin_init", "ffi", "bindings", "uapi"]) 143 137 144 138 def is_root_crate(build_file, target): 145 139 try: