alef 0.115.2

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
let async_result = alef_magnus_run_without_gvl(move || -> Result<_, String> {
    let rt = tokio::runtime::Builder::new_current_thread()
        .enable_all()
        .build()
        .map_err(|e| e.to_string())?;
    Ok(rt.block_on(async { {{ core_call }}.await }))
});
let result = async_result.map_err(|message| magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_runtime_error(), message))?;
{% if has_error -%}
let result = result.map_err(alef_magnus_err)?;
{% endif -%}
Ok({{ wrap }})