[Gambas-user] Does anyone have any thoughts on webassembly

Brian G brian at westwoodsvcs.com
Fri Aug 5 05:09:33 CEST 2022


I thought that gambas fast actually full converted to c then is compiled and executed
--
Thanks
Brian G Thursday, 04 August 2022, 05:08PM -07:00 from Yves Cloutier  yves.cloutier at gmail.com :

>I'm not an expert on the subject but i think you would need the gambas vm or runtime to be compiled to web assembly. Like pyscript for example an entire python runtime is loaded in the browser i believe.
>On Thu, Aug 4, 2022, 18:43 Brian G < brian at westwoodsvcs.com> wrote:
>>Webassembly is a virtual machine inside the web browser that is now supported by most browsers. It allows a c program to be compiles to web assembly
>>Then run on the web assembly virtual machine.
>>Most compilers now have a webassembly translator or compile directly to web assembly. 
>>Since when a gambas module is fast it is translated to c code and then compiles to native machine code. Perhaps it would be possible compile to web assembly which could be directly sent to the client browser for execution.
>>It would mean I think that all gambas modules would have to be compiled to web assembly library format.
>>web assembly links all required code and libraries to a single app binary I think and then sends it to the browser and runs in in a sandboxed virtual machine.
>>Not sure what else. But it would be quite useful. To write to the app and it just runs on the clients machine in the browser.
>>--
>>Thanks
>>Brian G Thursday, 04 August 2022, 00:08PM -07:00 from Rolf-Werner Eilert  rwe-sse at osnanet.de :
>>
>>>
>>>Am 04.08.22 um 18:57 schrieb Brian G:
>>>>Has anyone tried or have any
>>>>        thoughts on having gambas fast unsafe produce webassembly on the
>>>>        back end for running inside browsers.
>>>>I understand there is a c to webassembly compiler available.
>>>>Not sure what would be involved.
>>>>Any thoughts?
>>>>--
>>>>Thanks
>>>>Brian G
>>>>
>>>>----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>>>>
>>>
>>>I just read an article about PyScript and/or Pyodide and thought
>>>      this might be interesting for Gambas, too. Do you mean something
>>>      like that?
>>>Regards 
>>>Rolf
>>>
>>>
>>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
>>>
>>
>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220805/5f2d90fc/attachment-0001.htm>


More information about the User mailing list