https://github.com/miroox/wll-rs
Wolfram LibraryLink interface for Rust [Deprecated]
https://github.com/miroox/wll-rs
ffi librarylink rust wolfram-language
Last synced: 6 months ago
JSON representation
Wolfram LibraryLink interface for Rust [Deprecated]
- Host: GitHub
- URL: https://github.com/miroox/wll-rs
- Owner: miRoox
- License: mit
- Created: 2020-08-03T13:44:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-08T03:32:06.000Z (about 1 year ago)
- Last Synced: 2024-12-08T04:47:28.725Z (6 months ago)
- Topics: ffi, librarylink, rust, wolfram-language
- Language: Rust
- Homepage:
- Size: 108 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wll-rs
[](https://crates.io/crates/wll)
[](https://docs.rs/wll)
[](https://github.com/miRoox/wll-rs/actions?query=workflow%3ACI)Wolfram [LibraryLink](http://reference.wolfram.com/language/LibraryLink/tutorial/Overview.html) interface for Rust
Inspired by [wll-interface](https://github.com/njpipeorgan/wll-interface).
Purpose:
```rust
// lib.rs
use wll::{ErrorKind, Result};#[wll::setup]
fn setup() {}#[wll::teardown]
fn teardown() {}// export function named `wll_add_two`
#[wll::export]
fn add_two(a: isize, b: isize)->Result {
a.checked_add(b)
.ok_or_else(|| ErrorKind::NumericalError.into())
}#[wll::export(factorial)]
fn fac(n: usize) -> Result {
Ok(if n == 0 { 1 } else { n * fac(n - 1)? })
}
```