Python bindings for Wasm3, the fastest WebAssembly interpreter

Overview

pywasm3

Python bindings for Wasm3, the fastest WebAssembly interpreter

Main repository: Wasm3 project

Install

# Latest release:
pip3 install pywasm3

# Bleeding edge version:
pip3 install https://github.com/wasm3/pywasm3/archive/main.tar.gz

# Or, if you have a local copy:
pip3 install .

Usage example

import wasm3, base64

# WebAssembly binary
WASM = base64.b64decode("AGFzbQEAAAABBgFgAX4"
    "BfgMCAQAHBwEDZmliAAAKHwEdACAAQgJUBEAgAA"
    "8LIABCAn0QACAAQgF9EAB8Dws=")

env = wasm3.Environment()
rt  = env.new_runtime(1024)
mod = env.parse_module(WASM)
rt.load(mod)
wasm_fib = rt.find_function("fib")
result = wasm_fib(24)
print(result)                       # 46368

License

This project is released under The MIT License (MIT)

You might also like...
Minerva: a fast and flexible tool for deep learning on multi-GPU. It provides ndarray programming interface, just like Numpy. Python bindings and C++ bindings are both available. The resulting code can be run on CPU or GPU. Multi-GPU support is very easy. Python Inference Script is a Python package that enables developers to author machine learning workflows in Python and deploy without Python.
Python Inference Script is a Python package that enables developers to author machine learning workflows in Python and deploy without Python.

Python Inference Script(PyIS) Python Inference Script is a Python package that enables developers to author machine learning workflows in Python and d

A WebAssembly interpreter written in C for demonstration.
A WebAssembly interpreter written in C for demonstration.

wasmc 中文文档 A WebAssembly interpreter written in C for demonstration. This repository implements a WebAssembly interpreter. It is written to clarify ho

Freeze OS is a cross-platform operating system emulator that runs on top of an interpreter called the Freeze interpreter.
Freeze OS is a cross-platform operating system emulator that runs on top of an interpreter called the Freeze interpreter.

Freeze OS is a cross-platform operating system emulator that runs on top of an interpreter called the Freeze interpreter. The operating system code is basically written in the Freeze programming language that is passed to the Freeze interpreter. The idea is to skip instances where the operating system needs to handle low level operators and focus on higher level stuff, like malware analysis, AI, and others.

Fastest-lap is an optimal laptime simulator, written in C++, and with a python API.
Fastest-lap is an optimal laptime simulator, written in C++, and with a python API.

Fastest-lap 🏁 🏎 Fastest-lap is an optimal laptime simulator, written in C++, and with a python API. What can be done Numerical G-G diagram: given a

Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL
Minimalistic C++/Python GUI library for OpenGL, GLES2/3, Metal, and WebAssembly/WebGL

NanoGUI NanoGUI is a minimalistic cross-platform widget library for OpenGL 3+, GLES 2/3, and Metal. It supports automatic layout generation, stateful

A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀
A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀

A tiny programming language that transpiles to C, C++, Java, TypeScript, Python, C#, Swift, Lua and WebAssembly 🚀

A simple, lightweight Python 2.7 interpreter, with predictable memory management and without global locks.

libPyVM is a compact Python 2.7 interpreter that can be used in various places where the standard CPython interpreter is not appropriate or cumbersome

C++ (with python bindings) library for easily reading/writing/manipulating common animation particle formats such as PDB, BGEO, PTC. See the discussion group @ http://groups.google.com/group/partio-discuss

Partio - A library for particle IO and manipulation This is the initial source code release of partio a tool we used for particle reading/writing. It

Python bindings of silk codec.

Python silk module. --- pysilk --- APIs See test\test.py. import pysilk as m m.silkEncode(buf , 24000) m.silkDecode(buf , 24000) #the first param is b

PyCppAD — Python bindings for CppAD Automatic Differentiation library

PyCppAD is an open source framework which provides bindings for the CppAD Automatic Differentiation(CppAD) C++ library in Python. PyCppAD also includes support for the CppADCodeGen (CppADCodeGen), C++ library, which exploits CppAD functionality to perform code generation.

