inbuxa Admin's Debug button on a Sieve script sent the script to an outside playground. Its interpreter only knows upstream's extension names, so any script that requires vnd.inbuxa.expressions or vnd.inbuxa.while failed to compile there. This adds our own playground, built from this repository's interpreter, for the console to ship. The admin side is in a companion inbuxa-admin PR.
What it is:tools/sieve-playground, ported from the playground in the upstream sieve-rs repository's web/ directory (commit 549a2d57f7, written for sieve-rs 1.x) to the vendored 0.7.3 the server runs.
Same interpreter:vendor/sieve-rs by path, with the vnd.inbuxa.* names. run.rs/handler.rs drive 0.7's event loop the way delivery does: the script carries on after a runtime error, and llm_prompt compiles and answers false, as a server without a model does.
Same functions: the server's own crates/common/src/scripts/functions modules are included by path. Tests fail if the function list, ApplyString or the six functions copied from misc.rs/unicode.rs (the rest of those files needs server-only crates) stop matching.
WASI, not wasm-bindgen: sieve-rs 0.7 and mail-builder call SystemTime::now(), which panics on wasm32-unknown-unknown. On wasm32-wasip1 they ask the host instead; the page's worker answers the six WASI calls and gives the clock the playground's current-time setting, so currentdate and a vacation reply's Date follow it. shim/gethostname stands in for a crate with no WASI build. Nothing in vendor/ or crates/ changes.
No upstream names on the page or in the samples; storage keys are renamed too. 0.7 has no instruction counter or memory limit, so the page shows neither.
Checked
cargo test in the crate: 14 pass, including every sample and the parity tests.
Every sample run through the wasm in Node with a fixed clock (the Date headers follow it), and the built console opened in Chrome: no console errors.
Fork checks pass (name, notice, context, privacy, expr-schema, unit tests). The root workspace does not see the crate (it has its own [workspace]), so CI is unchanged.
build.sh --admin <dir> stages the build into an inbuxa-admin checkout. When vendor/sieve-rs or the function modules change, rebuild and commit it there.
inbuxa Admin's **Debug** button on a Sieve script sent the script to an outside playground. Its interpreter only knows upstream's extension names, so any script that requires `vnd.inbuxa.expressions` or `vnd.inbuxa.while` failed to compile there. This adds our own playground, built from this repository's interpreter, for the console to ship. The admin side is in a companion inbuxa-admin PR.
**What it is:** `tools/sieve-playground`, ported from the playground in the upstream sieve-rs repository's `web/` directory (commit `549a2d57f7`, written for sieve-rs 1.x) to the vendored **0.7.3** the server runs.
- **Same interpreter:** `vendor/sieve-rs` by path, with the `vnd.inbuxa.*` names. `run.rs`/`handler.rs` drive 0.7's event loop the way delivery does: the script carries on after a runtime error, and `llm_prompt` compiles and answers `false`, as a server without a model does.
- **Same functions:** the server's own `crates/common/src/scripts/functions` modules are included by path. Tests fail if the function list, `ApplyString` or the six functions copied from `misc.rs`/`unicode.rs` (the rest of those files needs server-only crates) stop matching.
- **WASI, not wasm-bindgen:** sieve-rs 0.7 and mail-builder call `SystemTime::now()`, which panics on `wasm32-unknown-unknown`. On `wasm32-wasip1` they ask the host instead; the page's worker answers the six WASI calls and gives the clock the playground's current-time setting, so `currentdate` and a vacation reply's `Date` follow it. `shim/gethostname` stands in for a crate with no WASI build. **Nothing in `vendor/` or `crates/` changes.**
- **No upstream names** on the page or in the samples; storage keys are renamed too. 0.7 has no instruction counter or memory limit, so the page shows neither.
**Checked**
- `cargo test` in the crate: 14 pass, including every sample and the parity tests.
- Every sample run through the wasm in Node with a fixed clock (the `Date` headers follow it), and the built console opened in Chrome: no console errors.
- Fork checks pass (name, notice, context, privacy, expr-schema, unit tests). The root workspace does not see the crate (it has its own `[workspace]`), so CI is unchanged.
`build.sh --admin <dir>` stages the build into an inbuxa-admin checkout. When `vendor/sieve-rs` or the function modules change, rebuild and commit it there.
tools/sieve-playground builds the vendored sieve-rs 0.7.3 (vnd.inbuxa.*
names included) to WebAssembly, with a static page around it, for inbuxa
Admin's Debug button on a Sieve script: until now that button sent the
script to an outside site whose interpreter knows only upstream's
extension names, so any script that requires vnd.inbuxa.* failed to
compile there.
Ported from the playground in the upstream sieve-rs repository's web/
directory (commit 549a2d57f7), which targets sieve-rs 1.x:
- run.rs and handler.rs drive 0.7's event loop the way the server's
delivery does, carrying on after a runtime error; llm_prompt compiles
and answers false, as on a server without a model.
- The expression functions are the server's own modules, included by
path; tests fail if the list, ApplyString or the few functions copied
from misc.rs/unicode.rs stop matching crates/common.
- Built for wasm32-wasip1 rather than with wasm-bindgen: sieve-rs and
mail-builder read the clock, which panics on wasm32-unknown-unknown.
The page's worker answers the six WASI calls, giving the module the
playground's current-time setting. shim/gethostname stands in for a
crate with no WASI build. Nothing in vendor/ or crates/ changes.
- The page carries no upstream names or links; storage keys and the
samples are renamed to match.
build.sh --admin <dir> stages the result into an inbuxa-admin checkout.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
inbuxa Admin's Debug button on a Sieve script sent the script to an outside playground. Its interpreter only knows upstream's extension names, so any script that requires
vnd.inbuxa.expressionsorvnd.inbuxa.whilefailed to compile there. This adds our own playground, built from this repository's interpreter, for the console to ship. The admin side is in a companion inbuxa-admin PR.What it is:
tools/sieve-playground, ported from the playground in the upstream sieve-rs repository'sweb/directory (commit549a2d57f7, written for sieve-rs 1.x) to the vendored 0.7.3 the server runs.vendor/sieve-rsby path, with thevnd.inbuxa.*names.run.rs/handler.rsdrive 0.7's event loop the way delivery does: the script carries on after a runtime error, andllm_promptcompiles and answersfalse, as a server without a model does.crates/common/src/scripts/functionsmodules are included by path. Tests fail if the function list,ApplyStringor the six functions copied frommisc.rs/unicode.rs(the rest of those files needs server-only crates) stop matching.SystemTime::now(), which panics onwasm32-unknown-unknown. Onwasm32-wasip1they ask the host instead; the page's worker answers the six WASI calls and gives the clock the playground's current-time setting, socurrentdateand a vacation reply'sDatefollow it.shim/gethostnamestands in for a crate with no WASI build. Nothing invendor/orcrates/changes.Checked
cargo testin the crate: 14 pass, including every sample and the parity tests.Dateheaders follow it), and the built console opened in Chrome: no console errors.[workspace]), so CI is unchanged.build.sh --admin <dir>stages the build into an inbuxa-admin checkout. Whenvendor/sieve-rsor the function modules change, rebuild and commit it there.