Skip to content

Commit b277280

Browse files
committed
Add README and manifest fields for the WASM library
1 parent 4cc7f5a commit b277280

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

wasm/lib/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name = "rustpython_wasm"
33
version = "0.1.0"
44
authors = ["Ryan Liddle <[email protected]>"]
55
license = "MIT"
6+
description = "A Python-3 (CPython >= 3.5.0) Interpreter written in Rust, compiled to WASM"
7+
repository = "https://github.com/RustPython/RustPython/tree/master/wasm/lib"
68

79
[lib]
810
crate-type = ["cdylib", "rlib"]

wasm/lib/README.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# RustPython
2+
3+
A Python-3 (CPython >= 3.5.0) Interpreter written in Rust.
4+
5+
[![Build Status](https://travis-ci.org/RustPython/RustPython.svg?branch=master)](https://travis-ci.org/RustPython/RustPython)
6+
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
7+
[![Contributors](https://img.shields.io/github/contributors/RustPython/RustPython.svg)](https://github.com/RustPython/RustPython/graphs/contributors)
8+
[![Gitter](https://badges.gitter.im/RustPython/Lobby.svg)](https://gitter.im/rustpython/Lobby)
9+
10+
## Usage
11+
12+
### Check out our [online demo](https://rustpython.github.io/demo/) running on WebAssembly.
13+
14+
## Goals
15+
16+
- Full Python-3 environment entirely in Rust (not CPython bindings)
17+
- A clean implementation without compatibility hacks
18+
19+
## Quick Documentation
20+
21+
```js
22+
pyEval(code, options);
23+
```
24+
25+
`code`: `string`: The Python code to run
26+
27+
`options`:
28+
29+
- `vars`: `{ [key: string]: any }`: Variables passed to the VM that can be
30+
accessed in Python with the variable `js_vars`. Functions do work, and
31+
recieve the Python kwargs as the `this` argument.
32+
- `print`: `(out: string) => void`: A function to replace the native print
33+
function, by default `console.log`.
34+
35+
## License
36+
37+
This project is licensed under the MIT license.

0 commit comments

Comments
 (0)