From ded30f8319103d2977337b94cdce7754e0df200f Mon Sep 17 00:00:00 2001 From: rmliddle Date: Tue, 23 Oct 2018 20:48:41 +1100 Subject: [PATCH] formatting and readme changes --- README.md | 5 +++-- wasm/src/main.rs | 6 ++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ab1dc8ef6..1c5be6b87 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A Python-3 (CPython >= 3.5.0) Interpreter written in Rust :snake: :scream: :metal:. [![Build Status](https://travis-ci.org/RustPython/RustPython.svg?branch=master)](https://travis-ci.org/RustPython/RustPython) -[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) +[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) # Usage @@ -33,6 +33,7 @@ Or use the interactive shell: - `src`: using the other subcrates to bring rustpython to life. - `docs`: documentation (work in progress) - `py_code_object`: CPython bytecode to rustpython bytecode convertor (work in progress) +- `wasm`: Binary crate and resources for WebAssembly build - `tests`: integration test snippets # Contributing @@ -67,7 +68,7 @@ $ cargo test --all ## Setup -Using `rustup` add the compile target `wasm32-unknown-emscripten`. To do so you will need to have [rustup](https://rustup.rs/). +Using `rustup` add the compile target `wasm32-unknown-emscripten`. To do so you will need to have [rustup](https://rustup.rs/) installed. ```bash rustup target add wasm32-unknown-emscripten diff --git a/wasm/src/main.rs b/wasm/src/main.rs index e911dd6b7..0e1ee9e71 100644 --- a/wasm/src/main.rs +++ b/wasm/src/main.rs @@ -1,10 +1,9 @@ extern crate rustpython_parser; extern crate rustpython_vm; -use rustpython_vm::pyobject::{PyResult}; +use rustpython_vm::compile; +use rustpython_vm::pyobject::PyResult; use rustpython_vm::VirtualMachine; -use rustpython_vm::{compile}; - fn main() { let mut vm = VirtualMachine::new(); @@ -20,7 +19,6 @@ fn _run_string(vm: &mut VirtualMachine, source: &str, source_path: Option PyResult { - // This works around https://github.com/RustPython/RustPython/issues/17 source.push_str("\n"); _run_string(vm, &source, None)