百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
Z

zkWasm

> 编程语言
开源

概述:DelphinusLab 的使命是为 Web2 开发者提供一个简洁的工具集,以利用 Web3 的强大功能在其应用程序中。

542 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

概述:DelphinusLab 的使命是为 Web2 开发者提供一个简洁的工具集,以利用 Web3 的强大功能在其应用程序中。

Overview:

The mission of DelphinusLab is to provide Web2 developers with a concise toolset to leverage the power of Web3 in their applications. The ZKWASM (ZKSNARK virtual machine that supports Web Assembly) serves as a trustless layer between rich applications running on WASM runtime and smart contracts on chain.

WASM (or WebAssembly) is an open standard binary code format similar to assembly. Its initial objective was to provide an alternative to java-script with improved performance for the current web ecosystem. Benefiting from its platform independence, front-end flexibility (can be compiled from the majority of languages including C, C++, assembly script, rust, etc.), good isolated runtime and speed comes closer to the speed of a native binary, its usage is arising in distributed cloud and edge computing. Recently it has become a popular binary format for users to run customized functions on AWS Lambda, Open Yurt, AZURE, etc.

The idea of ZKWASM is derived from ZKSNARK (Zero-Knowledge Succinct Non-Interactive Argument of Knowledge) which is a combination of SNARG (Succinct non-interactive arguments) and zero-knowledge proof. In general, the adoption of ZKSNARK usually requires implementing a program in arithmetic circuits or circuit-friendly languages (Pinocchio, TinyRAM, Buffet/Pequin, Geppetto, xJsnark framework, ZoKrates) that forms a barrier for existing programs to leverage its power. An alternative approach is, instead of applying ZKSNARK on the source code, applying it on the bytecode level of a virtual machine and implementing a zksnark-backed virtual machine. In this work, we take the approach of writing the whole WASM virtual machine in ZKSNARK circuits so that existing WASM applications can benefit from ZKSNARK by simply running on the ZKWASM, without any modification. Therefore, the cloud service provider can prove to any user that the computation result is computed honestly and no private information is leaked.

Circuit Details:

https://ieeexplore.ieee.org/document/10587123

Quick start with ZKWASM command line

Dependency

Make sure the following packages are installed.

clang lld

Install Instructions

bash
git clone --recurse-submodules https://github.com/DelphinusLab/zkwasm
cargo build

Setup input:

wasm code

Runtime input:

input of wasm function and the top level function must be zkmain

Proving target:

simulation of wasm execution of target wasm bytecode with particular inputs are correct.

Command line:

Setup via WASM image:

delphinus-cli --params   setup [OPTIONS] --wasm 

with OPTIONS:

    -h, --help
            Print help information

        --host 
            Specify execution host environment for the runtime [default: default] [possible values:
            default, standard]

    -k 
            Size of the circuit. [default: 18]

        --phantom 
            Specify phantom functions whose body will be ignored in the circuit

        --wasm 
            Path to the Wasm image

Single prove and verify:

cargo run --release -- --params   prove [OPTIONS] --wasm  --output 

with OPTIONS:

…
cargo run --release -- --params   verify --output 

Batch prove and verify:

Please see zkWASM continuation batcher at https://github.com/DelphinusLab/continuation-batcher for batching proof with host circuits and verifier generation in smart contracts.

Operations Spec [WIP]

We use z3 (https://github.com/Z3Prover/z3) to check that all operations are compiled to zkp circuits correctly.

[This is a WIP project, only sample code are provided here. Please contact [email protected] for state circuit customization and application integration.

Issue tracking:

  • chore: non-feature requirements such as CI/CD, building script or work flow enhancement.
  • feat: feature need, we could use feat(circuit), feat(lang), feat(CLI) to categorize features
  • bug: bug report, we also could use bug(circuit), bug(lang) to categorize bugs
  • doc: documents related issues.

Project Bootstrap:

  • C project: There is a project template for compiling C to wasm with limited host functions (foreign circuits). (see https://github.com/DelphinusLab/zkWasm-C)
  • Rust project demo: https://github.com/xgaozoyoe/zkWasm-Rust-Demo
  • Assembly script demo: https://github.com/DelphinusLab/zkWasm-AssemblyScript-Demo
  • Browser based project: See https://github.com/zkcrossteam/g1024/ for how to utilize zkWASM in javascript, how to generate proofs using PAAS service and verify it on chain (contact [email protected] for details about PAAS testnet).

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言