lunatic-solutions / lunatic-rs

This library contains higher level Rust wrappers for low level Lunatic syscalls.
274 stars 31 forks source link

Runtime Error: incompatible import type for `lunatic::distributed::send_receive_skip_search` #127

Open daveman1010221 opened 2 months ago

daveman1010221 commented 2 months ago

I built some code and attempted to run it and received a runtime error:

Error: incompatible import type for "lunatic::distributed::send_receive_skip_search" Caused by: function types incompatible: expected func of type "(i64, i64, i64) -> (i32)", found func of type "(i64, i64, i64, i64) -> (i32)"

Feels like I might need an older version of wasm32-wasip1 to run this? Sorry that I don't have more diagnostics, that's all it is giving me.

daveman1010221 commented 2 months ago

Upon further examination, the lunatic API does indeed appear to be out of sync with the lunatic-rs API:

lunatic API fn send_receive_skip_search<T, E>( mut caller: Caller<T>, node_id: u64, process_id: u64, wait_on_tag: i64, timeout_duration: u64, ) -> Box<dyn Future<Output = Result<u32>> + Send + '_>

lunatic-rs API pub fn send_receive_skip_search(node: u64, process_id: u64, timeout: u64) -> u32 {

Any thoughts on the correct resolution? Does lunatic-rs need updated or does lunatic?

daveman1010221 commented 2 months ago

Updating my dependencies in Cargo.toml for lunatic, from 0.12 to 0.14.1, seems to have solved that issue and broken a lot of my code. :-/ Now I just need to find the docs for the newer version.