HELICS provides official language bindings for Python, Julia, Java, MATLAB/Octave, C#, and Nim. All bindings wrap the stable C shared library API (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/GMLC-TDC/HELICS/llms.txt
Use this file to discover all available pages before exploring further.
helics.h) using each language’s native foreign function interface, so they expose the same functions as the C API with language-idiomatic naming and type conventions.
Choosing a language binding does not affect co-simulation behavior. A Python federate, a C++ federate, and a Julia federate can all participate in the same federation simultaneously because all communication passes through the core and broker layer, not between language runtimes.
How language bindings work
Every official binding loadslibhelics (the compiled C shared library) at runtime and maps C function names to the host language. The binding layer is thin: it translates language-native types (Python strings, Julia arrays, Java objects) to C primitives and passes them to the underlying library. Error handling is mapped from HelicsError structs to language-native exceptions where applicable.
This architecture means that the full C API is available from every language binding. Where a binding provides convenience wrappers or object-oriented classes, those map directly to underlying C functions.
Python (pyhelics)
pyhelics is the official Python binding. It wraps the C API usingctypes and cffi and exposes all functions with their original C names, prefixed as helics.*. A higher-level object-oriented interface is also available.
Installation
Basic example
Resources
- Full API documentation: python.helics.org
- Source repository: github.com/gmlc-tdc/pyhelics
Python complex numbers are returned natively from
helicsInputGetComplex() rather than as a two-element list. The same is true for Julia.Julia (HELICS.jl)
HELICS.jl wraps the C API using Julia’sLibdl and CBinding.jl infrastructure. It exposes all C functions with Julia naming conventions and provides Julia-native error handling.
Installation
Basic example
Resources
- API documentation: gmlc-tdc.github.io/HELICS.jl
- Source repository: github.com/gmlc-tdc/HELICS.jl
Java
The Java binding is generated using SWIG and provides a Java class hierarchy over the C API. It requires building HELICS with the Java interface enabled.Building with Java support
Basic example
MATLAB and Octave (matHELICS)
matHELICS provides HELICS bindings for both MATLAB and Octave. It exposes the full C API through MEX files and a+helics package namespace. The API is virtually identical to Python and Julia, including native complex number support.
Installation
The Octave interface requires Octave 8.3 or newer, which supports building with MEX files.
Basic example
Resources
- Source and binaries: github.com/gmlc-tdc/mathelics
- Inline documentation: source files
Simulink
A Simulink interface is available in the simHELICS repository. It is built using Simulink S-functions and provides a minimalistic interface for integrating HELICS with Simulink models.C# (experimental)
C# support is generated using SWIG with theHELICS_BUILD_CSHARP_INTERFACE=ON CMake option. On Windows, Visual Studio will generate the appropriate project files automatically after building.
Building with C# support
- pip install swig (cross-platform)
- Chocolatey (Windows)
Nim (experimental)
A Nim binding exists for HELICS but is experimental. Refer to the HELICS GitHub organization for the current status and repository location.Choosing a language binding
Python
Best for scripting, data science workflows, and rapid prototyping. Largest user community and most complete documentation.
Julia
Preferred for high-performance scientific computing and numerical simulations.
Java
Suitable for enterprise simulation frameworks and tools with existing Java codebases.
MATLAB/Octave
Required for integrating Simulink models or existing MATLAB simulation code.