alef 0.84.2

Opinionated polyglot binding generator for Rust libraries
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
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())?;
    {% if has_error -%}
    rt.block_on(async { {{ core_call }}.await }).map_err(|e| e.to_string())
    {%- else -%}
    Ok(rt.block_on(async { {{ core_call }}.await }))
    {%- endif %}
});
let result = async_result.map_err(|message| magnus::Error::new(unsafe { Ruby::get_unchecked() }.exception_runtime_error(), message))?;
Ok({{ wrap }})