---
title: "WASM Procedures: Introduction"
---

# WASM Procedures: Introduction

:::caution[Planned design: not yet available in the server]
The current `heliosdb-full` server does not run WASM procedures. SQL that
would create or call one fails with SQLSTATE `0A000`. This page describes the
planned design for this upcoming feature. Only the [Go SDK](https://www.heliosdb.com/docs/full/guides/features/wasm_procedures_language_sdks/#go-sdk) is
published. Rust, JavaScript and Python examples are illustrations: no SDK
package exists for those languages. See the
[Quick Start](https://www.heliosdb.com/docs/full/guides/features/wasm_procedures_quick_start/) for what works today.
:::

**Part of**: [WASM Procedures User Guide](https://www.heliosdb.com/docs/full/guides/features/wasm_procedures_user_guide/)

---

## What are WASM Procedures?

HeliosDB WASM Procedures run stored procedures as WebAssembly (WASM) modules, which provides:

- **Polyglot Programming**: Write procedures in 4 languages (Rust, JavaScript/TypeScript, Python, Go)
- **High Performance**: 10x faster execution than traditional interpreted procedures
- **Complete Isolation**: 100% sandboxed execution with capability-based security
- **Universal Compatibility**: Run the same WASM module across any platform

## Why Polyglot Procedures?

Traditional database systems lock you into a single procedural language (PL/SQL, PL/pgSQL, T-SQL). HeliosDB breaks this limitation:

- **Choose the Right Tool**: Use Rust for high-performance computation, Python for data science, JavaScript for JSON processing, Go for concurrent operations
- **Leverage Existing Code**: Compile existing libraries to WASM and use them directly
- **Team Flexibility**: Different teams can use their preferred languages
- **Future-Proof**: WASM is a W3C standard supported by all major platforms

## Key Benefits

### 1. Performance: Sub-10ms Execution

```
Traditional PL/pgSQL:     ~50-100ms per call
WASM Procedure (Rust):    ~5-8ms per call
WASM Procedure (JS):      ~8-12ms per call
WASM Procedure (Python):  ~10-15ms per call
WASM Procedure (Go):      ~6-10ms per call
```

**Why so fast?**
- JIT compilation to native code
- Zero-copy memory access
- Instance pooling and reuse
- AOT compilation support

### 2. Security: Capability-Based Isolation

Every WASM procedure runs in a sandboxed environment with:
- **13 Capability Types**: Fine-grained permission control
- **Resource Limits**: CPU, memory, fuel metering
- **System Call Filtering**: Block dangerous operations
- **Network Isolation**: Optional network access

### 3. Portability: Write Once, Run Anywhere

WASM procedures are:
- Platform-independent (Linux, Windows, macOS)
- Architecture-agnostic (x86, ARM, RISC-V)
- Version-independent (binary compatibility)

---

**Navigation:**
- **Next**: [Quick Start](https://www.heliosdb.com/docs/full/guides/features/wasm_procedures_quick_start/)
- **Index**: [WASM Procedures User Guide](https://www.heliosdb.com/docs/full/guides/features/wasm_procedures_user_guide/)
