From 6cc31d3b49f1299b746125d81b88f589169239c3 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Thu, 25 Jul 2019 11:42:47 +0300 Subject: [PATCH 1/5] lib.rs - making `wasmer_byte_array` fields `public` --- lib/runtime-c-api/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime-c-api/src/lib.rs b/lib/runtime-c-api/src/lib.rs index 51f23517c5a..52a80f3fc20 100644 --- a/lib/runtime-c-api/src/lib.rs +++ b/lib/runtime-c-api/src/lib.rs @@ -118,6 +118,6 @@ pub struct wasmer_limit_option_t { #[repr(C)] pub struct wasmer_byte_array { - bytes: *const u8, - bytes_len: u32, + pub bytes: *const u8, + pub bytes_len: u32, } From 015616b5414dfe07b65d5d0ff557d56b227cc90f Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Thu, 25 Jul 2019 14:59:59 +0300 Subject: [PATCH 2/5] export.rs - changing `FuncPointer` `inner` visibility to `pub` --- lib/runtime-core/src/export.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime-core/src/export.rs b/lib/runtime-core/src/export.rs index 81e0eae92c6..1be8cb28396 100644 --- a/lib/runtime-core/src/export.rs +++ b/lib/runtime-core/src/export.rs @@ -34,7 +34,7 @@ impl FuncPointer { FuncPointer(f) } - pub(crate) fn inner(&self) -> *const vm::Func { + pub fn inner(&self) -> *const vm::Func { self.0 } } From f04d5523611748dabeeea03ce96a1746f0bfd8f9 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Thu, 25 Jul 2019 15:46:57 +0300 Subject: [PATCH 3/5] wasmer-c-api: * error.rs - changing `update_last_error` visibility to `pub`. * error.rs - changing `CApiError` `msg` field visibility to `pub`. --- lib/runtime-c-api/src/error.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/runtime-c-api/src/error.rs b/lib/runtime-c-api/src/error.rs index 1a9322df841..aea8691e9ff 100644 --- a/lib/runtime-c-api/src/error.rs +++ b/lib/runtime-c-api/src/error.rs @@ -11,7 +11,7 @@ thread_local! { static LAST_ERROR: RefCell>> = RefCell::new(None); } -pub(crate) fn update_last_error(err: E) { +pub fn update_last_error(err: E) { LAST_ERROR.with(|prev| { *prev.borrow_mut() = Some(Box::new(err)); }); @@ -89,8 +89,8 @@ pub unsafe extern "C" fn wasmer_last_error_message(buffer: *mut c_char, length: } #[derive(Debug)] -pub(crate) struct CApiError { - pub(crate) msg: String, +pub struct CApiError { + pub msg: String, } impl Display for CApiError { From 10fc660aadd899e46deddcf00239500dc19a82d2 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Mon, 29 Jul 2019 13:41:28 +0300 Subject: [PATCH 4/5] `wasmer_byte_array` visibility revert (see PR: "wasmer-c-api-changes: making `wasmer_byte_array` fields `public` #589") --- lib/runtime-c-api/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/runtime-c-api/src/lib.rs b/lib/runtime-c-api/src/lib.rs index 52a80f3fc20..51f23517c5a 100644 --- a/lib/runtime-c-api/src/lib.rs +++ b/lib/runtime-c-api/src/lib.rs @@ -118,6 +118,6 @@ pub struct wasmer_limit_option_t { #[repr(C)] pub struct wasmer_byte_array { - pub bytes: *const u8, - pub bytes_len: u32, + bytes: *const u8, + bytes_len: u32, } From a8d2469689937d2965c92bd9504fa7da7c0a3185 Mon Sep 17 00:00:00 2001 From: Yaron Wittenstein Date: Mon, 29 Jul 2019 13:44:56 +0300 Subject: [PATCH 5/5] wasmer-c-api: returning back `pub(crate) fn inner` for `export.rs` --- lib/runtime-core/src/export.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/runtime-core/src/export.rs b/lib/runtime-core/src/export.rs index 1be8cb28396..81e0eae92c6 100644 --- a/lib/runtime-core/src/export.rs +++ b/lib/runtime-core/src/export.rs @@ -34,7 +34,7 @@ impl FuncPointer { FuncPointer(f) } - pub fn inner(&self) -> *const vm::Func { + pub(crate) fn inner(&self) -> *const vm::Func { self.0 } }