tauri-plugin-pytauri-api¶
Unreleased¶
0.8.0¶
0.7.0¶
BREAKING¶
- 
#178 - feat(plugin-api)!: remove rawPyInvokeandChannel.Migration Before v0.7, IPC between Python and the frontend always usedbytes/ArrayBufferfor data transfer.pyInvokeandChannel.addJsonListenerwould force serialization and deserialization of input and output, whilerawPyInvokeandChannel.onmessagewould directly send and receive rawArrayBufferdata. This mechanism has been improved inv0.7:- 
Now, pyInvokeautomatically chooses whether to serialize based on your input type:- ArrayBuffer/- Uint8Arraywill be sent directly to the backend.
- Other types (any) will be converted toArrayBufferusingJSON.stringifyandTextEncoderbefore being sent to the backend.
 Only the backend can decide whether to deserialize or accept the raw bytes data. 
- 
Only the backend can decide whether to return deserialized JSON data or raw ArrayBufferdata:- If Commandreturns abytestype or Channel.send sends abytestype, the frontend will receive anArrayBuffer.
- If Commandreturns other types (BaseModel/Any) and Channel.send sends astrtype, the frontend will receive automatically deserialized JSON data.
 
- If 
 Therefore: - pyInvokereplaces- rawPyInvoke
- import { Channel } from "@tauri-apps/api/core"replaces- import { Channel } from "tauri-plugin-pytauri-api".
 
- 
0.6.0¶
0.5.0¶
Added¶
- 
#136 - feat(pytauri): accessing the request headers in Commands:Added options?: InvokeOptionsparameter torawPyInvokeandpyInvoke.
0.4.0¶
0.3.0¶
0.2.0¶
Added¶
- #50 - feat: add class Channel extends TauriChannel<ArrayBuffer>for pytauri channels ipc.
Docs¶
- #50 - add tsdoc for all classes and functions.