Wolfram Computation Meets Knowledge

Technologies ›

WSTP (Wolfram Symbolic Transfer Protocol)

Seamlessly communicates code, data, and more between programs

WSTP, long a core enabling component of Wolfram systems, is the native protocol for transferring Wolfram Language symbolic expressions between programs.

Running on a single computer or over a network, WSTP allows programs written both in Wolfram Language and other languages to efficiently exchange code, data or other symbolic expressions, with arbitrary structure.


Language Support

Richly featured libraries allow access to WSTP from a variety of languages.

C/C++

C/Link provides convenient native C support for communicating via WSTP, and requesting and consuming results of computations.

wstp.h: header file
libwstp, etc.: 32- and 64-bit libraries
wsprep : template-driven glue code generator
wscc : WSTP compiler driver

Java

J/Link provides high-level support for WSTP communication for Java programs.

With J/Link, Java classes and methods become immediately visible through WSTP in Wolfram Language programs.

.NET

.NET/Link provides high-level support for WSTP communication for .NET programs (in C#, VB.NET, etc.).

With .NET/Link, .NET types and methods become immediately visible through WSTP in Wolfram Language programs.

WOLFRAM LANGUAGE

Wolfram Language has built-in support for exchanging expressions and requesting computations through WSTP.

Rust

The wstp crate provides ergonomic and efficient Rust support for communicating via WSTP.

wstp: efficient bindings to WSTP
wolfram-library-link: efficiently call Rust libraries from Wolfram Language
wolfram-expr: represent Wolfram Language expressions in Rust

OTHER LANGUAGES

Full WSTP support is under development for other languages.

One-way connection to Wolfram Language is supported through HTTP in many languages, including PHP, Python, JavaScript, Visual Basic, Java, C#, C++ and Rust.

WSTP Services & Clients

WSTP is the key to enabling rich exchange between software components in the Wolfram technology universe.

WOLFRAM ENGINE

WSTP is the native communication protocol for the Wolfram Engine.

WSTPSERVER

WSTPServer makes available Wolfram Engines that communicate via WSTP.

WOLFRAM DESKTOP NOTEBOOK INTERFACE

The Wolfram Desktop Notebook Interface communicates with Wolfram Engine Kernels via WSTP, on both local and remote computers.

WOLFRAM LANGUAGE PARALLELISM FRAMEWORK

Within Wolfram Language, parallel computation is supported through WSTP connections between Wolfram Engine Kernels.

WOLFRAM CLOUD WSTP ENDPOINT

The Wolfram Cloud can expose a WSTP endpoint that allows communication via WSTP over the internet. URL structure: wstp://www.wolframcloud.com/...

WSTP-INSTALLABLE PROGRAMS

Using WSTP language libraries and utilities, programs in many languages can be set to communicate via WSTP.

WOLFRAM LIBRARYLINK

Wolfram LibraryLink allows you to create DLLs that load directly into a running Wolfram Engine, and can communicate via WSTP with the engine.

SYMBOLIC EXPRESSION EXCHANGE

WSTP can be used to transfer symbolic expressions between any pair of programs, even if neither of them is in Wolfram Language.

Technical Information

  1. WSTP is a two-way protocol (like XMPP, but unlike HTTP).
  2. WSTP is currently supported on Mac, Windows, Linux, iOS and Android.
  3. When applicable, WSTP is supported on both 32-bit and 64-bit systems.
  4. WSTP can run both locally and across a network.
  5. WSTP can use a variety of transport protocols and interprocess communication mechanisms, including TCP/IP, shared memory and Unix pipes.

Background

WSTP is the new name for the transfer protocol component of MathLink—the standard for interprogram communication used by Mathematica since 1990.

C/Link is the new name for the C language API component of MathLink.