From: David H. <dho...@gm...> - 2013-12-12 01:41:26
|
Hi Oliver, Thanks for the reply and consideration of this use case. I understand it's outside the normal SWIG domain, it was worth a shot to see if it was possible, but understood. -Dave On Wed, Dec 11, 2013 at 6:20 PM, Oliver Buchtala < oli...@go...> wrote: > Hi David, > > SWIG is only for creating native extensions for other/higher level > languages. > The input would be C/C++ library, the output would be a library (or source > code) that can be integrated into the target engine. > Your use-case is not in the domain of SWIG, sorry. > > Regards, > Oliver > > > On 11.12.2013 21:35, David Hoffer wrote: > > Maybe I misspoke or I don't understand your reply. In this case there is > no native code...at least not in the SWIG sense of native C/C++ code. > (From the perspective of GWT...JS is the native code.) > > Rather from the perspective of SWIG the input is JS, it would parse that > and generate the JSNI and Java code. Both of those are standards...e.g. > JSNI is the standard bridge between Java and JS just like JNI is the bridge > between Java & C. > > What's probably the hard part in this request is that JS is loosely > typed so the trick would be to start with something that is loosely typed > and generate a useful Java wrapper that is as typed as possible. The good > news is that the syntax of JS and Java are similar so that might help > things a bit. > > At the end of the day the goal is to take an existing JS library, have > SWIG generate a GWT wrapper, and use that wrapper in a GWT application. In > turn the GWT compiler will ultimately compile everything back to JS. > > -Dave > > > > > On Wed, Dec 11, 2013 at 1:20 PM, Andy Somogyi <and...@gm...>wrote: > >> That would be great, but from what I understand, there is no standard way >> of accessing native code from JS. >> >> There are a large number of JS engines, (V8, JavaSriptCore, FireFox >> SpiderMonkey?, whatever Gnome and QT use). >> >> It really would be nice if there was a standard way to write native code >> for JS, like COM or JNI. >> >> >> On Dec 11, 2013, at 1:36 PM, David Hoffer wrote: >> >> > I'm looking for a tool that can create a GWT (Google Web Toolkit) >> wrapper for JavaScript. I've used SWIG many times in the past for C/C++ to >> Java code wrapper generation. >> > >> > This usage would be similar except instead of C to JNI to Java it would >> be JavaScript to JSNI to Java. >> > >> > Google made the JSNI layer very similar to JNI in concept. >> > >> > Has anyone at SWIG implement this? >> > >> > Thanks, >> > -Dave >> > >> ------------------------------------------------------------------------------ >> > Rapidly troubleshoot problems before they affect your business. Most IT >> > organizations don't have a clear picture of how application performance >> > affects their revenue. With AppDynamics, you get 100% visibility into >> your >> > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of >> AppDynamics Pro! >> > >> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk_______________________________________________ >> > Swig-user mailing list >> > Swi...@li... >> > https://lists.sourceforge.net/lists/listinfo/swig-user >> >> > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > > > > _______________________________________________ > Swig-user mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/swig-user > > > > > ------------------------------------------------------------------------------ > Rapidly troubleshoot problems before they affect your business. Most IT > organizations don't have a clear picture of how application performance > affects their revenue. With AppDynamics, you get 100% visibility into your > Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics > Pro! > http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > > |