You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if there was a native_wasm_bindgen feature that made this crate use the JS RegExp constructor via wasm_bindgen, instead of shipping a whole regex library to the browser.
Would you be willing to accept a new feature on this crate that accomplished this? Or is it out of scope @BurntSushi
The text was updated successfully, but these errors were encountered:
samdenty
changed the title
native-wasm-bindgen feature to use native JS regexp & reduce WASM bundle sizenative_wasm_bindgen feature to use native JS regexp & reduce WASM bundle size
Jan 8, 2023
Sorry, just to make sure I understand here, you're suggesting adding a feature that completely disables the regex engine and instead just defers to JS regexes but with the same API as this crate?
That's a total non-starter. It's not even just a matter of scope, but it's just completely inappropriate as far as I can tell. JS regexes have very different semantics than the regex crate. There's a lot of overlap, but also a fair bit of difference as well. Chief among them is that you cannot guarantee that they run in linear time.
I think it would be better if you popped up a level and focused on the actual problem at hand. Probably the solution to that problem is outside of this crate. Perhaps making a wrapping API that does the switching for you automatically. Or something else. I don't know.
I saw this mentioned here - #913 (comment), but it doesn't look like it got far.
Also, I don't think what you're proposing was mentioned in that comment. That comment is talking about const regexes. I don't think any point in that conversation suggested replacing the regex crate internals with the actual JS regexp engine in any case.
Describe your feature request
It would be nice if there was a
native_wasm_bindgen
feature that made this crate use the JSRegExp
constructor via wasm_bindgen, instead of shipping a whole regex library to the browser.I saw sometime simliar mentioned here - #913 (comment)
Would you be willing to accept a new feature on this crate that accomplished this? Or is it out of scope @BurntSushi
The text was updated successfully, but these errors were encountered: