Skip to content

Commit c6352a8

Browse files
authored
Update README.md
1 parent 6d82d71 commit c6352a8

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

examples/plain-javascript/README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,22 @@
33
This template should help get you started developing with Tauri and Python Plugin
44
and Vanilla Javascript
55

6-
## Modifications on default template to add plugin:
6+
## Quick Start
7+
- install rust, python and nodeJs
8+
- run `npm install` in the tauri-plugin-python base path (`cd ../../`)
9+
- run `npm run build` in the tauri-plugin-python base path
10+
- run `npm install` in the example path (`cd examples/plain-javascript`)
11+
- run `npm run tauri dev` to start the application
12+
13+
## Manual modifications on default template to add plugin:
714
- add `tauri-plugin-python` to Cargo.toml
815
- add `tauri-plugin-python-api` to package.json
916
- modify `permissions:[]` in src-tauri/capabilities/default.json and add "python:default"
1017
- modify `src-tauri/src-python/main.py` and add python code, for example `def greet_python(..`
1118
- add `.plugin(tauri_plugin_python::init())` to `src-tauri/src/lib.rs`
12-
- include javascript for python plugin for example by adding `<script type="module" src="/tauri-plugin-python-api/index.iife.js" defer></script>`
19+
- include javascript for python plugin in the index.html file for example by adding `<script type="module" src="/tauri-plugin-python-api/index.iife.js" defer></script>`
1320
- register python functions in javascript by calling `registerFunction("greet_python");`
14-
- calling python function by calling `py.greet_python(...)`
21+
- calling python function by calling `call.greet_python(...)`
1522

1623
## Recommended IDE Setup
1724

0 commit comments

Comments
 (0)