Hi Laurence,

On Tue, 28 Mar 2023 18:57:48 -0500 Laurence Rowe via webkit-dev 
<webkit-dev@lists.webkit.org> wrote:
 
> So build-jsc without the —jsc-only works:
> 
> lrowe@Laurences-MacBook-Air WebKit %
> ./WebKitBuild/Release/JavaScriptCore.framework/Helpers/jsc
> 
> >>> print(1+1)
> 2
> 
> I was hoping to try and wrap the jsc-only build into a rust crate since the
> existing rust wrappers either include gtk dependencies or only wrap the
> lower level api and link against the system libraries. Though it is looking
> like I lack the C++ build experience to pull that off!

In the case of the WebKit GTK port, there is a “libjavascriptcoregtk-X.Y”
(where X.Y is the API level) that you can link to without pulling in the
GTK librariesa. For example on my Linux box this is what pkg-config will
bring in for linking:

  % pkg-config javascriptcoregtk-4.1 --libs
  -ljavascriptcoregtk-4.1 -lgobject-2.0 -lglib-2.0
  %

Note how there is no GUI libraries there at all. If existing Rust wrappers
are linking also the rest of the GTK libraries, probably they are using the
“webkit2gtk-X.Y” pkg-config module instead. That sounds like a bug in how
the Rust crates are being built and linked.

Cheers,
—Adrián

Attachment: signature.asc
Description: PGP signature

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to