summaryrefslogtreecommitdiff
path: root/python/arti_rpc/README.md
blob: 689de8f134f085cbda7f7afc910d42683da5d37c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
TODO RPC:

As of this writing (24 Sep 2024)
this directory holds work-in-progress Python wrappers
for the Arti RPC client library.

All of these APIs are unstable, and the Python is in flux:
don't rely on these yet!

----

You probably don't want to try this out yet;
most of the configuration and setup is unstable.
But if you're brave, and you're on a Unix-like platform...


Build arti with RPC support:

```
cargo build --release --all-features -p arti
```

Build `arti-rpc-client-core` with FFI support:

```
cargo build --release --all-features -p arti-rpc-client-core
```

Tell this library where to find `arti-rpc-client-core`:

```
export LIBARTI_RPC_CLIENT_CORE=$(pwd)/target/release/libarti_rpc_client_core.so
```

Start arti:

```
./target/release/arti proxy -o "rpc.rpc_listen = \"${HOME}/.local/run/arti/SOCKET\""
```

Run the demo!

```
PYTHONPATH="./python/arti_rpc/src:${$PYTHONPATH:-}" python3 \
        python/arti_rpc/samples/rpc_demo.py
```