| 1 | [package] |
| 2 | name = "feel-wasm" |
| 3 | description = "WASM (wasm-bindgen) wrapper around feel-core." |
| 4 | edition.workspace = true |
| 5 | version.workspace = true |
| 6 | license.workspace = true |
| 7 | |
| 8 | [lib] |
| 9 | crate-type = ["cdylib", "rlib"] |
| 10 | |
| 11 | [dependencies] |
| 12 | wasm-bindgen = "0.2" |
| 13 | serde-wasm-bindgen = "0.6" |
| 14 | serde = { version = "1", features = ["derive"] } |
| 15 | serde_json.workspace = true |
| 16 | # JS `Date` interop (ADR-18): detect `Date` in the context input and return |
| 17 | # date/date-and-time results as `Date` objects; also the `now()` clock source. |
| 18 | js-sys = "0.3" |
| 19 | # Build the `EvalEnv` instant from `Date.now()`; no tzdb needed here (the temporal |
| 20 | # value logic, and the optional tzdb bundle, live in feel-core). |
| 21 | jiff = { workspace = true, features = ["std"] } |
| 22 | # default-features = false drops feel-core's `rust-regex` provider (the whole |
| 23 | # regex-automata stack) AND the embedded IANA tzdb from the bundle; the regex |
| 24 | # builtins use the host JS `RegExp` engine, and temporal is offset-only by default |
| 25 | # (named zones -> null) (ADR-16/ADR-18). |
| 26 | feel-core = { path = "../feel-core", default-features = false } |
| 27 | |
| 28 | [features] |
| 29 | # Purist opt-in: re-bundle the Rust `regex` engine instead of the JS dialect, for |
| 30 | # byte-identical regex results across targets — at the regex stack's size cost. |
| 31 | xpath-regex = ["feel-core/rust-regex"] |
| 32 | # Opt-in: embed the IANA tzdb so named zones (`@Europe/Paris`) resolve in WASM, at |
| 33 | # ~466 KB of bundle. The default build is offset-only — `+02:00`/`Z` work, named |
| 34 | # zones evaluate to null (ADR-18). |
| 35 | iana-tz = ["feel-core/tzdb-bundle"] |