Skip to content

Add WASM code sandboxing in Go example with Monty-Go#85

Open
trevorprater wants to merge 2 commits intoe2b-dev:mainfrom
trevorprater:add-wasm-sandboxing-go
Open

Add WASM code sandboxing in Go example with Monty-Go#85
trevorprater wants to merge 2 commits intoe2b-dev:mainfrom
trevorprater:add-wasm-sandboxing-go

Conversation

@trevorprater
Copy link
Copy Markdown

Summary

Adds a new example demonstrating WASM-based Python code sandboxing in Go using Monty-Go.

This example is framed as complementary to E2B's container-based sandboxing:

  • E2B: Full OS environments for complex tasks (packages, filesystem, network)
  • Monty-Go: Sub-millisecond WASM sandboxes for lightweight, in-process Python execution

The example includes:

  • Comparison table of container vs WASM approaches with use cases for each
  • Python execution with resource limits (memory, duration, recursion depth)
  • Passing Go data into Python as inputs
  • Exposing Go functions to Python via external function callbacks

Monty-Go uses wazero (pure Go, zero CGO) to run a Python interpreter compiled to WebAssembly, so no containers, cloud services, or external dependencies are needed.

Files Added

  • examples/wasm-code-sandboxing-go/README.md
  • examples/wasm-code-sandboxing-go/main.go
  • examples/wasm-code-sandboxing-go/go.mod

Demonstrate WASM-based Python sandboxing as a complement to
container-based E2B sandboxes, using Monty-Go for sub-millisecond
in-process execution.
mishushakov added a commit that referenced this pull request Apr 15, 2026
* added proxy tunelling guide

* update item order

* daemonize

* added dedicated ip mention
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant