WebAssembly / WASI

WebAssembly System Interface
Other
4.72k stars 240 forks source link

Service discovery with MDNS #538

Closed flatmax closed 1 year ago

flatmax commented 1 year ago

I understand that service discovery in the browser is deemed a security flaw, however ... we make hardware and want to use standardised generic webapps to find the hadware and interface to it. In order to do that, we use MDNS to announce a hardware's presence on the LAN, something similar to this : https://github.com/flatmax/BatteryController/blob/master/src/MDNS.js#L41

I'm still looking for a breakthrough in allowing a webapp to do MDNS service discovery - despite it being reguarded as a security flaw - for the marriage between embedded hardware and webapps, it is almost essential !

Can WASI do MDNS service discovery in the browser - which required UDP packets I believe ?

sunfishcode commented 1 year ago

Browsers don't currently implement WASI APIs natively, so WASI running in browsers today is limited by what can be done through existing browser APIs. If there's something you'd need to do in a browser that the existing APIs don't support, you'll need to talk with browser developers to see if they'd be interested in adding support for it.

sunfishcode commented 1 year ago

Closing, as I believe the original question here is answered.