Giter Site home page Giter Site logo

wasi-lab's Introduction

saghul's WASI lab

Just some WASI experiments.

Experiments

Duktape JavaScript engine running on WASI.

Status: Runs! Crashes on uncaught excaptions (bug or feature?). Minimal repl.

QuickJS JavaScript engine running on WASI.

Status. Runs!

License

All embedded projects retain their respective changes. Changes made to them and the build files in this repository are licensed under the Apache 2 license.

wasi-lab's People

Contributors

saghul avatar syrusakbary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

wasi-lab's Issues

Error running qjs build on python or ruby wasm ext

So it is possible to compile qjuicks to wasm module. However when trying use it with python for example:

from wasmer import Instance

wasm_bytes = open('./build/qjs.wasm', 'rb').read()
instance = Instance(wasm_bytes)
print('#########')
print(instance.exports)

I get the following error:

> python3 test.py
Traceback (most recent call last):
  File "test.py", line 4, in <module>
    instance = Instance(wasm_bytes)
RuntimeError: Failed to instantiate the module:
    19 link errors: (1 of 19) Import not found, namespace: wasi_unstable, name: fd_prestat_get (2 of 19) Import not found, namespace: wasi_unstable, name: fd_prestat_dir_name (3 of 19) Import not found, namespace: wasi_unstable, name: environ_sizes_get (4 of 19) Import not found, namespace: wasi_unstable, name: environ_get (5 of 19) Import not found, namespace: wasi_unstable, name: args_sizes_get (6 of 19) Import not found, namespace: wasi_unstable, name: args_get (7 of 19) Import not found, namespace: wasi_unstable, name: fd_read (8 of 19) Import not found, namespace: wasi_unstable, name: fd_seek (9 of 19) Import not found, namespace: wasi_unstable, name: fd_write (10 of 19) Import not found, namespace: wasi_unstable, name: fd_close (11 of 19) Import not found, namespace: wasi_unstable, name: clock_time_get (12 of 19) Import not found, namespace: wasi_unstable, name: poll_oneoff (13 of 19) Import not found, namespace: wasi_unstable, name: proc_exit (14 of 19) Import not found, namespace: wasi_unstable, name: fd_fdstat_get (15 of 19) Import not found, namespace: wasi_unstable, name: path_open (16 of 19) Import not found, namespace: wasi_unstable, name: path_rename (17 of 19) Import not found, namespace: wasi_unstable, name: path_unlink_file (18 of 19) Import not found, namespace: wasi_unstable, name: path_remove_directory (19 of 19) Import not found, namespace: wasi_unstable, name: fd_fdstat_set_flags

How to go about this?

New quickjs versions

Hi, there's been a new version of quickjs released since you last updated the repository (up to 2020-04-12 now). Would you be interested in still updating this package/patch? If you're not, I've forked your patch to robot-rumble/qjs-wasi and intend on keeping it up to date; I'd love to update the quickjs wapm package along with it, if you'd like to transfer/add maintainership.

Compiling for DFINITY

I stumbled upon this project while trying to find a solution to run javascirpt on DFINITY(dfinity.org). To do so I need a wasm module that I can define a .did file for. Given these two things I should be able to run C code in a dfinity canister. I've successfully accomplished this using the example at https://github.com/skilesare/examples/tree/master/c/reverse.

I'd love to get either duktape or quickjs running. All I really need is the ability to submit some code and have it evaluated. I guess I also need to keep track of the current context I'm running in as well. Theoretically dfinity has orthogonal persistance so once the context is up and running it should stay that way. It might be a fun project and I'd love to at least get some pointers on where to start. I know very little about c and haven't compiled anything significant in it in about 25 years so some hand holding would be required.

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.