Problem
CustomModulesConfig accepts per-language module lists for python, node, ruby, php, elixir, wasm, ffi, go, java, csharp, and r, but only six backends consume it (pyo3, ffi, php, magnus, rustler, extendr). Entries under wasm, node, go, java, or csharp parse cleanly and do nothing. The wasm config doc makes this worse: the custom_rust_modules doc comment in src/core/config/languages/wasm.rs describes itself as "Separate from [custom_modules].wasm which only adds TypeScript export * re-exports", but no code path reads custom_modules for wasm at all.
Concretely in kreuzberg: the contributor in xberg-io/xberg#1253 declared custom_modules = ["bridge", "engine"] under [crates.wasm] expecting their hand-written modules to survive regeneration, saw no effect, concluded alef had no preservation mechanism, and committed a post-regen patch script to re-insert the module declarations after every generate. The knob that actually works for wasm, custom_rust_modules, was only found by reading alef source, and the same confusion made it into review comments on that PR.
Solution
Two parts. Emit a warning during generate when custom_modules contains entries for a language whose backend does not consume them, naming the language and, for wasm, pointing at custom_rust_modules. And correct the custom_rust_modules doc comment so it stops describing [custom_modules].wasm behavior that does not exist.
Problem
CustomModulesConfigaccepts per-language module lists for python, node, ruby, php, elixir, wasm, ffi, go, java, csharp, and r, but only six backends consume it (pyo3, ffi, php, magnus, rustler, extendr). Entries underwasm,node,go,java, orcsharpparse cleanly and do nothing. The wasm config doc makes this worse: thecustom_rust_modulesdoc comment insrc/core/config/languages/wasm.rsdescribes itself as "Separate from[custom_modules].wasmwhich only adds TypeScriptexport *re-exports", but no code path readscustom_modulesfor wasm at all.Concretely in kreuzberg: the contributor in xberg-io/xberg#1253 declared
custom_modules = ["bridge", "engine"]under[crates.wasm]expecting their hand-written modules to survive regeneration, saw no effect, concluded alef had no preservation mechanism, and committed a post-regen patch script to re-insert the module declarations after every generate. The knob that actually works for wasm,custom_rust_modules, was only found by reading alef source, and the same confusion made it into review comments on that PR.Solution
Two parts. Emit a warning during generate when
custom_modulescontains entries for a language whose backend does not consume them, naming the language and, for wasm, pointing atcustom_rust_modules. And correct thecustom_rust_modulesdoc comment so it stops describing[custom_modules].wasmbehavior that does not exist.