Crates.io | wasm-info |
lib.rs | wasm-info |
version | 0.1.4 |
source | src |
created_at | 2020-11-28 06:27:14.962933 |
updated_at | 2020-12-29 03:58:27.189811 |
description | A wrapper of parity-wasm for printing information of wasm binary |
homepage | https://github.com/clearloop/wasm-info |
repository | https://github.com/clearloop/wasm-info |
max_upload_size | |
id | 317364 |
size | 8,929 |
This package is a wrapper of the info
example of parity-wasm,
it's really easy to use.
For example, we write a simple hello, world
example in hello_world.rs
.
//! A hello world example in rust
#[no_mangle]
pub fn _start() {
println!("Hello, world!");
}
Compile and wasm-info
it!
$ rustc hello_world.rs --target wasm32-unknown-unknown --crate-type=cdylib
$ wasm-info hello_world.wasm
Module sections: 19
Types: 17
Functions: 193
Tables: 1
Memories: 1
Globals: 3
Exports: 4
memory
_start
__data_end
__heap_base
Data size: 5945
MIT