3 unstable releases

0.1.1 Jun 24, 2023
0.1.0 Jun 11, 2023
0.0.8 Jan 28, 2023

#327 in WebAssembly

Download history 6/week @ 2024-02-15 17/week @ 2024-02-22 7/week @ 2024-02-29 5/week @ 2024-03-07 4/week @ 2024-03-14 31/week @ 2024-03-28 27/week @ 2024-04-04

58 downloads per month

GPL-3.0-only

61KB
1.5K SLoC

cbqn

A Rust crate for running BQN code within a Rust program using CBQN interpreter shared object or WASI reactor.

Building

Native backend (libcbqn.so)

With the native backend (default), please make sure the libcbqn shared object can be found by rustc. For example, assuming make shared-o3 build has been run in CBQN directory, running the tests for this crate require:

LD_LIBRARY_PATH=/path/to/CBQN RUSTFLAGS="-L /path/to/CBQN" RUSTDOCFLAGS="$RUSTFLAGS" cargo test

WASI backend (BQN.wasm)

To build the WASI backend, point the BQN_WASM environment variable to the BQN.wasm file built with make wasi-reactor-o3 CBQN makefile target. Disable default features and use wasi-backend feature. For example running the tests for this crate:

BQN_WASM=/path/to/CBQN/BQN.wasm cargo test --no-default-features --features=wasi-backend --release

Usage

The documentation contains multiple examples on how to use the crate.

License

Licensed under the GNU General Public License v3.0. CBQN uses the same license.

Dependencies

~2–17MB
~226K SLoC