wasm-runtime

A wasm runtime
git clone https://git.parazyd.org/wasm-runtime
Log | Files | Refs | README | LICENSE

commit f685dafefe02abe700e5b56013d79e2b74e7b6c0
parent 5faff7d783dfea4f830725938fd96a6bd3829d71
Author: parazyd <parazyd@dyne.org>
Date:   Fri, 11 Mar 2022 19:07:57 +0100

sdk: Unexport the drk_log_ symbol from the rust crate.

Diffstat:
MMakefile | 6+++++-
Mdrk-sdk/src/log.rs | 3++-
2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile @@ -5,8 +5,12 @@ SRC = \ $(shell find smart-contract -type f) \ $(shell find drk-sdk -type f) +# Cargo binary CARGO = cargo +# wasm-strip binary (build with "make wabt" and change path) +WASM_STRIP = wasm-strip + DEPS = smart_contract.wasm all: $(DEPS) @@ -19,6 +23,6 @@ wabt: smart_contract.wasm: $(SRC) cd smart-contract && $(CARGO) build --release --lib --target wasm32-unknown-unknown cp -f smart-contract/target/wasm32-unknown-unknown/release/$@ $@ - -wabt/bin/wasm-strip $@ + -wasm-strip $@ .PHONY: all diff --git a/drk-sdk/src/log.rs b/drk-sdk/src/log.rs @@ -1,3 +1,4 @@ +/// Print a message to the log #[macro_export] macro_rules! msg { ($msg:expr) => { @@ -19,5 +20,5 @@ pub fn drk_log(message: &str) { #[cfg(target_arch = "wasm32")] extern "C" { - pub fn drk_log_(ptr: *const u8, len: usize); + fn drk_log_(ptr: *const u8, len: usize); }