Wasm hybrid application hello world anyone?

The great thing about modern HTML5 + Wasm (or Asm.js) is that it is the first UI technology that works effectively everywhere, which means:

  • Web, of course, including as offline app,
  • Desktop, via electron (or servo or sciter or something)
  • Mobile, via cordova

And applications that work in all three ways are certainly being written. E.g. several instant messaging applications are made that way. But using other languages. And I would like to use Rust.

So what I would like to see is an example application that:

  • Uses Rust, with suitable framework (yew comes to mind) to show simple UI.
  • Comes with build scripts to pack it for web, with electron and with cordova (probably using wasm-pack somewhere in the process).

I would also like to see build script for Travis and one completely dockerised (as the corresponding Dockerfile serves as testable documentation of the development environment).

Is there anything like that? Is anybody working on anything like that?

If not, I'll likely give it a shot.

2 Likes

I am learning Rust and Wasm.
I prepared a simple memory game project to see how it works on the web, with electron and with cordova.
All the projects start with the name "mem1":
https://github.com/LucianoBestia

Sadly the cordova app is not working on android. But it works in the browser on win10 when using the development server of PhoneGap.
I didn't try it yet on iOS.
I am working on it, but the infoation are scarce.

I found the problem and solved it.
The wasm file is opened in javascript in an ajax call.
Modern browsers don’t alow ajax on local files.
PhoneGap app works with local files.
I changed the location of the wasm file to an URL on github and now it works.
https://github.com/LucianoBestia/mem1_phonegap

Oi faz tempo que postou isto!
Eu estou trabalhando e estudando para fazer um sistema de aplicação que seja PWA(Progressive Web Aplication) que rode de forma hibrida e lisa nos sistemas, estou pesquisando ainda se o WASM dá suporte para modelos 3D e se isso ficaria perfomatico no navegador, utilizando Oculus CardBox, quero saber se tem software que ajudem a inserir um Framework como o WASM para que possa utilizar o recurso Blutooth tambem dos celulares.
Utilizarei Rust para ficar mais rapido!
Mais ainda estou com duvida se WASM roda bem a parte Blutooth da aplicação e se dá suporte para aplicações de renderização 3D de realidade virtual!