UPDATE: I fixed the JSGarbageCollect segfault... (it was a bug in the
old version testapi.c which tried to gc after releasing the context. i
had the misfortune of using it as a reference).
Good to hear! However, you really shouldn't need to touch the JSCore API, if you're using Seed. We wrap everything you need (if we don't, yell at us and we'll get on that); you shouldn't need to call JSGarbageCollect yourself, it's all automatic (unless you have really special needs).
However, I would really like to use libseed anyway, because I like the
API (certainly better than spidermonkey). Heck, I like glib and
gobjects too.
(apologies for the double-post)
On 2009.08.12, at 22:42, Christian Betz wrote:
Hello.
I managed to build seed on ubuntu 9.04 without much trouble. I am
impressed and I have a very, very good feeling that seed will catch
on. So, what are the major issues remaining before I can begin hyping
this awesome technology? ;)
There's a lot of small reworks to be done, especially around structs and such, and the major refactoring of the gobject-introspection stuff out into a module so you can use Seed even without GI - but that's all for another day.
Some background -- I've been working with the spidermonkey API for
some time and was looking to dive into _javascript_Core. The nice thing
about spidermonkey is that there is a nice package available so that
getting started embedding is a breeze. I struggled for a while with
building trying to build a simple hello world type app using the jsc
API, but failed (what I really wanted was a nice "-dev" type package
with shared library/header files for jsc). I had given up until I
found your project.
i read that the only dependencies are webkit and
gobject-introspection. does that mean that *in-theory* I can use
libseed without the higher level gtk/gnome levels of the stack? the
reason I ask is that I would like to use the libseed API on servers
and embedded systems without X. If the answer is no, then I have a
side question: what do you recommend as the path of least resistance
towards using the _javascript_core api directly (without seed)? do you
think there is ever a chance of getting just the engine/API split out
of webkit as a separate package? is that something that people might
be receptive to?
You can *absolutely* use Seed with just WebKit and GObject-Introspection (which also brings in their dependencies, of course). Seed doesn't directly depend on Gtk or anything like that, and it can be successfully used on a machine without an X server. The biggest problem here is building _javascript_Core without WebKit, since WebKit depends on Gtk (obviously). I think that the WebKit guys would be receptive to splitting JSC out of WebKit, as that's how it builds on Mac OS X, they just aren't particularly interested in doing it themselves. It's definitely possible, though (I once hacked JSC up enough that I could compile it directly into Seed, when we were playing around with memory usage and such).
in other words, this is all I want to do right now:
write some C code defines a print() function in the global context and
then evaluate "print('hello world')". I *can* get this to work using
the PPA packages you guys provide -- but it segfaults when i call
JSGarbageCollect at the end :(
You should really look at the turtle example:
I haven't checked to make sure it still makes sense in a long time, but it's our only example of using the Seed API to expose C functions to _javascript_ and then evaluate scripts using those functions. However, it shows how you don't use the JSC API, etc. and provides a quick starting point.
Sorry if this email is hurried/nonsensical, I'm traveling at the moment. Maybe Robb can do a better job...
Christian
_______________________________________________
libseed-list mailing list
libseed-list gnome orghttp://mail.gnome.org/mailman/listinfo/libseed-list