Giter Site home page Giter Site logo

wasm3-openwrt-packages's Introduction

Note

I regret to inform the community that since my house was destroyed by russians who invaded my country, Wasm3 will enter a minimal maintenance phase. At this time, I am unable to continue the development of new features. However, I am committed to keeping the project alive and will actively review and merge incoming Pull Requests. I deeply appreciate your understanding and support during this difficult period. Your contributions to Wasm3 are now more valuable than ever.

Wasm3

StandWithUkraine GitHub issues Tests status Fuzzing Status GitHub license

A fast WebAssembly interpreter and the most universal WASM runtime.
Based on CoreMark 1.0 and independent benchmarks. Your mileage may vary.

X (formerly Twitter) Follow Discord

Installation

Please follow the installation instructions.

Wasm3 can also be used as a library for:

Python3 Rust C/C++ GoLang Zig Perl
Swift .Net Nim Arduino, PlatformIO, ParticleQuickJS

Status

wasm3 passes the WebAssembly spec testsuite and is able to run many WASI apps.

Minimum useful system requirements: ~64Kb for code and ~10Kb RAM

wasm3 runs on a wide range of architectures (x86, x86_64, ARM, RISC-V, PowerPC, MIPS, Xtensa, ARC32, ...) and platforms:

  • Linux, Windows, OS X, FreeBSD, Android, iOS
  • OpenWrt, Yocto, Buildroot (routers, modems, etc.)
  • Raspberry Pi, Orange Pi and other SBCs
  • MCUs: Arduino, ESP8266, ESP32, Particle, ... see full list
  • Browsers. Yes, using WebAssembly itself!
  • wasm3 can execute wasm3 (self-hosting)

Features

Webassembly Proposals Extra
☑ Import/Export of Mutable Globals ☑ Structured execution tracing
☑ Non-trapping float-to-int conversions ☑ Big-Endian systems support
☑ Sign-extension operators ☑ Wasm and WASI self-hosting
☑ Multi-value ☑ Gas metering
☑ Bulk memory operations (partial support) ☑ Linear memory limit (< 64KiB)
⏳ Custom page size
⏳ Multiple memories
⏳ Reference types
☐ Tail call optimization
☐ Fixed-width SIMD
☐ Exception handling
☐ Stack Switching

Motivation

Why use a "slow interpreter" versus a "fast JIT"?

In many situations, speed is not the main concern. Runtime executable size, memory usage, startup latency can be improved with the interpreter approach. Portability and security are much easier to achieve and maintain. Additionally, development impedance is much lower. A simple library like Wasm3 is easy to compile and integrate into an existing project. (Wasm3 builds in a just few seconds). Finally, on some platforms (i.e. iOS and WebAssembly itself) you can't generate executable code pages in runtime, so JIT is unavailable.

Why would you want to run WASM on embedded devices?

Wasm3 started as a research project and remains so by any means. Evaluating the engine in different environments is part of the research. Given that we have Lua, JS, Python, Lisp, ... running on MCUs, WebAssembly is a promising alternative. It provides toolchain decoupling as well as a completely sandboxed, well-defined, predictable environment. Among practical use cases we can list edge computing, scripting, plugin systems, running IoT rules, smart contracts, etc.

Used by

                       

Further Resources

Demos
Installation instructions
Cookbook
Troubleshooting
Build and Development instructions
Supported Hardware
Testing & Fuzzing
Performance
Interpreter Architecture
Logging
Awesome WebAssembly Tools

License

This project is released under The MIT License (MIT)

wasm3-openwrt-packages's People

Contributors

vshymanskyy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

wasm3-openwrt-packages's Issues

Error: WASI not linked when executing on openwrt

  • Hi, @vshymanskyy Thank you for your awesome project. I hope you can help me solve the problem of using wasm on openwrt.

  • When I followed the steps to generate the .ipk file, the following warning appeared, but the wasm3_0.5.0-1_x86_64.ipk file was generated normally. (OS: centOS7)

    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'eip197-mini-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'r8169-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'e100-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'bnx2-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'bnx2x-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'ar3k-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'mwifiex-sdio-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb2', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'edgeport-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'kmod-phy-bcm-ns-usb3', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'amdgpu-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'radeon-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'prism54-firmware', which does not exist
    WARNING: Makefile 'package/kernel/linux/Makefile' has a dependency on 'rtl8192su-firmware', which does not exist
    tmp/.config-package.in:72:warning: ignoring type redefinition of 'PACKAGE_libc' from 'bool' to 'tristate'
    tmp/.config-package.in:100:warning: ignoring type redefinition of 'PACKAGE_libgcc' from 'bool' to 'tristate'
    tmp/.config-package.in:221:warning: ignoring type redefinition of 'PACKAGE_libpthread' from 'bool' to 'tristate'
    tmp/.config-package.in:249:warning: ignoring type redefinition of 'PACKAGE_librt' from 'bool' to 'tristate'
    
  • Then, I successfully installed the .ipk file on the openwrt system.

  • I want to verify whether openwrt can use wasm3 normally. So I followed the instructions at https://github.com/wasm3/wasm3/blob/main/docs/Cookbook.md and created the hello.wasm file on centOS following the instructions in the Rust WASI app section.

  • When I copied hello.wasm to the openwrt system, I found the following error.

    root@OpenWrt:~# wasm3 hello.wasm 
    Error: WASI not linked
    
  • Could you help me analyze what went wrong? In addition, I noticed that this issue #2 mentioned "This package is only for native wasm3 executable.". Can you provide a demo of wasm file that can run on openwrt?

Documenation is unclear => unable to build 😞

Hello Wasm3 team!

Thanks for creating this excellent project, I highly appreciate the hard work that goes into open source software.

WASM3 got my attention because it can target both ESP8266 as well as OpenWRT so of course I was super excited to try it!

I've started with OpenWRT but so far I've failed to build 😢

the documentation is very unclear, this is the only information I have to go by:

echo "src-git wasm3 git://github.com/wasm3/wasm3-openwrt-packages.git" >> ./feeds.conf
./scripts/feeds update -a
./scripts/feeds install -p wasm3 -a
make menuconfig

Steps to reproduce:

  • spin up new clean VM ubuntu 18.04 (e.g using vagrant up)
  • sudo apt-get install make (docs does not mention what is required, but we assume this because there is a Makefile)
  • in the new machine clone down this repo and cd into it:
$ git clone https://github.com/wasm3/wasm3-openwrt-packages/
$ cd wasm3-openwrt-packages/

now follow the first step in "documentation":

$ echo "src-git wasm3 git://github.com/wasm3/wasm3-openwrt-packages.git" >> ./feeds.conf

ok so far so good, next follow next line:

$ ./scripts/feeds update -a
-bash: ./scripts/feeds: No such file or directory

ok, clearly that directory doesn't exist!

I'm really sorry if this is perhaps very simple! but clear build steps and exactly what dependencies are required would be super appreciated!

I need your help.

Hi @vshymanskyy
Hope you are well.
Thank you for your wonderful project and for sharing it with us.

So I am going to use this package in the Openwrt based device and build a Python package.
I could build the executable package according to your document, it was correct.

But, I need to build it as a Python package so that I could use it with Python on my device.
So how can I do that? So should I edit the make file?
Could you please let me know about this solution?

Thank you so much.

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.