rearrange consts

This commit is contained in:
vms 2021-03-11 19:01:16 +03:00
parent 3d72d5885e
commit 00c72c6438
4 changed files with 10 additions and 2 deletions

View File

@ -38,6 +38,7 @@ mod logger;
mod module_manifest;
pub mod mounted_binary;
mod result;
mod sdk_version_embedder;
pub use call_parameters::CallParameters;
pub use call_parameters::SecurityTetraplet;
@ -59,6 +60,9 @@ pub use result::get_result_size;
pub use result::set_result_ptr;
pub use result::set_result_size;
pub use module_manifest::MANIFEST_SECTION_NAME;
pub use sdk_version_embedder::VERSION_SECTION_NAME;
#[allow(unused_variables)]
pub(crate) fn log<S: AsRef<str>>(msg: S) {
// logs will be printed only if debug feature is enabled

View File

@ -14,6 +14,9 @@
* limitations under the License.
*/
// TODO: avoid duplication with the link_section when key-value attributes become stable
pub const MANIFEST_SECTION_NAME: &str = "__fluence_wasm_module_manifest";
#[macro_export]
macro_rules! module_manifest {
($authors:expr, $version:expr, $description:expr, $repository:expr) => {

View File

@ -32,6 +32,9 @@ const fn sdk_version() -> [u8; VERSION_SIZE] {
version_as_array
}
// TODO: avoid duplication with the link_section when key-value attributes become stable
pub const VERSION_SECTION_NAME: &str = "__fluence_sdk_version";
#[cfg(target_arch = "wasm32")]
#[link_section = "__fluence_sdk_version"]
#[doc(hidden)]

View File

@ -67,8 +67,6 @@
)]
#![warn(rust_2018_idioms)]
mod sdk_version_embedder;
pub use fluence_sdk_macro::fce;
pub use fluence_sdk_main::CallParameters;