GithubHelp home page GithubHelp logo

isabella232 / wasm-interface-types Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bytecodealliance/wasm-interface-types

0.0 0.0 0.0 196 KB

Raw Rust toolchain support for Wasm Interface Types

License: Apache License 2.0

Rust 80.34% WebAssembly 19.66%

wasm-interface-types's Introduction

wasm-interface-types

A Bytecode Alliance project

A Rust toolkit for working with WebAssembly Interface Types.

Note: This repository is now archived. The interface types proposal has changed quite a lot since this was first implemented and the trajectory of the proposal and the implementation within wasmtime no longer aligns with this repository.

About

This project is a work-in-progress. The official proposal itself has neither an official text specification nor an official binary specification. Instability and breaking changes should be expected from this project.

This is attempting to fill functionality gaps in the proposal to ensure that toolchains can be developed for wasm interface types to help provide feedback on the proposal and also provide a testing ground for ideas to be concretely gamed out.

Functionality provided by this project currently is:

  • wat2wasm - a converter from a textual format of wasm interface types to a binary *.wasm module, including support for wasm interface types

  • wasm2wat - same as above, but the other way around. Takes a *.wasm module and prints out the *.wat file, including interface types annotations if there are any.

  • crates/text - a Rust library which parses the text format for wasm interface types

  • crates/parser - a Rust library which parses the binary format for wasm interface types

  • crates/writer - a Rust library which is a raw interface for writing the binary format of wasm interface types

  • crates/validator - a Rust library which performs validation over a wasm module which contains wasm interface types, specifically focusing on the wasm interface types section.

  • crates/printer - a Rust library which will print the binary representation of a wasm interface types *.wasm blob into its textual format.

  • crates/walrus - an implementation of a custom section type for the walrus Rust crate, useful for more advanced transformation on interface type sections.

The current state of the binary encoding as well as some semantic nodes are located in BINARY.md as well as SEMANTICS.md. To reiterate though, this is not an official specification and the official specification is in flux, use these tools appropriately!

Tests

The top-level tests directory contains a number of *.wat files which are intended to be various forms of tests for the wasm interface types proposal. They're annotated at the top with things like ;; parse-fail or ;; validate-fail if they're expected to be invalid, otherwise the comment at the bottom is the round-trip representation through the tooling here (text -> binary -> printing).

License

This project is licensed under the Apache 2.0 license with the LLVM exception. See LICENSE for more details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be licensed as above, without any additional terms or conditions.

wasm-interface-types's People

Contributors

alexcrichton avatar dependabot-preview[bot] avatar linclark avatar tschneidereit avatar

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.