GithubHelp home page GithubHelp logo

isabella232 / wasi-fs-access Goto Github PK

View Code? Open in Web Editor NEW

This project forked from googlechromelabs/wasi-fs-access

0.0 0.0 0.0 50.1 MB

This is a demo shell powered by WebAssembly, WASI, Asyncify and File System Access API.

Home Page: https://wasi.rreverser.com/

License: Apache License 2.0

HTML 1.69% TypeScript 84.20% C 14.11%

wasi-fs-access's Introduction

wasi-fs-access

What

This is a demo shell powered by WebAssembly, WASI, Asyncify and File System Access API.

You can access the live version here: https://wasi.rreverser.com/

Or watch a video showing some of the features: Youtube recording

How

It provides WASI bindings implementation that proxies any filesystem requests to a real, host filesystem. This allows apps built in languages like C, C++, Rust and others to be compiled to WebAssembly and work as usual within a browser sandbox, accessing and manipulating files in a "real world".

Since WASI APIs are synchronous by nature, but Web APIs are traditionally asynchronous to avoid blocking the main thread, Asyncify is used to bridge the two types of APIs together. Asyncify is a feature created as part of Emscripten and later extended to work with arbitrary WebAssembly files with the help of a custom JavaScript wrapper.

A Rust port of coreutils with some patches was chosen for the demo purposes, but it should be possible to extract and reuse same bindings for any applications compiled for the WebAssembly + WASI target.

Note that some commands in the demo might not work due to either limitations of the WASI itself (such as an absent concept of "current working directory" and, correspondingly, relative paths and such), limitations of the File System Access API (such as an absent support for symlinks), or simply due to hardcoded assumptions about the target system in the used coreutils codebase itself. Most of those limitations can be easily worked around or will be naturally fixed as both APIs develop over time.

Want to learn more?

Check out my presentation from the WebAssembly Live! here: https://www.slideshare.net/RReverser/asyncifying-webassembly-for-the-modern-web

(Video recordings are coming soon)

wasi-fs-access's People

Contributors

rreverser 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.