Giter Site home page Giter Site logo

filecoin-wasmedge's Introduction

filecoin-wasmedge

Propose to provide an FVM implementation based on WasmEdge.

filecoin-wasmedge's People

Watchers

 avatar  avatar  avatar  avatar  avatar

filecoin-wasmedge's Issues

Propose to provide an FVM implementation based on WasmEdge

Note: This is a root tracking issue

The goal of this project is to pass all test cases list in the wiki/test-bench. The roadmap to achieve this goal is broken into multiple stages.

Roadmap / Check List

  • Phase 1: Embedded Wasmedge
    pass hello-world test case (the one of integration tests) but simplify it without the need for binding any host functions.
    8ab3e9a
    Follow the build and run single test in tutorial, you can get the log as below
running 1 test
wasmtime results : Ok(0)
wasmedge result : Ok([WasmValue { ctx: WasmEdge_Value { Value: 0, Type: 127 }, ty: I32 }])
test hello_world ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 10 filtered out; finished in 0.05s
  • Phase 2: (WIP) Binding host functions
  • Binding host functions through wasmedge-sys's vm interface
  • 13adbd7
    • make orgiginal hello-world test case (only use vm.abort())
      Follow the build and run single test steps in tutorial, you can get the log as below
    wasmtime results : Err(Trap { reason: Error(Envelope { inner: Mutex { data: Some(Exit(ExitCode { value: 16 }, "sample abort")), poisoned: false, .. } }) })
    [2022-08-25 17:20:09.563] [error] execution failed: unreachable, Code: 0x89
    [2022-08-25 17:20:09.563] [error]     In instruction: unreachable (0x00) , Bytecode offset: 0x000000e4
    [2022-08-25 17:20:09.563] [error]     When executing function name: "invoke"
    thread 'hello_world' panicked at 'called `Result::unwrap()` on an `Err` value: Core(Execution(Unreachable))', fvm/src/machine/engine.rs:458:14
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    thread 'hello_world' panicked at 'assertion failed: `(left == right)`
      left: `10`,
     right: `16`', testing/integration/tests/lib.rs:89:5
    test hello_world ... FAILED
    
    failures:
    
    failures:
        hello_world
    
    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 10 filtered out; finished in 0.05s
    • The root cause is because host function return Wasmtime's Trap type and it should be catched and handle, but Wasmedge regarded it as a normal value and keep execute next unreachable byte code (need workaround)
    • finish all host functions binding in check list
  • Phase 3. Convert Wasmedge's return value as VM's result and add feature option to select engine use Wasmtime or Wasmedge
  • Phase 4. Pass integration test in the wiki/test-bench
  • Phase 5. Pass conformance test in the wiki/test-bench

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.