Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[submodule "kinode-wit"]
path = kinode-wit
url = https://github.com/uqbar-dao/kinode-wit.git
branch = master
branch = v0.8
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "kinode_process_lib"
description = "A library for writing Kinode processes in Rust."
version = "0.7.1"
version = "0.8.0"
edition = "2021"
license-file = "LICENSE"
homepage = "https://kinode.org"
Expand Down
2 changes: 1 addition & 1 deletion kinode-wit
3 changes: 2 additions & 1 deletion src/kernel_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ pub struct Erc721Properties {
pub code_hashes: HashMap<String, String>,
pub license: Option<String>,
pub screenshots: Option<Vec<String>>,
pub wit_version: Option<(u32, u32, u32)>,
pub wit_version: Option<u32>,
pub dependencies: Option<Vec<String>>,
}

Expand Down Expand Up @@ -417,6 +417,7 @@ pub fn en_wit_message(message: Message) -> wit::Message {
pub fn en_wit_send_error(error: SendError) -> wit::SendError {
wit::SendError {
kind: en_wit_send_error_kind(error.kind),
target: en_wit_address(error.target),
message: en_wit_message(error.message),
lazy_load_blob: en_wit_blob(error.lazy_load_blob),
}
Expand Down
6 changes: 2 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ pub fn await_message() -> Result<Message, SendError> {
crate::kinode::process::standard::SendErrorKind::Offline => SendErrorKind::Offline,
crate::kinode::process::standard::SendErrorKind::Timeout => SendErrorKind::Timeout,
},
message: wit_message_to_message(
Address::new("our", ProcessId::new(Some("net"), "distro", "sys")),
send_err.message,
),
target: send_err.target.clone(),
message: wit_message_to_message(send_err.target, send_err.message),
lazy_load_blob: send_err.lazy_load_blob,
context,
}),
Expand Down
4 changes: 4 additions & 0 deletions src/types/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ impl SendErrorKind {
#[derive(Debug, Clone)]
pub struct SendError {
pub kind: SendErrorKind,
pub target: Address,
pub message: Message,
pub lazy_load_blob: Option<LazyLoadBlob>,
pub context: Option<Vec<u8>>,
Expand All @@ -117,6 +118,9 @@ impl SendError {
pub fn kind(&self) -> &SendErrorKind {
&self.kind
}
pub fn target(&self) -> &Address {
&self.target
}
pub fn message(&self) -> &Message {
&self.message
}
Expand Down
6 changes: 2 additions & 4 deletions src/types/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,8 @@ impl Request {
SendErrorKind::Timeout
}
},
message: wit_message_to_message(
Address::new("our", ProcessId::new(Some("net"), "distro", "sys")),
send_err.message,
),
target: send_err.target.clone(),
message: wit_message_to_message(send_err.target, send_err.message),
lazy_load_blob: send_err.lazy_load_blob,
context: None,
})),
Expand Down