#scripting-language #libraries #scripting #sys

sys yaslapi-sys

A library that provides bindings to the Yet Another Scripting Language (YASL) API

6 releases

0.2.3 Sep 4, 2023
0.2.2 Sep 4, 2023
0.2.0 Apr 2, 2023
0.1.1 Apr 2, 2023
Download history 4/week @ 2023-05-31 5/week @ 2023-06-14 3/week @ 2023-06-21 8/week @ 2023-06-28 1/week @ 2023-07-05 1/week @ 2023-07-19 8/week @ 2023-07-26 1/week @ 2023-08-02 6/week @ 2023-08-09 3/week @ 2023-08-16 4/week @ 2023-08-23 59/week @ 2023-08-30 10/week @ 2023-09-06 6/week @ 2023-09-13

79 downloads per month
Used in yaslapi

MIT license

460KB
14K SLoC

C 14K SLoC // 0.0% comments Alex 214 SLoC Shell 148 SLoC // 0.0% comments Rust 61 SLoC // 0.2% comments Python 8 SLoC

yaslapi-sys

yaslapi-sys is a Rust library that provides bindings to the Yet Another Scripting Language (YASL) API.

Installation

First, you must have CMake and a C compiler installed so that YASL can be compiled locally. To install yaslapi-sys, add the following to your Cargo.toml file:

[dependencies]
yaslapi-sys = "0.2.3"

Then run cargo build to build your project.

Usage

Here’s an example of how to use yaslapi-sys in your Rust code:

extern crate yaslapi_sys;

use yaslapi_sys::YASL_State;
use std::ffi::CString;

fn main() {
    let test_file = CString::new("test.yasl").unwrap();
    let state: *mut YASL_State = unsafe { yaslapi_sys::YASL_newstate(test_file.as_ptr()) };
    assert!(!state.is_null());
    // ...
}

License

yaslapi-sys is licensed under the MIT License.

Dependencies

~0.8–3MB
~66K SLoC