CrossCopy / tauri-plugin-clipboard

A Tauri clipboard plugin with text, files, html, RTF, and image support. Clipboard content update monitoring is also supported.
https://crosscopy.github.io/tauri-plugin-clipboard/
MIT License
122 stars 6 forks source link

Exports APIs for core process. #2

Closed zzzze closed 1 year ago

zzzze commented 1 year ago

Allow core process accesses the APIs of clipboard.

HuakunShen commented 1 year ago

Allow core process accesses the APIs of clipboard. @zzzze Hi, thank you for the PR. May I ask what does the PR do in more details?

I am not very familiar with the Tauri toolcain.

Why do we need this? What does "Allow core process accesses the APIs of clipboard." mean?

The original way works. So I am not sure what this means.

Is there a documentation or example I can refer to?

Thanks

zzzze commented 1 year ago

In Tauri, the core process written in Rust is the backend of the app. The APIs exported by [tauri::command] can only be invoked in the frontend. So this PR exports the APIs to Rust. I added a usecase in README already.

HuakunShen commented 1 year ago

In Tauri, the core process written in Rust is the backend of the app. The APIs exported by [tauri::command] can only be invoked in the frontend. So this PR exports the APIs to Rust. I added a usecase in README already.

I see, thanks for the explanation.