Seed is a JavaScript interpreter and a library of the GNOME project to create standalone applications in JavaScript. It uses the JavaScript engine JavaScriptCore of the WebKit project. It is possible to easily create modules in C.

Seed is integrated in GNOME since the 2.28 version and is used by two games in the GNOME Games package.Seed, the module! It is also used by the Web web browser for the design of its extensions. The module is also officially supported by the GTK+ project.GTK+ binding list

Hello world in Seed This example uses the standard output to output the string "Hello, World". #!/usr/bin/env seed

print("Hello, world!");

A program using GTK+ This code shows an empty window named "Example". #!/usr/bin/env seed

Gtk = imports.gi.Gtk; Gtk.init(Seed.argv);

var window = new Gtk.Window({title: "Example"});

window.signal.hide.connect(Gtk.main_quit); window.show_all();

Gtk.main();

Modules To use a module, just instantiate a class having for name imports. followed by the name of the module respecting the case sensitivity.

The modules using GObject Introspection, who starts by imports.gi. : Gtk Gst GObject Gio Clutter GLib Gdk WebKit GdkPixbuf, GdkPixbuf Libxml Cairo DBus MPFR Os (system library) Canvas (using Cairo) multiprocessing readline ffi sqlite sandbox

List of the Seed versions The names of the versions of Seed are albums of famous rock bands. Version Code Name Release date0.18 November 20080.3Wednesday Morning 3AM2 January 20090.5Transformer16 April 20090.6Beatles for Sale29 April 20090.7Another Side of Bob Dylan13 May 20090.8Bringing It All Back Home29 May 20090.8.5Self Portrait10 July 20092.27.90London Calling10 August 20092.27.91Yellow Submarine21 August 20092.27.92Metal Machine Music7 September 20092.28.0The Rise and Fall of Ziggy Stardust and the Spiders21 September 20092.29.2Never Mind the Bollocks16 November 20092.29.330 November 20092.29.417 December 20092.29.5Icky Thump1 January 20102.29.5.1Achtung Baby1 January 20102.29.5.2Third Stage7 January 20102.29.5.3Twist and Shout11 January 20102.29.90Fort Nightly8 February 20102.29.91Greatest Hits23 February 20102.30.0Piano Man29 March 20102.31.1The Black Album29 March 2010

See also

GNOME JavaScript Server-side JavaScript JavaScriptCore XULRunner

References

External links Seed on the GNOME wiki Seed documentation

Official tutorial of Seed A short tutorial showing how to create a basic web browser using WebKitGTK+. Blog of Robert Carr