All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.2.9 — 2023-10-07
- Support NULL bytes in strings sent via
Link::put_str()
. (#60)
- Update minimum supported Rust version (MSRV) to Rust 1.70. Remove dependency on once_cell. (#62)
0.2.8 — 2023-08-28
-
Change to always use pre-generated WSTP bindings. (#54)
Previously, wstp-sys would use bindgen at build time to generate bindings to the WSTP library. However, this was somewhat fragile. For example, if libclang is not available on the build machine, building would fail even if WSTP was otherwise available to be linked to.
Given that the wstp crate only exposes functionality from a minimum-targed WSTP version anyway, using pre-generated bindings for that specific version removes the need for bindgen at compile time (significantly reducing the dependency tree and compile times) while preserving the same functionality.
docs/Maintenance.md was updated with instructions on how the maintainer can manually generate bindings when wstp / wstp-sys need to be updated to support features available in newer WSTP releases.
-
Remove unused build dependency on
bindgen
(#56)
0.2.7 — 2023-02-03
-
Add logging support to
wstp-sys/build.rs
. (#49)wolfram-app-discovery v0.4.3 added support for logging via the Rust
log
logging facade library.wstp-sys/build.rs
uses wolfram-app-discovery to find a copy of the WSTP SDK.Logging messages from
wstp-sys/build.rs
can now be enabled by setting theRUST_LOG
environment to an appropriate value, as documented in theenv_logger
crate documentation. This can help debug discovery errors that occur during a build.
- Increase
wolfram-expr
dependency version to v0.1.4. (#49)
0.2.6 — 2023-01-06
This release fixes several causes of build failures on Linux.
-
Fix use of
i8
instead ofc_char
in variables bound to return values ofCStr::from_raw()
andCString::into_raw()
. (#45)c_char
is an alias fori8
on macOS, but it is an alias foru8
on Linux. -
Fix linker errors by setting missing
-luuid
linker flag inbuild.rs
on Linux. (#46)libwstp
depends on the Linuxlibuuid
library when targeting Linux.On Ubuntu,
libuuid
is provided by theuuid-dev
package. -
Fix broken automatic discovery of
wstp.h
andlibwstp
on Linux by updatingwolfram-app-discovery
dependency version. (#47)
0.2.5 — 2023-01-03
-
Add new
wstp::channel()
function, for conveniently creating two connectedLink
s. (#42) -
Added support for WSTP out-of-band urgent messages. (#43)
Add new
UrgentMessage
andUrgentMessageKind
types.Add new
Link
methods:
-
Fix issues with
WolframKernelProcess::launch()
(#42)-
Fix use of hard-coded linkname. Now a unique linkname is generated automatically.
-
Remove unnecessary background thread, fixing race condition between
Link::listen()
in the background thread and the link connection in the spawnedWolframKernel
process.
-
-
Fix examples in README.md and the crate root doc comment that exhibit the same mistake as
WolframKernelProcess::launch()
bugs mentioned above. (#42)
-
Remove redundant attrs on
Link::unchecked_ref_cast_mut()
(#41)Contributed by dtolnay.
0.2.4 – 2022-10-19
-
Fix
could not find `private` in `ref_cast`
compile errors that recently started occurring to due to changes to semver-exempt private items in theref-cast
dependency ofwstp
. (#39)Fortunately, the
ref-cast
crate recently gained a#[ref_cast_custom]
macro, which is the missing feature that had originally requiredwstp
to depend on private internal details ofref-cast
as a workaround.
0.2.3 – 2022-09-19
-
Mention
get_u8_array()
in theArray
type doc comment. (#36) -
Update
wolfram-app-discovery
dependency from 0.2.1 to v0.3.0, to take advantage of the improved flexiblity of new API functions tailored for use from build scripts. (#37)
0.2.2 – 2022-05-17
- Fixed wstp-rs build linking issue on Apple Silicon. (#34)
0.2.1 – 2022-03-04
- Fixed documentation build failure in the docs.rs build environment. (#32)
0.2.0 – 2022-03-03
- Added Windows support for
wstp
andwstp-sys
. (#29)- Add build script commands to link to WSTP interface libraries.
- Use the
link-cplusplus
crate to link to the C++ standard library (required by the WSTP library) in a reliable cross-platform way.
-
Changed
wstp-sys
to generate the Rust bindings towstp.h
at compile time. (#30)This ensures that the
wstp
andwstp-sys
crates will compile with a wider range of Wolfram Language versions that provide a suitable version of the WSTP SDK. See the PR description for more info.
0.1.4 – 2022-02-19
-
Added
WolframKernelProcess
struct, used to create and manage a WSTP connection to a Wolfram Kernel process. (#24)WolframKernelProcess
can be combined with the wolfram-app-discovery crate to easily launch a new Wolfram Kernel session with no manual configuration:use std::path::PathBuf; use wolfram_app_discovery::WolframApp; use wstp::kernel::WolframKernelProcess; // Automatically find a local Wolfram Language installation. let app = WolframApp::try_default() .expect("unable to find any Wolfram Language installations"); let exe: PathBuf = app.kernel_executable_path().unwrap(); // Create a new Wolfram Language session using this Kernel. let kernel = WolframKernelProcess::launch(&exe).unwrap();
-
Added
Link::put_eval_packet()
convenience method to perform evaluations using a connected Wolfram Kernel. (#24) -
Added types and methods for ergonomic processing of WSTP tokens. (#25)
A token is the basic unit of expression data that can be read from or written to a link. Use the new
Link::get_token()
method to ergonomically match over theToken
that is readoff of the link:use wstp::{Link, Token}; match link.get_token()? { Token::Integer(int) => { // Do something with `int`. }, Token::Real(real) => { // Do something with `real`. }, ... }
-
Added
Link::end_packet()
method. (#23) -
Added
wstp::shutdown()
. (#23)
- Fixed
Debug
formatting ofLinkStr
to include the string contents. (#23) - Upgrade
wolfram-app-discovery
dependency to v0.2.0 (adds support for app discovery on Windows). (#25)
0.1.3 – 2022-02-08
- Fixed another
wstp-sys
build failure when built in the docs.rs environment. (#19)
0.1.2 – 2022-02-08
- Fixed
wstp-sys
build failures when built in the docs.rs environment. (#17)
0.1.1 – 2022-02-08
- Increase
wolfram-app-discovery
dependency version from v0.1.1 to v0.1.2 to get fix for compilation error when compiling for non-macOS targets (#16)
0.1.0 – 2022-02-08
Initial release of the wstp
crate.
-
Link
struct that represents a WSTP link endpoint, and provides methods for reading and writing symbolic Wolfram Language expressions. -
LinkServer
struct that represents a WSTP TCPIP link server, which binds to a port, listens for incoming connections, and creates a newLink
for each connection.