WebAssembly
TOC
- EVM ABI WebAssemble
- Wasm for Blockchain 2019
- Wasmtime
- WASI cowsay
- Cloudflare Worker , wrangler , Serverless Wasm
- wasm32-wasi
- Links
EVM ABI WebAssemble
- WebAssembly Interface Types: Interoperate with All the Things!
- Solidity - Application Binary Interface (ABI)
solidity
contract Test {
event Event(uint indexed a, bytes32 b);
function foo(uint a) public { emit Event(a, b); }
bytes32 b;
}
test-contract-output-abi.json
[
{
"type": "event",
"inputs": [
{
"name": "a",
"type": "uint256",
"indexed": true
},
{
"name": "b",
"type": "bytes32",
"indexed": false
}
],
"name": "Event"
},
{
"type": "function",
"inputs": [
{
"name": "a",
"type": "uint256"
}
],
"name": "foo",
"outputs": []
}
]
Wasm for Blockchain 2019
Wasm for Blockchain 2019 - NEAR Protocol - Medium
Wasmer opens discussion of unifying APIs of smart contracts, by presenting two approaches: the first one is the one suggested by Oasis in this blog post, where they emulate blockchain interface through POSIX-like imports available in standard WASI modules; the second approach is to either use imports without WASI (Ewasm approach) or have a special WASI module for blockchains.
Wasmtime
CraneStation/wasmtime: Standalone JIT-style runtime for WebAssembly, using Cranelift relation to wasmtime? · Issue #142 · wasmerio/wasmer
WASI cowsay
wapm-packages/cowsay: Cowsay in WebAssembly
Cloudflare Worker , wrangler , Serverless Wasm
- cloudflare/wrangler: 🤠 wrangle your cloudflare workers
- Rust, WebAssembly, and the future of Serverless by Steve Klabnik - YouTube
- Beyond The Browser: Getting Started With Serverless WebAssembly — Smashing Magazine
- robertaboukhalil/fastq.bio-serverless: An interactive web tool for quality control of DNA sequencing data, using Cloudflare workers running WebAssembly
- pulldown-cmark - crates.io: Rust Package Registry
- Bringing WebAssembly outside the web with WASI by Lin Clark - YouTube
wasm32-wasi
目前 wasi net 部份未支援
- rust/src/libstd/sys/wasi at 1.37.0 · rust-lang/rust
- rust/src/libstd/sys/sgx at 1.37.0 · rust-lang/rust
- コンテナ技術を捨て、 WASIを試す - nttlabs - Medium
// // cargo +nightly build --target wasm32-wasi // fn main() { println!("Hello, WASM/WASI world!"); }
$ wasmer run target/wasm32-wasi/debug/hello-wasi.wasm
Hello, WASM/WASI world!