Skip to content

Commit e3eed8a

Browse files
committed
Update README and powershell script to improve onboarding
1 parent f8cb2f3 commit e3eed8a

2 files changed

Lines changed: 15 additions & 26 deletions

File tree

README.md

Lines changed: 12 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,19 @@ RustPython requires Rust latest stable version (e.g 1.43.0 at May 24th 2020).
2424
To check Rust version: `rustc --version` If you wish to update,
2525
`rustup update stable`.
2626

27-
To test RustPython, do the following:
27+
To build RustPython locally, do the following:
2828

2929
$ git clone https://github.com/RustPython/RustPython
3030
$ cd RustPython
31-
# if you're on windows:
31+
# if you're on windows:
3232
$ powershell scripts\symlinks-to-hardlinks.ps1
33-
$ cargo run demo.py
33+
# --release is needed (at least on windows) to prevent stack overflow
34+
$ cargo run --release demo.py
3435
Hello, RustPython!
3536

3637
Or use the interactive shell:
3738

38-
$ cargo run
39+
$ cargo run --release
3940
Welcome to rustpython
4041
>>>>> 2+2
4142
4
@@ -74,7 +75,7 @@ cargo build --release --target wasm32-wasi --features="freeze-stdlib"
7475

7576
> Note: we use the `freeze-stdlib` to include the standard library inside the binary.
7677
77-
### JIT(Just in time) compiler
78+
### JIT (Just in time) compiler
7879

7980
RustPython has an **very** experimental JIT compiler that compile python functions into native code.
8081

@@ -107,12 +108,11 @@ Then `examples/hello_embed.rs` and `examples/mini_repl.rs` may be of some assist
107108

108109
## Disclaimer
109110

110-
RustPython is in a development phase and should not be used in production or a
111-
fault intolerant setting.
111+
RustPython is in development, and while the interpreter certainly can be used
112+
in interesting use cases like running Python in WASM and embedding into a Rust
113+
project, do note that RustPython is not totally production-ready.
112114

113-
Our current build supports only a subset of Python syntax.
114-
115-
Contribution is also more than welcome! See our contribution section for more
115+
Contribution is more than welcome! See our contribution section for more
116116
information on this.
117117

118118
## Conference videos
@@ -124,7 +124,8 @@ Checkout those talks on conferences:
124124

125125
## Use cases
126126

127-
Allthough rustpython is a very young project, it is already used in the wild:
127+
Although RustPython is a fairly young project, a few people have used it to
128+
make cool projects:
128129

129130
- [pyckitup](https://github.com/pickitup247/pyckitup): a game engine written in
130131
rust.
@@ -174,21 +175,6 @@ methods are often the simplest and easiest way to contribute.
174175
You can also simply run `./whats_left.sh` to assist in finding any unimplemented
175176
method.
176177

177-
## Using a different standard library
178-
179-
As of now the standard library is under construction. You can change a standard
180-
library by setting the RUSTPYTHONPATH environment variable.
181-
182-
To do this, follow this method:
183-
184-
```shell
185-
$ export RUSTPYTHONPATH=./Lib # this is same as the default value
186-
$ cargo run -- -c 'import xdrlib'
187-
```
188-
189-
You can play around with other standard libraries for python. For example, the
190-
[ouroboros library](https://github.com/pybee/ouroboros) or CPython Lib.
191-
192178
## Compiling to WebAssembly
193179

194180
[See this doc](wasm/README.md)

scripts/symlinks-to-hardlinks.ps1

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env powershell
2+
3+
Set-Location -Path $(Split-Path -Parent $PSScriptRoot)
4+
25
git ls-files -s | Select-String '^120000' | ConvertFrom-String -PropertyNames Get-Content,Hash,_,Path | ForEach-Object {
36
$symlink = $_.Path
47

0 commit comments

Comments
 (0)