lingua-rs icon indicating copy to clipboard operation
lingua-rs copied to clipboard

feature flag to disable wasm

Open zacharywhitley opened this issue 2 years ago • 2 comments

Oddly I had to add a feature flag to lingua-rs to disable wasm so that I could use it in a WebAssembly project. It was't actually disabling wasm as much as it's disabling the wasm-bindgen. I'm running it in a non-browser setting and the code generated from bindgen causes problems. Let me know if you'd like me to put in a PR. It was only a couple of minor changes.

zacharywhitley avatar Apr 24 '22 14:04 zacharywhitley

Hi Zachary, I thought that wasm-bindgen would just generate the JavaScript bindings. Does it modify the wasm file itself, too? What exactly are your problems?

And yes, please open a PR. I'm busy doing other stuff in the next days. Thank you.

pemistahl avatar Apr 27 '22 10:04 pemistahl

It brought in some dependencies on JSVar that I wouldn't have in my environment. I'll put together a PR. Thanks.

zacharywhitley avatar May 16 '22 21:05 zacharywhitley

@zacharywhitley Do you still plan to open a PR for this issue? If not, I will close it because it's not clear to me what your exact problems were with the current WASM implementation. Perhaps you want to clarify. Thanks.

pemistahl avatar Nov 05 '22 08:11 pemistahl