Rust journey

2021-12-24 Thread Александр Гурьянов
Hi! Just want to share my experiment with using Rust and WebAssembly. I
tried to port Vange-rs project (rust + wgpu) to browser. I used emscripten
and unknown platforms. Both finally works, but have lot of obstacles. I am
very sad about support level of emscripten in Rust, hope it will change at
some day.

https://caiiiycuk.medium.com/vange-rs-webassembly-in-rust-498e2f960a04

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAKOm%3DVF2wUiuKH1%3DivMhfjuAFdtMwvHxc0YaS4V%2BGoGfBWuy6w%40mail.gmail.com.


Re: How to pass array of strings between javascript and C/C++ code with webassembly/emscripten?

2021-12-24 Thread Shlomi Fish
Hi Mahesh!

In case it helps you and to help future questions, I set up:

https://github.com/shlomif/emcc-array-of-pointers-example


On Mon, 13 Dec 2021 03:03:09 -0800 (PST)
Mahesh Velankar  wrote:

>  Shlomi 
> Thanks for your efforts for a quick response.
> I will have to go thru your code to understand the typescript code. .. I 
> will start doing that.
> However I would have preferred a simple c++ - JavaScript example doing that.
> Still let me start looking into your project. and Let me understand the 
> passing of this char * * to and from between c++ and JavaScript
> Thanks again
> -Mahesh
> 
> 
> On Monday, December 13, 2021 at 12:38:50 AM UTC-5 Shlomi Fish wrote:
> 
> > Hi Mahesh!
> >
> > On Sun, 12 Dec 2021 16:50:53 -0800 (PST)
> > Mahesh Velankar  wrote:
> >  
> > > 
> > > 
> > > I am trying to write a web application that will do sort of word   
> > processing   
> > > (say spell check, grammar check, word analysis) using back-end C/C++   
> > code.   
> > > (I have got c/C++ code working in another desktop app... I want to bring
> > >  
> > it   
> > > to web). I want an example minimal code doing this (*pass array of   
> > strings*   
> > > from JavaScript to c/c++ code...c/c++ code will do the word   
> > operations... I   
> > > have this code ..and *the resulting array of strings* will be sent   
> > back   
> > > to JavaScript where they will be processed further. (passing *arrays* to 
> > > and from is important) Please point me to any such code/tutorial, from 
> > > where I can make a start.
> > > 
> > > I searched GitHub. I found several projects using emscripten but could   
> > not   
> > > get this anywhere. (Only place I could get some clue was Hunspell built 
> > > with emscripten ... however I could not build it successfully)
> > > 
> > > Please let me know . Thanks in advance.
> > >   
> >
> > I've done this (using 'char * *') here:
> >
> >
> > https://github.com/shlomif/fc-solve/blob/a2137b8882dbdd91444e2acda5b467aed2a9ebab/fc-solve/site/wml/src/ts/web-fc-solve.ts#L664
> >
> > Regards,
> >
> > -- Shlomi
> >
> > -- 
> >
> > Shlomi Fish https://www.shlomifish.org/
> > https://is.gd/htwEXQ - Integrating GNU Guile into GNU coreutils
> >
> > Chuck Norris is his own boss. If you hire him, he’ll tell your boss what to
> > do. — https://www.shlomifish.org/humour/bits/facts/Chuck-Norris/
> >
> > Please reply to list if it's a mailing list post - https://shlom.in/reply 
> > .
> >  
> 



-- 

Shlomi Fish   https://www.shlomifish.org/
Perl Elems to Avoid - https://perl-begin.org/tutorials/bad-elements/

Always reach for the stars! Because even if you miss… You’ll be miles away
from me with your motivational bullshit.
— https://is.gd/PuH02m

Please reply to list if it's a mailing list post - https://shlom.in/reply .

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/20211224161036.5a4074be%40shlomifish.org.


Re: Welcoming ECMAScript 2015 in 2022!

2021-12-24 Thread Sergey Rubanov
Hi Sam!

This is great news! I would like to help with the ES2015 transition. Do you 
have a roadmap or a list of of changes to be done? Which tests would be useful 
to run on es2015 changes?

Cheers
Sergey

> On 23 Dec 2021, at 13:46, 'Sam Clegg' via emscripten-discuss 
>  wrote:
> 
> Emscripten 3.1.0 has now been released with a minimal amount of internal ES6 
> usage (https://github.com/emscripten-core/emscripten/pull/15765 
> ).  Assuming we 
> don't hear of any issues in the next couple of weeks we will start moving 
> ahead with more usage in the new year.
> 
> cheers,
> sam
> 
> On Fri, Dec 17, 2021 at 4:55 PM Sam Clegg  > wrote:
> I'm hoping to land a change soon that will pave the way for allowing certain 
> ES6 constructs in emscripten core libraries: 
> https://github.com/emscripten-core/emscripten/pull/15763 
> .
> 
> The upshot for most users will be smaller, more idiomatic JS output.   For 
> those users that are targeting older browsers that don't have full ES6 
> support the default solution is to use closure compiler to (in 
> WHITESPACE_ONLY mode) to transpile the output.   This transpilation will kick 
> in automatically if you specify a `MIN_XX_VERSION` that doesn't support the 
> ES6 features we are using.
> 
> The downside here is that there will be an extra step in the linking process 
> for some users.   The upside is more easy-to-maintain and smaller JS code 
> size. 
> 
> cheers,
> sam
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to emscripten-discuss+unsubscr...@googlegroups.com 
> .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/emscripten-discuss/CAL_va28skh-3PZ5_f5k4KDe75sJUN-2kMDj%2B37BE7wFX-Hs7vA%40mail.gmail.com
>  
> .

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/60B3BACE-E6DC-4D31-99E1-B4BBF6150FE1%40gmail.com.