Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

55 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

wasmfunc

wasmfunc is a Python to WebAssembly Compiler built for converting a typed subset of python code to a compiled Wasm binary.

Installation

pip install wasmfunc

How to use

Annotate your python function with Wasm types

# fib.py
@wasmfunc()
def fib_recursive(n: i32) -> i32:
 if n <= 1:
 return n
 else:
 return fib_recursive(n - 1) + fib_recursive(n - 2)

Then compile with

wasmfunc compile fib.py
# Or python -m wasmfunc compile fib.py

For more examples see examples.

About

a Python to WebAssembly Compiler built for converting a typed subset of python code to a compiled Wasm binary.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /