PhilippeMonteil
Topic Author
Posts: 6
Joined: 25 Feb 2017, 10:53

Re: plans for WASM?

03 Mar 2017, 13:44

<<The scary thing here is exposing all the API from C++ to JS. We already did it with C#, and it is being really painful using SWIG. We would like to find time to try a different approach using LLVM <<(it wasn't so popular when we started this part in Noesis)
I was thinking that one of the goals of WASM was to produce C++ (among others) modules able to:
http://webassembly.org/docs/high-level-goals:
- allow synchronous calls to and from JavaScript;
- access browser functionality through the same Web APIs that are accessible to JavaScript;
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: plans for WASM?

07 Mar 2017, 06:31

Wouldn't one way to go ahead with this be to just use native C++ and emscripten plus webgl? And compile that to asm.js and wasm in the future? This is how Unreal 3 was ported in 4 days.
Yes, that exactly the path we tried. And it works *BUT* that doesn't provide you a clean API to Javascript to for example, create a button, extend a button, invoke a method of a button. The emscripten path basically ports an executable from native to the web. That is ideal for Unity because all the scripting is translated to C++ and then to Javascript using empscripten.

So basically if we followed this approach, the UI would be programmed in C++ and then translated to Javascript. And I think that is quite inconvenient...
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: plans for WASM?

07 Mar 2017, 06:52

I was thinking that one of the goals of WASM was to produce C++ (among others) modules able to:
http://webassembly.org/docs/high-level-goals:
- allow synchronous calls to and from JavaScript;
- access browser functionality through the same Web APIs that are accessible to JavaScript;
Yes, we provide thousands of C-API functions in our library that are wrapped with a clean, object oriented layer in C#. We need to do the same in Javascript I would say. Although we didn't thoroughly investigate WASM yet.
 
Ziriax
Posts: 60
Joined: 10 Dec 2015, 17:59
Location: Belgium
Contact:

Re: plans for WASM?

07 Mar 2017, 09:48

Having a Javascript and preferably a Typescript API would be ideal, but it feels like a second step, and doesn't help to make a write-once cross platform solution, unless Javascript is now used for the user code on all platforms instead of C++ or C#

Currently if I decide to develop an application using native C++ and Noesis, I can port it to almost all platforms except the web. Supporting emscripten + webgl would add the web platform too.

My two cents :-)
Peter Verswyvelen,
Strongly Typed Solutions
 
nokola
Posts: 188
Joined: 10 Mar 2015, 05:29

Re: plans for WASM?

07 Mar 2017, 16:51

re: clean API for JavaScript.
I wonder how many people care about that vs just having OpenGL. Personally, I'd rather have something e.g. callable from C# as we do anyway on all the non-javascript platforms than wait for good usable-from-JavaScript-solution. Not sure if I'm the majority though. Just my 2c :)
 
Ziriax
Posts: 60
Joined: 10 Dec 2015, 17:59
Location: Belgium
Contact:

Re: plans for WASM?

07 Mar 2017, 17:15

@nokola I agree with you, we pick NoesisGUI for cross platform development using C++ and optionally C#, so a Javascript API doesn't seem something existing customers are looking for. I guess people using Javascript will just stick to HTML/SVG/Canvas/WebGL.
Peter Verswyvelen,
Strongly Typed Solutions
 
Ziriax
Posts: 60
Joined: 10 Dec 2015, 17:59
Location: Belgium
Contact:

Re: plans for WASM?

14 Oct 2017, 11:47

Just an update, WebAssembly reached consensus among all browser vendors and it is out of preview, and more engines are starting to support it.

For example, Unreal, Unity3D, Ogre3D...

It would be great if this becomes a target for NoesisGUI too?

https://lists.w3.org/Archives/Public/pu ... /0002.html
http://www.ogre3d.org/forums/viewtopic.php?f=4&t=92351
Peter Verswyvelen,
Strongly Typed Solutions
 
User avatar
jsantos
Site Admin
Posts: 3905
Joined: 20 Jan 2012, 17:18
Contact:

Re: plans for WASM?

18 Oct 2017, 04:09

Thanks for the information! It is not high priority for now, but we will be compatible soon or later : )

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 36 guests