Files
RustPython/wasm/lib
Joey Hain 3478251d40 Merge remote-tracking branch 'origin/master' into joey/fun-with-functions
Conflicts:
      vm/src/lib.rs
      vm/src/pyobject.rs
      wasm/lib/src/vm_class.rs
2019-03-02 04:04:22 -08:00
..
2019-02-05 13:39:16 -05:00

RustPython

A Python-3 (CPython >= 3.5.0) Interpreter written in Rust.

Build Status License: MIT Contributors Gitter

Usage

Check out our online demo running on WebAssembly.

Goals

  • Full Python-3 environment entirely in Rust (not CPython bindings)
  • A clean implementation without compatibility hacks

Quick Documentation

pyEval(code, options?);

code: string: The Python code to run

options:

  • vars?: { [key: string]: any }: Variables passed to the VM that can be accessed in Python with the variable js_vars. Functions do work, and receive the Python kwargs as the this argument.
  • stdout?: (out: string) => void: A function to replace the native print function, by default console.log.

License

This project is licensed under the MIT license.