formatting and readme changes

This commit is contained in:
rmliddle
2018-10-23 20:48:41 +11:00
parent edbac92160
commit ded30f8319
2 changed files with 5 additions and 6 deletions

View File

@@ -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

View File

@@ -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<String
}
fn run_command(vm: &mut VirtualMachine, mut source: String) -> PyResult {
// This works around https://github.com/RustPython/RustPython/issues/17
source.push_str("\n");
_run_string(vm, &source, None)