rquickjs 0.11.0

High level bindings to the QuickJS JavaScript engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use rquickjs::{async_with, AsyncContext, AsyncRuntime};

pub async fn test() {
    let rt = AsyncRuntime::new().unwrap();
    let ctx = AsyncContext::full(&rt).await.unwrap();

    let mut var = 1u32;
    let var_ref = &mut var;
    async_with!(ctx => |ctx|{
        ctx.spawn(async move {
            *var_ref += 1;
        })
    })
    .await
}

fn main() {}