Stream: git-wasmtime

Topic: wasmtime / Issue #2560 Make it possible to write screen-w...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 14:51):

elimisteve opened Issue #2560:

Feature

If it is not possible to do so already, please make it possible for us to write user-facing graphical software that can adapt to the app's width. That is, it must be possible for WASM apps to be "responsive" in the web app sense!

Benefit

This would make it practical to write web apps in a statically typed, non-JavaScript-esque programming language, thus making the world more stable, users more happy, and WASM much more widespread.

Implementation

I don't know how hard it is to safely place some sort of reference representing the current app's width (in pixels) into a WASM sandbox, but having some mechanism for detecting changes to this value probably doesn't make it that easy to pull this off. I still think it's really important to soon so that WASM is way more practical, both in the browser or outside of it!

Alternatives

N/A

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 14:51):

elimisteve edited Issue #2560:

Feature

If it is not possible to do so already, please make it possible for us to write user-facing graphical software that can adapt to the app interface's width. That is, it should be possible for WASM apps to be "responsive" (in the web app sense)!

Benefit

This would make it practical to write web apps in a statically typed, non-JavaScript-esque programming language, thus making the world more stable, users more happy, and WASM much more widespread.

Implementation

I don't know how hard it is to safely place some sort of reference representing the current app's width (in pixels) into a WASM sandbox, but having some mechanism for detecting changes to this value probably doesn't make it that easy to pull this off. I still think it's really important to soon so that WASM is way more practical, both in the browser or outside of it!

Alternatives

N/A

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 15:13):

sunfishcode commented on Issue #2560:

In the browser, this is addressed by existing Web APIs.

Outside the browser, there are not yet any standard graphical APIs, or even any projects to create any yet. I expect there will be in the future, as there are people interested in such projects, and I agree that when this happens, it would be good for these projects to take responsive design into consideration. I encourage you to file issues in those projects when they emerge :slightly_smiling_face:.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 15:13):

sunfishcode closed Issue #2560:

Feature

If it is not possible to do so already, please make it possible for us to write user-facing graphical software that can adapt to the app interface's width. That is, it should be possible for WASM apps to be "responsive" (in the web app sense)!

Benefit

This would make it practical to write web apps in a statically typed, non-JavaScript-esque programming language, thus making the world more stable, users more happy, and WASM much more widespread.

Implementation

I don't know how hard it is to safely place some sort of reference representing the current app's width (in pixels) into a WASM sandbox, but having some mechanism for detecting changes to this value probably doesn't make it that easy to pull this off. I still think it's really important to soon so that WASM is way more practical, both in the browser or outside of it!

Alternatives

N/A

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 15:24):

elimisteve commented on Issue #2560:

In the browser, this is addressed by existing Web APIs.

Sure, if not using WASM and instead using JS and CSS, but can a WASM UI element in the browser be responsive now, including buttons? The WASM UI doesn't need to have a hardcoded width?

Thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 16:09):

bjorn3 commented on Issue #2560:

WASM has no relation at all to UI. WASM programs need to be embedded within a different program. This program can then choose what API's to make available to the WASM program. When you are using WASM in the browser, you need to write a bit of javascript to run the WASM. This javascript code can choose to export specific Web API's to the WASM program or it can export it's own API. If the javascript doesn't export either, the WASM is fundamentally incapable of showing any UI. In fact all a WASM program can do when no API's are exported to it it doing calculations. It can't do anything else in that case.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 16:31):

elimisteve commented on Issue #2560:

Thank you for explaining, @bjorn3 :+1:

view this post on Zulip Wasmtime GitHub notifications bot (Jan 08 2021 at 16:36):

elimisteve commented on Issue #2560:

(Thank you @sunfishcode, too. And yay Fastly for having more foresight than a certain other org...)


Last updated: Dec 23 2024 at 12:05 UTC