Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
cdsl
have a functiongenerate_ui
reconfix
does usecdsl
as a dependency, thisgenerate_ui
fn is in thereconfix
bindings as well, which is something I do not wantgenerate_ui
in thereconfix
, it doesn't compile, because linker complaints about two functions with the same nameIn other words. If
cdsl
is used to generatebalena-cdsl
NPM package, it's good as it is now. But if you'd like to usecdsl
as a dependency and you do not want to havecdsl
JS bindings in your NPM package (likereconfix
), there's no way.What this PR does
disable-wasm-bindings
wasm.rs
is gated with target archwasm32
¬(feature = "disable-wasm-bindings"))
By default, nothing changes. But for the
reconfix
I can say something like - I'd like to usecdsl
, but withoutcdsl
JS bindings.Feature name
Initially, I was thinking about a feature called
npm-package
and build scripts update. I have found thatwasm-pack build
does support-- --features "npm-package"
(added to 0.6). Unfortunately,wasm-pack test
doesn't. Thus it must be enabled by default and we have to introduce disabling feature. Then thedisable-wasm-bindings
it is.