Description
I have two crates - reconfix
and cdsl
. The former one depends on the later one:
reconfix
|- cdsl
cdsl
crate can be used as a Rust crate and it also contains bindings gated via cfg(target_arch = "wasm32")
. NPM package with proper bindings can be generated.
Now I have a reconfix
crate, which does use cdsl
as a dependency. But when I generate bindings for the reconfix
crate, all bindings (JS functions) from the cdsl
crate are in the reconfix
bindings as well.
Example:
cdsl
contains JS functiongenerate_ui
reconfix
hascdsl
as a dependencyreconfix
does not contain JS functiongenerate_ui
- create NPM package / generate bindings and
reconfix
does containgenerate_ui
function, which is something I do not want, it behaves like implicitpub use ...
reexports
Is there a way how to disable this behavior? For now, I introduced disable-wasm-bindings
feature in the cdsl
crate. But it's nothing I like or I consider as a good solution. What's the recommended way? Should I split cdsl
in two crates, like cdsl
(without wasm bindings) and cdsl-wasm
crate, which will act as a bridge between Rust & JS only?