Skip to content

Commit 96482eb

Browse files
committed
Update README.
1 parent b0baa7f commit 96482eb

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

README.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,24 @@ and partially just stumbling around procedural macros and syn.
1414

1515
Using procedural macros, so of course this needs nightly for now.
1616

17+
## Showcase
18+
19+
Write Rust, get python/ruby/java/pick your poison. Try out the [example](#example):
20+
21+
```bash
22+
cd swig-derive-test
23+
make
24+
python -c "import swig_derive_test as sdt; t = sdt.Test(42); print(t.get_field())"
25+
```
26+
^^^ `Test` is a Rust object, behaving like a native Python class.
27+
28+
29+
## Requirements
30+
31+
Needs [`cargo-expand`](https://github.com/dtolnay/cargo-expand/) and [`swig`](http://swig.org/) installed.
32+
33+
## Organisation
34+
1735
[swiggen](swiggen/) contains the main parsing/generation code, and also a binary
1836
for generating the final binders.
1937

@@ -23,9 +41,6 @@ calls out to swiggen.
2341
[swiggen-derive-test](swiggen-derive-test/) contains an example of the
2442
functionality.
2543

26-
## Requirements
27-
28-
Needs `cargo-expand` and `swig` installed.
2944

3045
## Example
3146

swig-derive-test/Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ PKG_NAME=swig_derive_test
22

33
default: bindings compile
44
bindings:
5-
cargo build
6-
cargo run --manifest-path=../swiggen/Cargo.toml
5+
cargo +nightly build
6+
cargo +nightly run --manifest-path=../swiggen/Cargo.toml
77

88
compile:
99
swig -python -Wextra -c++ -o swig_wrap.cpp swig.i

0 commit comments

Comments
 (0)