[webkit-gtk] JavaScriptCore with wekbitgtkv1?
Adrian Perez de Castro
aperez at igalia.com
Sat Apr 28 04:06:47 PDT 2018
On Sat, 28 Apr 2018 13:51:36 +0300, Adrian Perez de Castro <aperez at igalia.com> wrote:
> On Fri, 27 Apr 2018 14:29:16 -0400, Anthony Walter <sysrpl at gmail.com> wrote:
> > Ah okay, so reading from the news at webkitgtk.org i see:
> >
> > https://webkitgtk.org/2018/04/18/webkitgtk2.21.1-released.html
> >
> > Add initial JavaScriptCore GLib API
> >
> > So I guess the JavaScriptCore GLib API is new and not in any repositories
> > yet. If i want to try it I'll have to build from sources.
>
> Yes, I did not mention the new GLib-based C API because it is only available
> on development releases like 2.21.1, but the “traditional” JSC plain C API
> has been available since forever. The idea with the new GLib-based API is
> to provide a more idiomatic API which plays nicely with the rest of the
> WebKitGTK+ API, *and* that is also usable with GObject-Introspection to
> allow e.g. Python or Lua language bindings without having to manually wrap
> the plain C JSC API.
>
> If you are going to keep using the old WebKitGTK+ version you mentioned in
> your first e-mail, you will only have available the plain C JSC API. That
> would be the case also if you would switch to the latest *stable* release.
> To use the new GLib-based API you need the 2.21.1 *development* release, or
> wait for 2.22.0, which will be the first stable release which will include
> it.
>
> So, summarizing:
>
> - The plain C JSC API is available in all releases before 2.21.1, both
> old WebKit1- (single-process) and WebKit2-based (multiprocess) versions
> of WebKitGTK+.
Also, for the plain C JSC API, you want libjavascriptcoregtk-4.0 for recent
releases, e.g.:
% nm -D /usr/lib/libjavascriptcoregtk-4.0.so | grep 'T JS'
0000000000354bb0 T JSCheckScriptSyntax
0000000000363730 T JSClassCreate
00000000003637a0 T JSClassRelease
0000000000363790 T JSClassRetain
0000000000356210 T JSContextCreateBacktrace
0000000000355c90 T JSContextGetGlobalContext
0000000000355b60 T JSContextGetGlobalObject
...
You can find out the compiler and linker flags using pkg-config as usual:
% pkg-config javascriptcoregtk-4.0 --cflags --libs
In older releases the name of the libary and the pkg-config used to be
different, IIRC the suffix was not “-4.0”.
> - For the new GLib JSC API, you need 2.21.1 (if you can use a development
> release), or wait for the 2.22.0 stable.
>
> I hope the situation is clearer now :-)
>
> Cheers,
>
>
> --
> Adrián 🎩
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.webkit.org/pipermail/webkit-gtk/attachments/20180428/ba856063/attachment.bin>
More information about the webkit-gtk
mailing list