mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
formatting and readme changes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
A Python-3 (CPython >= 3.5.0) Interpreter written in Rust :snake: :scream: :metal:.
|
||||
|
||||
[](https://travis-ci.org/RustPython/RustPython)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
[](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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user