Skip to main content

WebAssembly - the next stage of vPLCs?

· 6 min read
Moritz Walker
Research Assistant @ ISW Uni Stuttgart
Marc Fischer
Research Assistant @ ISW Uni Stuttgart

Modular and portable control software is becoming a key enabler for flexible production systems in industrial automation. Our WebAssembly-based approach provides a common abstraction for real-time and non real-time control modules through a lightweight, sandboxed execution environment. Think containerization, but fine-grained and real-time. This article dives into some of the underlying concepts. So-called isolated WASM modules, combined with real-time scheduling and low-latency communication, allow to build systems', which achieve secure, highly portable, and resource-efficient control software.

WebAssembly in Industrial Automation: Advancing Portable Control Software

In today’s automotive and industrial production environments, flexibility and adaptability of production systems are no longer optional—they are essential. Manufacturers face increasing pressure to implement production systems that are modular, portable, and resilient. Achieving this requires a continuous and seamless approach to software development, testing, deployment, and operation. At the heart of this evolution lies continuous software engineering (SE), which ensures that software changes propagate smoothly from development to operation without interruptions.

For control systems, this means moving away from monolithic designs toward modular, independently deployable software components that can be tested, updated, and reused across different platforms.

The Challenge with Current Control Systems

Modern control systems, such as programmable logic controllers (PLCs), already include some modularity through libraries. However, they are often developed as monolithic solutions, tightly coupled to a single manufacturer’s platform. This approach introduces multiple challenges for modern industrial needs. Deployment is typically coarse-grained: VMs or containerized environments can only deliver entire PLC runtime environments, preventing fine-grained updates and limiting flexibility. Additionally, modules share memory and resources, so a malfunctioning component can compromise the entire system. Finally, these solutions are usually tied to specific hardware, operating systems, and vendor ecosystems, which reduces portability and limits adaptability.

Traditional virtualization methods address some of these issues but fall short when it comes to true modularity, isolation, and cross-platform portability. A new approach is required to meet the demands of modern production systems and the real-time requirements of industrial automation.

Introducing WebAssembly (WASM)

Our industrial case study investigates WebAssembly (WASM) as a platform for highly modular, portable, and isolated control software. WASM was originally designed for IT applications, but it offers features that directly address many limitations of current virtualization approaches.

WASM modules run in a sandboxed environment, providing strong isolation and reducing potential attack surfaces. They are platform-independent, allowing the same binary to run unmodified across different operating systems and architectures, from x86 and ARM to embedded controllers. Additionally, WASM’s lightweight runtime enables fast startup and low resource consumption, making it suitable for real-time industrial systems.

Comparison of virtualization technologies for control applications

Figure 1: Comparison of virtualization technologies for control applications and the WASM-based approach.

Comparison of virtualization technologies for control applications and the WASM-based approach.

Figure 2: Table with comparison of virtualization technologies for control applications and the WASM-based approach.

Despite these advantages, WASM was not designed for industrial real-time control, which requires deterministic execution, precise communication, and field-level integration. Our case study focuses on adapting WASM to meet these rigorous demands.

Case Study Goals and Approach

The goal of our case study is to research, prototype, and validate portable, isolated control modules using WASM. To achieve this, we focus on several key areas (c.f. Figure 4):

Project workflow and target objectives

Figure 4: Project workflow and target objectives.

Real-Time Execution of WASM Modules

The first challenge is enabling real-time execution. We are developing a scheduling and execution model that allows WASM modules to run on Linux real-time threads, ensuring deterministic behavior even under strict timing requirements. For this, the open-source PLC OpenPLC is extended to compile function blocks into WASM bytecode, creating a modular software foundation for industrial control logic.

Real-Time Communication Between Modules

Control modules must communicate reliably, both within the same sandbox and across isolated environments. Using the WASM Component Model, we describe module interfaces, data types, and dependencies in a platform-agnostic way. This approach supports low-latency, deterministic communication between modules, enabling the creation of complex control systems from independent components.

Interoperability with industrial standards such as IEC 61131 and OPC UA is achieved through a prototypical mapping, ensuring that existing PLCs and field devices can integrate seamlessly into the new modular system.

Integration with the Field Level

To connect WASM modules with real-world sensors, actuators, and other devices, we implement an EtherCAT master based on the WASM Component Model. This extends the WebAssembly System Interface (WASI) to support field-level communication, bridging virtualized modules with physical industrial hardware.

Quantifying WASM’s Industrial Potential

Finally, we evaluate the suitability of WASM for industrial control through benchmarking and testing. Key metrics include execution speed, module scalability, communication latency, jitter, resource consumption, and cross-platform portability. These tests help determine practical limits for the number of parallel modules, their interaction, and overall system performance. The next two figures show some of the study's results:

Boot speed comparison of WASM and Docker

Figure 2: WASM modules in WasmEdge-Embedded start up orders of magnitude faster than Docker containers (Image by ISW University of Stuttgart).

Module communication latency: Docker vs WASM (Image by ISW University of Stuttgart)

Figure 3: Module communication latency: Docker currently shows lower latency, highlighting areas for improvement in WASM communication (Image by ISW University of Stuttgart).

Final Remarks

This casy study investigated a new paradigm for deploying control applications in industrial automation. By combining isolation, portability, and lightweight execution, WASM-based modules promise:

  • Enhanced Security: Isolated modules prevent system-wide failures.
  • High Portability: Modules run on any platform, independent of vendor or hardware.
  • Resource Efficiency: Lightweight execution reduces CPU and memory usage.
  • Modularity and Flexibility: Fine-grained deployment enables faster updates, simpler testing, and easier scaling.

We proved, that a WASM-based modular real-time sytem is possible. Our approach paves the way for future adoption in automotive production and other industrial automation domains, providing a path toward safer, faster, and more adaptable control systems.

Let’s Build the Future of Real-Time Control Together

If you’re as excited about the potential of Containers, Virtualization, VMs and WebAssembly in industrial automation as we are, we’d love to connect. Join us in shaping the next generation of modular, portable, and secure control software. Reach out to our team to discuss collaboration opportunities, pilot projects, or integration scenarios — and help us bring real-time virtualization to the factory floor. Contact