Skip to content

Commit 2066158

Browse files
authored
docs: Update Readme.md
1 parent eda3ee3 commit 2066158

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

README.md

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
# rustimport - Import Rust directly from Python!
22

33
<p align=center>
4-
<a target="_blank" href="https://www.python.org/downloads/" title="Python version"><img src="https://img.shields.io/badge/python-%3E=_3.8-green.svg"></a>
5-
<a target="_blank" href="https://pypi.org/project/rustimport/" title="PyPI version"><img src="https://img.shields.io/pypi/v/rustimport?logo=pypi"></a>
6-
<a target="_blank" href="LICENSE" title="License: MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg"></a></a>
4+
<a target="_blank" href="https://www.python.org/downloads/" title="Python version"><img src="https://img.shields.io/badge/python-%3E=_3.8-green.svg" /></a>
5+
<a target="_blank" href="https://pypi.org/project/rustimport/" title="PyPI version"><img src="https://img.shields.io/pypi/v/rustimport?logo=pypi" /></a>
6+
<a target="_blank" href="https://pypi.org/project/rustimport/" title="PyPI version"><img src="https://img.shields.io/pypi/dm/rustimport" /></a>
7+
<a target="_blank" href="LICENSE" title="License: MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" /></a></a>
78
</p>
89

9-
rustimport was heavily inspired by and is partly based upon [cppimport](https://github.com/tbenthompson/cppimport). Check it out if you're interested in the same functionality for C and C++!
10+
Arguably the simplest way to use rust from python – no manual compilation step, setup work or binding code required. rustimport provides a simple CLI, makes sure the compiled extension stays up to date with your source code and supports IPython/Jupyter notebooks.
11+
12+
<i>rustimport was heavily inspired by and is partly based upon [cppimport](https://github.com/tbenthompson/cppimport). Check it out if you're interested in similar functionality for C and C++!</i>
1013

1114
## Installation
1215

@@ -39,6 +42,8 @@ Hurray, you've called some Rust code from Python using a combination of `rustimp
3942

4043
This workflow enables you to edit both Rust files and Python and recompilation happens automatically and transparently! It's also handy for quickly whipping together an optimized version of a slow Python function.
4144

45+
## Using the CLI
46+
4247
To easily create a new single-file extension (like above), or a complete crate, use the provided tool:
4348
```bash
4449
$ python3 -m rustimport new my_single_file_extension.rs
@@ -58,6 +63,8 @@ Hello from my_crate, implemented in Rust!
5863

5964
Smooth!
6065

66+
The CLI can also be used to pre-compile your rust code for production so you don't have to have the rust toolchain on your production environments – see [below](#usage-in-production) for more.
67+
6168
## An explanation
6269

6370
Okay, now that I've hopefully convinced you on how exciting this is, let's get into the details of how to do this yourself. First, the comment at top is essential to opt in to rustimport. Don't forget this! (See below for an explanation of why this is necessary.)

0 commit comments

Comments
 (0)