tauri-apps / tauri

Build smaller, faster, and more secure desktop applications with a web frontend.
https://tauri.app
Apache License 2.0
81.86k stars 2.46k forks source link

[feat] webhid API #8237

Open HaoboGu opened 10 months ago

HaoboGu commented 10 months ago

Describe the problem

Electron has APIs for device accessing, like webhid/webusb/webserial. I cannot find any equivalent in tauri. Electron also provides a way to skip the popup to grant access of the device.

reference: https://www.electronjs.org/docs/latest/tutorial/devices#webhid-api

Describe the solution you'd like

Add same APIs

Alternatives considered

No response

Additional context

No response

k26pl commented 9 months ago

These are chromium-only apis, and are not supported on other webwiev engines which are used by tauri. A possible workaround would be using rust usb library.

HigherOrderLogic commented 4 months ago

Hi, I'm also interest in getting this feature implemented.

Can't it be guarded behind some kind if feature flag, and exit the build process if the webview engine isn't supported?