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
feat(compat): version compatibility profiles for the Lua sandbox (#25)
* feat(compat): version compatibility profiles for the Lua sandbox
Emulate the Lua sandbox behavior of a chosen Redis/Valkey version. Only
three behaviors actually differ across Redis 6.2-8.x and Valkey:
- `print` global -> present only in Redis 6.2
- `os` library -> Redis 7.4+ / Valkey 8.0+
- `server` alias -> Valkey 8.0+ only (Redis keeps `redis`)
Modeled as three orthogonal flags (COMPAT_PRINT/OS/SERVER_ALIAS) passed as
a u8 bitmask via a new `set_compat()` WASM export, consumed by a shared
`setup_state()` (init/reset deduped). TS exposes `load({ profile, compat })`
where `profile` is a named preset over the version matrix and `compat`
overrides individual flags. Default (no profile) preserves prior behavior
(os + server alias, no print; ~ valkey 8.0).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
* refactor(compat): rename profiles to hyphenated names
Drop valkey-7.2 and valkey-8.1; add valkey-9.0. Profile set is now
redis-6.2, redis-7.0, redis-7.2, redis-7.4, redis-8.0, valkey-8.0,
valkey-9.0. valkey-9.0 mirrors valkey-8.0 (no known Lua sandbox delta).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments