Sandboxed WebAssembly (WASM) modules for Neblex Integration Fabric. A module adds custom logic to an integration flow, such as parsing a file format or validating data, without running unreviewed code on your servers. Each module gets JSON in, returns JSON out, and cannot reach the network, the file system or anything else outside its own memory.
This repository has a starter template and ready-to-use modules, all written in Rust.
| Module | What it does | Size |
|---|---|---|
| email-parser | Parses a raw email into sender, recipients, subject, date, thread IDs, body and attachments, and separates the new reply from quoted history and the signature | about 145 KB |
| text-extractor | Finds emails, URLs, phone numbers, dates, amounts, IBANs, parcel tracking numbers and PO or invoice numbers in free text, with check digits verified | about 165 KB |
| pdf-to-json | Extracts the text and metadata from a text-based PDF passed as base64, including encrypted PDFs that open without a password | about 215 KB |
| json-repair | Turns almost-JSON from AI models (code fences, single quotes, trailing commas, cut-off output) into valid JSON and lists every fix | about 125 KB |
| html-to-text | Turns HTML emails, pages and rich-text fields into clean text or Markdown, keeping headings, lists, tables and links | about 105 KB |
| key-value-extractor | Pulls labeled values ("Invoice No:", "Total Due") and aligned tables out of document text, typed as numbers, amounts or dates | about 150 KB |
| ics-parser | Turns calendar invites and feeds (.ics) into events with organizer, attendees, times and time zones | about 115 KB |
| vcard-parser | Turns contact cards (.vcf, versions 2.1 to 4.0) into contacts with names, emails, phones and addresses | about 125 KB |
| user-agent-parser | Reads browser, OS, device type and engine from user-agent strings, and flags bots and HTTP libraries | about 100 KB |
| log-parser | Parses Apache/nginx access logs, syslog (RFC 3164 and 5424), key=value and JSON log lines into records | about 135 KB |
| text-chunker | Splits long text into overlapping chunks along headings, paragraphs and sentences, with stable IDs, ready to embed for retrieval (RAG) | about 100 KB |
| language-detector | Detects the language and script of tickets, emails and reviews (69 languages) with a confidence score, to route them without an AI call | about 350 KB |
| Module | What it does | Size |
|---|---|---|
| csv-cleaner | Reads messy CSV exports: detects the delimiter, header row and decimal style, skips title and totals rows, and reports rows it couldn't read | about 135 KB |
| xml-to-json | Converts XML (ERP messages, SOAP, exports) to JSON, optionally one record per repeating element with header fields copied on | about 160 KB |
| fixed-width-parser | Turns fixed-width text files (mainframe extracts, bank and legacy ERP files) into records, including header/detail/trailer lines, implied decimals and COBOL signed numbers | about 115 KB |
| fixed-width-writer | Writes records back out as a fixed-width file, using the same layout as the parser | about 165 KB |
| csv-writer | Writes records as CSV with any delimiter, decimal commas, chosen columns, a BOM for Excel, and formula-injection protection | about 120 KB |
| yaml-to-json | Converts YAML (config files, API specs, front matter) to JSON, including anchors, merge keys and files with several documents | about 255 KB |
| uom-converter | Converts quantities between units of measure and your own pack sizes (case, box, pallet), chained as needed | about 125 KB |
| gs1-barcode-parser | Splits GS1-128, DataMatrix and QR barcode scans into GTIN, batch, expiry, serial, weights and SSCC, with check digits verified | about 100 KB |
| sparkplug-b-decoder | Decodes Sparkplug B MQTT messages from PLC gateways and SCADA systems into metrics (all data types, aliases, DataSets, Templates) and encodes NCMD/DCMD commands | about 215 KB |
| parquet-reader | Reads Parquet files from data warehouses, data lakes and analytics tools (Snappy, Gzip, Zstandard, LZ4, Brotli) into records with column types, page by page | about 2.2 MB |
| parquet-writer | Writes records to a Parquet file with inferred or set column types (exact decimals, dates, timestamps), compressed with Snappy, Gzip, Zstandard, LZ4 or Brotli | about 2.3 MB |
| Module | What it does | Size |
|---|---|---|
| pii-redactor | Replaces emails, phone numbers, card numbers, SSNs, IBANs, IP addresses and names you list with placeholders before text reaches an AI model or a log | about 140 KB |
| jwt-decoder | Decodes JSON Web Tokens into header, claims and readable dates, and checks expiry against a time you pass in (it does not verify signatures) | about 95 KB |
| record-diff | Compares an incoming record with the stored version and returns only the changed fields, a patch and old/new values | about 120 KB |
| Module | What it does | Size |
|---|---|---|
| address-standardizer | Standardizes US and Canadian addresses USPS-style (suffixes, directions, units, states, ZIP and postal codes) and country names; formats, doesn't verify | about 125 KB |
| identifier-validator | Validates and normalizes IBANs, EU and UK VAT number formats, GTIN/EAN/UPC barcodes, US ABA routing numbers and LEIs on each record | about 105 KB |
| json-schema-validator | Checks records against a JSON Schema (drafts 4 to 2020-12, with formats) and lists every problem with its field, for data contracts on payloads and files | about 2.4 MB |
| phone-number | Validates phone numbers against each country's numbering plan and adds the country, type (mobile, landline, toll-free, VoIP), extension and E.164/national formats | about 2.0 MB |
| Module | What it does | Size |
|---|---|---|
| decision-table | Evaluates decision tables for pricing, discounts, approvals and routing, with first-match or collect-all rules; reads tables in the open JDM format | about 1.7 MB |
| spreadsheet-calc | Recalculates an .xlsx workbook (or sheets defined in JSON) with values from each record and returns the cells you name, so a pricing or commission spreadsheet runs as a flow step | about 2.9 MB |
| Module | What it does | Size |
|---|---|---|
| template | Minimal module to copy when writing your own | about 60 KB |
Each module works by rules, patterns, check digits or formulas, so results are repeatable and cost nothing per record. They handle predictable formats; route what they flag or can't read to an AI step or a person.
Built .wasm files for every module are attached to the latest release. Download the one you need and upload it to Neblex; no build tools are required. To change a module, build it from source as described below.
Release files are built by GitHub Actions from the tagged source, after the tests and a contract check pass, so you can confirm what you're running:
- Checksums: each release includes
SHA256SUMS. Check a download withsha256sum -c SHA256SUMS --ignore-missing(on macOS,shasum -a 256 -c SHA256SUMS --ignore-missing). - Build provenance: each file has a signed attestation linking it to the commit and workflow that built it. Verify it with the GitHub CLI:
gh attestation verify email-parser.wasm --repo neblexhq/neblex-wasm-modules. - Reproducible builds: release files are built on x86-64 Linux with build paths mapped to fixed names.
./build.shuses the same settings (in an x86-64 container, emulated on other machines such as Apple silicon Macs), so building a tagged version with the Rust version named in its release notes gives files byte-identical to the release. Compare them withSHA256SUMS.
Integration flows often need one step that no built-in step covers: a niche file format, a checksum, an industry rule. Running that as ordinary code means trusting it with whatever the runtime can reach. A WASM module is different:
- It has no imports, so it has no way to open a socket, read a file or call the host. It can only transform the JSON it receives.
- The runtime limits its memory, compute and run time.
- The same
.wasmfile runs in the Neblex cloud and on the on-premises runtime, so records from internal systems can be processed inside your network.
Neblex adopts modules from this repository as built-in steps when they prove widely useful or customers ask for them. A built-in step has the full Neblex step UI and is supported through your Neblex subscription.
The module stays here as open source. Use it when you need behavior the built-in step doesn't have: fork it, change the rules, build it with ./build.sh and upload your version under its own name. It runs in the same sandbox as every module, with no network, file or host access, so changing the code doesn't change what it can reach. Where a module has a built-in counterpart, its README says so and explains when the module is the better choice.
We help with the modules on a best-effort basis. To report a problem, suggest a module, or ask for one to become a built-in step, open an issue. Contributions are welcome; see CONTRIBUTING.md.
A Neblex module is a core WebAssembly module (not a component) that:
- has no imports (build for
wasm32-unknown-unknown, not WASI); - exports
memory; - exports
alloc(len: i32) -> i32, which returns a pointer tolenfree bytes; - exports
invoke(ptr: i32, len: i32) -> i64, which reads the input JSON atptr, writes the output JSON to memory and returns(out_ptr << 32) | out_len.
The input is the step's JSON (one record or an array of records). The output must be valid JSON. The modules here pass each record through and add their results as new fields, so later steps in the flow can filter or route on them.
Neblex accepts modules up to at least 3 MB, so there is room for a library when it does the job better than hand-written code. Smaller modules start faster, so leave out crates and features you don't use. Most modules here are 60 to 260 KB; decision-table, json-schema-validator and spreadsheet-calc carry a full engine and are 1.5 to 3 MB. A few crates they use expect a browser, so vendor holds copies patched to need nothing from the host.
You need Docker. No local Rust install is required.
./build.sh # all modules
./build.sh identifier-validator # one moduleThe .wasm files land in dist/. Builds always run as x86-64 Linux, so a local build is byte-identical to the release file. On Apple Silicon and other ARM machines Docker emulates x86-64, which makes builds slower.
test/call.py calls a module exactly the way the runtime does: alloc, write the input, invoke, read the output. It runs in a Python container, so you don't need Python installed.
docker run --rm -v "$PWD":/w -w /w python:3.12-slim sh -c \
'pip install -q wasmtime && python test/call.py dist/identifier-validator.wasm "{\"iban\": \"DE89 3704 0044 0532 0130 00\"}"'- In Neblex, open Custom Integrations and choose Add Sandboxed Module.
- Give it a name (we use the folder name, such as
email-parser) and upload the.wasmfile fromdist/. Neblex validates the module before saving it. - In a flow, add the module like any integration and choose its Run module operation. It needs no connection. Map the fields it should receive, including any
_optionsor_layout, in the step's input; each module'stest/sample.jsonshows a complete input.
To change a module, fork this repository, edit the module's src/lib.rs, run its tests (cargo test --lib in the module folder) and build it with ./build.sh <module>. Upload it to Neblex under a name of your own, such as acme-pii-redactor, so it isn't mistaken for the published version. The checksums and build attestations in our releases cover only our own files.
To write a new module, copy template/, rename the package in Cargo.toml, and replace the transform function in src/lib.rs. Use serde_json for input and output, and return an error as JSON (for example {"ok": false, "error": "..."}) instead of panicking.
- WebAssembly for AI agents and workflows (blog post with a worked example: a supplier invoice email through five modules)
- Neblex Integration Fabric
- Capabilities
- Reusable Rhai functions: for lighter custom logic, a Rhai script in a Code step is quicker to write than a module
- Neblex MCP server
MIT. See LICENSE.