clarkmcc/cel-rust

Support non wasm-bindgen targets…

Closed this issue · 3 comments

Currently the dependency to chrono enables all default features… which includes wasmbind. As far as I can tell tho, only alloc is really required. When you target a wasm runtime that's not the browser, chances are high some bindings won't be available and mostly not needed (i.e. no Javascript).

"Simple fix" is to chrono = { version= "0.4.26", default-features = false, features = ["alloc"] } only depends on what's needed. But I could also see a wasm/wasi feature here that'd do the appropriate… wdyt? What sounds better limit to what's needed? Or introduce a "wasm profile", have possibly wasmbind as a default feature, but then now becomes "disablable" by users (which would map to what chrono does)? I can create the PR, no worries!

For anybody running in the same issue, the error reported by the wasm runtime on loading the module would be something along the lines of:

Error: failed to acquire "__wbindgen_describe"

@clarkmcc Do you think this could warrant a patch release?
Maybe, tho I also understand it is an annoying thing to maintain, but do you think adding milestones would be a way to convey some (if only highlevel) overview of what you are aiming for for future releases...?

@alexsnaps sure, I can get a patch release out today, no problem.

Milestones are a great idea, I'll look into writing some up.