Python bindings for open source MuJoCo

pymujoco Python bindings for open source MuJoCo using pybind11. from pymujoco import * r = mjv_create_renderer() #help(p) m = mj_loadXML("humanoid.xm

CppADCodeGen with an easy Eigen interface and Python bindings.

CppADCodeGenEigenPy CppADCodeGen with an easy Eigen interface and Python bindings. This project has been tested on Ubuntu 16.04, 18.04, and 20.04. It

C++ library for audio and music analysis, description and synthesis, including Python bindings

Essentia Essentia is an open-source C++ library for audio analysis and audio-based music information retrieval released under the Affero GPL license.

Source code for the TKET quantum compiler, Python bindings and utilities

tket Introduction This repository contains the full source code for tket, a quantum SDK. If you just want to use tket via Python, the easiest way is t

A C++ framework for MDPs and POMDPs with Python bindings
A C++ framework for MDPs and POMDPs with Python bindings

AI-Toolbox This C++ toolbox is aimed at representing and solving common AI problems, implementing an easy-to-use interface which should be hopefully e

The fastest feature-rich C++11/14/17/20 single-header testing framework
The fastest feature-rich C++11/14/17/20 single-header testing framework

master branch Windows All dev branch Windows All doctest is a new C++ testing framework but is by far the fastest both in compile times (by orders of

Jsmn is a world fastest JSON parser/tokenizer. This is the official repo replacing the old one at Bitbucket

JSMN jsmn (pronounced like 'jasmine') is a minimalistic JSON parser in C. It can be easily integrated into resource-limited or embedded projects. You

Fastest Integer Compression
Fastest Integer Compression

TurboPFor: Fastest Integer Compression TurboPFor: The new synonym for "integer compression" 🆕 (2019.11) ALL functions now available for 64 bits ARMv8

Owner
Wasm3 Labs
Wasm3 Labs
Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c

Very fast Markdown parser and HTML generator implemented in WebAssembly, based on md4c

Rasmus 1.2k Oct 2, 2022
A interpreter that runs the script which is programmed in the language of FF0 script (or you can call it as Warfarin)

ff0-script A interpreter that runs the script which is programmed in the language of FF0 script (or you can call it as Warfarin) You can do it, unders

null 24 Apr 27, 2022
RayLib extern bindings for Haxe

raylib-haxe Haxe bindings for RayLib usage haxelib git raylib-haxe https://github.com/haxeui/raylib-haxe package; import RayLib.*; import RayLib.Cam

HaxeUI 23 Sep 9, 2022
Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming, Currently works only for windows but feel free the expand t

FSasquatch 30 Sep 10, 2022
SWIG bindings for raylib (to Lua, and hopefully other languages)

swigraylib SWIG binding for raylib This repo generates raylib bindings to other languages (eg. Lua), by providing a raylib.i SWIG interface file. SWIG

null 6 Oct 28, 2021
autogen bindings to Raylib 4.0 and convenience wrappers on top. Requires use of `unsafe`

Raylib-CsLo Raylib-CsLo LowLevel autogen bindings to Raylib 4.0 and convenience wrappers on top. Requires use of unsafe A focus on performance. No run

NotNot 63 Oct 3, 2022
Python random library for c++

Python random library for c++

tyson 1 Oct 28, 2021
Python module to reduce a cmake file to an AST

CMake AST Status Travis CI (Ubuntu) AppVeyor (Windows) Coverage PyPI Licence cmake-ast has been tested against every single CMake module that ships wi

ポリ平方 POLYSQUARE 29 Sep 14, 2022
🚀 The fastest WebAssembly interpreter, and the most universal runtime

Wasm3 The fastest WebAssembly interpreter, and the most universal runtime. Based on CoreMark 1.0 and independent benchmarks. Your mileage may vary. Ge

Wasm3 Labs 5.3k Oct 2, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.5k Oct 2, 2022