working import transform

This commit is contained in:
NikVolf
2017-04-12 19:10:05 +03:00
parent d8626454bc
commit b6838fe360
3 changed files with 13 additions and 1 deletions

2
gas/Cargo.lock generated
View File

@ -13,7 +13,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "parity-wasm"
version = "0.2.0"
source = "git+https://github.com/nikvolf/parity-wasm#cafc5058357f6ea84daaec870057da8455bf74e8"
source = "git+https://github.com/nikvolf/parity-wasm#4011af4f75e9334a2a018fdb2f464d9c7eb21617"
dependencies = [
"byteorder 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]

View File

@ -48,6 +48,8 @@ fn main() {
// back to plain module
let mut module = mbuilder.build();
assert!(module.global_section().is_some());
// calculate actual function index of the imported definition
// (substract all imports that are NOT functions)

10
samples/contract1.c Normal file
View File

@ -0,0 +1,10 @@
int ops = 0;
void log(int block_ops) {
ops += block_ops;
}
int call(int x) {
log(5);
return 2 * x;
}