From 20b408ff3eff87e66a70a1045db1a47a48cd9b09 Mon Sep 17 00:00:00 2001 From: Ellie Date: Tue, 21 Jun 2022 20:02:46 +0900 Subject: [PATCH] Update install rustup --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 91b24b229..0f9cdac6b 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ To build RustPython locally, do the following: $ git clone https://github.com/RustPython/RustPython $ cd RustPython # --release is needed (at least on windows) to prevent stack overflow + + $ curl https://sh.rustup.rs -sSf | sh -s -- -y $ cargo run --release demo.py Hello, RustPython! @@ -38,7 +40,7 @@ Or use the interactive shell: Welcome to rustpython >>>>> 2+2 4 - + NOTE: For windows users, please set `RUSTPYTHONPATH` environment variable as `Lib` path in project directory. (e.g. When RustPython directory is `C:\RustPython`, set `RUSTPYTHONPATH` as `C:\RustPython\Lib`) @@ -69,22 +71,24 @@ this isn't officially supported and may be out of date: $ conda install rustpython -c conda-forge $ rustpython - ### WASI You can compile RustPython to a standalone WebAssembly WASI module so it can run anywhere. Build + ```shell $ cargo build --target wasm32-wasi --no-default-features --features freeze-stdlib,stdlib --release ``` Run by wasmer + ```shell $ wasmer run --dir . target/wasm32-wasi/release/rustpython.wasm extra_tests/snippets/stdlib_random.py ``` Run by wapm + ```shell $ wapm install rustpython $ wapm run rustpython @@ -104,17 +108,17 @@ cargo build --release --target wasm32-wasi --features="freeze-stdlib" ### JIT (Just in time) compiler -RustPython has a **very** experimental JIT compiler that compile python functions into native code. +RustPython has an **very** experimental JIT compiler that compile python functions into native code. #### Building By default the JIT compiler isn't enabled, it's enabled with the `jit` cargo feature. $ cargo run --features jit - + This requires autoconf, automake, libtool, and clang to be installed. -#### Using +#### Using To compile a function, call `__jit__()` on it.