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

Brian G brian at westwoodsvcs.com
Sat Aug 6 09:04:46 CEST 2022


How did it work with the llvm when it was being used
--
Thanks
Brian G Friday, 05 August 2022, 05:44AM -07:00 from Jussi Lahtinen  jussi.lahtinen at gmail.com :

>You misunderstood. It does make C code (and compile it), but the code needs Gambas to run. If your program uses a library, then you need the library to run the code.
>
>Jussi
> 
>
>On Fri, Aug 5, 2022 at 6:10 AM Brian G < brian at westwoodsvcs.com> wrote:
>>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 ]----
>>
>>----[  http://gambaswiki.org/wiki/doc/netiquette ]----
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220806/ddf715f2/attachment-0001.htm>


More information about the User mailing list