Skip to content

feat(task): rig as ai agent interface via wasm#126

Closed
LeoBorai wants to merge 2 commits intomainfrom
feat/agent-prompt-task
Closed

feat(task): rig as ai agent interface via wasm#126
LeoBorai wants to merge 2 commits intomainfrom
feat/agent-prompt-task

Conversation

@LeoBorai
Copy link
Owner

wake me up when reqwest supports wasi.

@LeoBorai LeoBorai closed this Feb 25, 2026
@LeoBorai
Copy link
Owner Author

Leaving this PR as a note to self for the future when spawning Rig via Job Queue under WASI is cool.

@LeoBorai
Copy link
Owner Author

For the record, here is the stack trace:

Caused by:
    wasm trap: wasm `unreachable` instruction executed job_id=6850b56a-a384-484c-aec7-cb484bd33ea5
2026-02-25T23:36:23.342907Z ERROR mate::process::executor: Job execution failed err=error while executing at wasm backtrace:
    0:  0xeab78 - agent.wasm!abort
    1:  0xe0db8 - agent.wasm!std[fe515bc9a8625ade]::sys::pal::wasi::helpers::abort_internal
    2:  0xde258 - agent.wasm!std[fe515bc9a8625ade]::process::abort
    3:  0xdeaa6 - agent.wasm!__rustc[d6e935dc4dcc4704]::__rust_abort
    4:  0xdcec0 - agent.wasm!__rustc[d6e935dc4dcc4704]::__rust_start_panic
    5:  0xde8d3 - agent.wasm!__rustc[d6e935dc4dcc4704]::rust_panic
    6:  0xddacc - agent.wasm!std[fe515bc9a8625ade]::panicking::panic_with_hook
    7:  0xdd6ac - agent.wasm!std[fe515bc9a8625ade]::panicking::panic_handler::{closure#0}
    8:  0xdd63f - agent.wasm!std[fe515bc9a8625ade]::sys::backtrace::__rust_end_short_backtrace::<std[fe515bc9a8625ade]::panicking::panic_handler::{closure#0}, !>
    9:  0xdeb89 - agent.wasm!__rustc[d6e935dc4dcc4704]::rust_begin_unwind
   10:  0xf43ca - agent.wasm!core[6bd4aef71b630da9]::panicking::panic_fmt
   11:  0xacd3b - agent.wasm!js_sys[a677626dfcc0f3d2]::global::get_global_object::GLOBAL_THIS::init
   12:  0xac8b3 - agent.wasm!js_sys[a677626dfcc0f3d2]::global::get_global_object
   13:  0xac5f9 - agent.wasm!js_sys[a677626dfcc0f3d2]::global
   14:  0xaa24e - agent.wasm!<wasm_bindgen_futures[a08c128f077cc4c6]::queue::Queue>::new
   15:  0x91d3d - agent.wasm!<wasm_bindgen_futures[a08c128f077cc4c6]::task::singlethread::Task>::spawn::<<rig[8340c8829133549d]::tool::server::ToolServer>::run::{closure#0}>
   16:  0x90339 - agent.wasm!<rig[8340c8829133549d]::tool::server::ToolServer>::run
   17:  0x5fd1f - agent.wasm!<rig[8340c8829133549d]::agent::builder::AgentBuilder<rig[8340c8829133549d]::providers::openrouter::completion::CompletionModel>>::build
   18:  0x54c57 - agent.wasm!agent[4d48b5bd29e81c59]::prompt_agent::{closure#0}::{closure#0}
   19:  0x555d7 - agent.wasm!<async_task[c055fa926d1eb537]::raw::RawTask<agent[4d48b5bd29e81c59]::prompt_agent::{closure#0}::{closure#0}, core[6bd4aef71b630da9]::result::Result<agent[4d48b5bd29e81c59]::Response, anyhow[f7ae62c78d8fdf57]::Error>, <wstd[a507aff21e99a6d7]::runtime::reactor::Reactor>::spawn_unchecked<agent[4d48b5bd29e81c59]::prompt_agent::{closure#0}::{closure#0}, core[6bd4aef71b630da9]::result::Result<agent[4d48b5bd29e81c59]::Response, anyhow[f7ae62c78d8fdf57]::Error>>::{closure#0}, ()>>::run
   20:  0x6569b - agent.wasm!wstd[a507aff21e99a6d7]::runtime::block_on::block_on::<agent[4d48b5bd29e81c59]::prompt_agent::{closure#0}::{closure#0}>
   21:  0x6be15 - agent.wasm!agent[4d48b5bd29e81c59]::bindings::_export_handler_cabi::<agent[4d48b5bd29e81c59]::Mate>::{closure#0}
   22:  0x71a7e - agent.wasm!<wit_bindgen[9d19e5fa9947fbff]::rt::async_support::FutureState>::callback
   23:  0x71d1b - agent.wasm!wit_bindgen[9d19e5fa9947fbff]::rt::async_support::callback
   24:  0x6b9fc - agent.wasm!wit_bindgen[9d19e5fa9947fbff]::rt::async_support::start_task::<agent[4d48b5bd29e81c59]::bindings::_export_handler_cabi<agent[4d48b5bd29e81c59]::Mate>::{closure#0}>
   25:  0x5c776 - agent.wasm![async-lift]handler

Caused by:
    wasm trap: wasm `unreachable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant