Skip to content

Actions and the WASM Runtime

All custom logic on the Simple Platform is packaged as an Action. An Action is a self-contained, reusable unit of code written in a standard language like Go or TypeScript that performs a specific business task.

Introduction to Actions

Think of an Action as a serverless function, but with superpowers. It can:

  • Read and modify form data.
  • Perform complex calculations and validations.
  • Query the database via the secure GraphQL API.
  • Call other platform services (e.g., to send a notification).
  • Call other Actions (e.g., workflows).

Every Action is compiled to a WebAssembly (WASM) module before being deployed. This is a deliberate architectural choice that provides three key advantages: security, performance, and portability.

Secure Sandboxing with WebAssembly

Security is paramount in an enterprise system. The WASM runtime provides a mathematically provable, cryptographically secure sandbox for executing your code.

  • Memory Isolation: An Action's memory is completely isolated from the host runtime and from other Actions. It cannot access any data or system resources it has not been explicitly granted.
  • Capability-Based Security: Actions have no default capabilities. They cannot make network requests, access the filesystem, or query the database unless the host explicitly provides those functions through a secure interface (the SDKs).
  • No System-Level Access: WASM code cannot make arbitrary system calls, eliminating a vast class of potential security vulnerabilities.

Benefit: Uncompromising Security

By executing all custom logic within a WASM sandbox, the Simple Platform ensures that even user-provided code can never compromise the integrity or security of the core system or other tenants.

Near-Native Performance

WASM is a binary instruction format designed for efficient execution. Unlike interpreted languages, it is compiled ahead-of-time and runs at near-native speed. This makes it ideal for performance-critical business logic, ensuring that your custom validations and calculations never become a bottleneck.

Language Portability

WASM is a compilation target for a growing number of languages. The Simple Platform provides first-class SDKs for Go and TypeScript, with Python support in active development. This allows your teams to build on the platform using the languages and tools they already know and love.

Next Step

Discover the most powerful feature of the Logic Runtime: its ability to run the same code on both the client and the server.

Write Once, Run Anywhere