---
title: "Discussion on \"Parse untrusted files with WebAssembly modules that have zero imports\" | Hashnode"
description: "Discussion on \"Parse untrusted files with WebAssembly modules that have zero imports\". Parse email threads, invoice text and mainframe files with open-source WebAssembly modules that have no imports: no network, files or clock."
url: "https://hashnode.com/posts/parse-untrusted-files-with-webassembly-modules-that-have-zero-imports/6b1090fb292425f497f4bea0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Parse untrusted files with WebAssembly modules that have zero imports](https://apotyondy.hashnode.dev/parse-untrusted-files-with-webassembly-modules-that-have-zero-imports?utm_source=hashnode&utm_medium=feed)

Parse email threads, invoice text and mainframe files with open-source WebAssembly modules that have no imports: no network, files or clock.

1d ago · 6 min read · apotyondy.hashnode.dev  
Read the article

-   [#webassembly](https://hashnode.com/tag/webassembly)
-   [#rust](https://hashnode.com/tag/rust)
-   [#opensource](https://hashnode.com/tag/opensource)
-   [#ai](https://hashnode.com/tag/ai)
-   [#security](https://hashnode.com/tag/security)

## Written by

[Adan Potyondy](https://hashnode.com/@apotyondy)

@apotyondy · Austin, USA

  
[View profile](https://hashnode.com/@apotyondy)

Co-founder of Neblex. Writing about workflow orchestration, AI agents, data quality and hybrid integration.

I'm a co-founder of Neblex, an integration and automation platform that runs workflows and agents in the cloud or on-premise. Flows can check and clean data as it moves, and AI agents can build and run them alongside people. I write about workflow orchestration, AI agents, data quality and hybrid integration: what works, what breaks, and what it really costs to run. I share the numbers and how we got them, so you can test them on your own systems. If your results differ, I want to hear about it. Happy to talk integration, data pipelines or agents. Find me at neblex.com.

## Responses 2

Markdown supported · ⌘↵ to post

[Adan Potyondy](https://hashnode.com/@apotyondy)

[1d ago](https://hashnode.com/posts/parse-untrusted-files-with-webassembly-modules-that-have-zero-imports/6b1090fb292425f497f4bea0/comment/6b118809a3f72706179ba386)

The overhead is real, because the modules take JSON in and return JSON out: the whole input is copied into linear memory, then parsed and serialized there.

I just measured two of them in Node, with a fresh instance per call:

-   email-parser, 10 MB email with an attachment: about 72 MB of linear memory, or 92 MB if you return the attachment as base64
-   csv-cleaner, 10 MB CSV with short rows: about 227 MB, because every cell becomes a JSON value

It grew roughly in line with input size from 1 to 25 MB. Linear memory doesn't shrink, so I'd use a fresh instance per file and drop it afterward. For big CSVs, split the file into chunks first and repeat the header in each one.

These modules work best for documents and messages. For very large files, a streaming parser is the better tool.

[Eagle](https://hashnode.com/@eagle2000)

[1d ago](https://hashnode.com/posts/parse-untrusted-files-with-webassembly-modules-that-have-zero-imports/6b1090fb292425f497f4bea0/comment/6b11822f6c82fad6b75ea24c)

Zero-import Wasm for untrusted files is a great idea. How's the memory overhead when passing larger files into linear memory?
