Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

ComposableFi/cosmwasm-vm

Repository files navigation

CosmWasm VM

Experimental, minimalistic, no_std friendly abstract virtual machine for CosmWasm contracts execution.

Based on wasmi interpeter and can be run in other VM. Allows to host CosmWasm VM inside other Wasm VM. In contrast, Cosmos wasmd VM can run only on native host.

Specification

Getting started

  • Install Nix and enter the dev env with: nix develop.
  • Or install latest Rust nightly.
  • Run test suite using: cargo test

Research

Install flamegraph (in nix shell already installed)

RUST_LOG=trace cargo run --bin research --release 2>&1 | tee research.log and see some output for deep logging.

RUST_LOG=info cargo run --bin research --release and see some output long run with coarse grain output.

flamegraph target/release/research

Modify research.rs as needed.

no_std support

Until release of CW for no_std, which is planned with CW 2.0 in September, need maintain no_std forks in this order:

  • serde-json-wasm
  • cosmwasm (cosmwasm-std)
  • cw-utils
  • cw-stroage-plus
  • cw-plus (package with interfaces, not contracts)

These are required to use cw code in Substrate runtime(for host and precompiles) and compile contracts with no_std only wasm crates (when wasm compiled, it can be only no_std.

How to consume forked cw interfaces in contracts?

First option is reference or patch contracts to point to forks.

Other option is to generate schema from interface and generate rust code from schema.

Authors

"Hussein Ait Lahcen [email protected]" "Abdullah Eryuzlu [email protected]" "Composable Developers"

homepage

https://composable.finance

About

Alternative CosmWasm VM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published