summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-08-17 20:29:08 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-08-17 20:29:08 +0000
commitc54062e94c2efb68c296c6b054b5d48dcbf842f1 (patch)
treebc6e5de53efbdd18440b690c586e508074332b6a /docs
parent5abb078ec4ff3311ecd5846e2726bddd3a230594 (diff)
downloadgobject-introspection-c54062e94c2efb68c296c6b054b5d48dcbf842f1.tar.gz
Add a document for an on disk module registry format
2008-08-17 Johan Dahlin <johan@gnome.org> * docs/global-module-registry.txt: Add a document for an on disk module registry format svn path=/trunk/; revision=393
Diffstat (limited to 'docs')
-rw-r--r--docs/global-module-registry.txt49
1 files changed, 49 insertions, 0 deletions
diff --git a/docs/global-module-registry.txt b/docs/global-module-registry.txt
new file mode 100644
index 00000000..e3603962
--- /dev/null
+++ b/docs/global-module-registry.txt
@@ -0,0 +1,49 @@
+Problem statement
+=================
+On-disk registry for mapping namespace to typelib.
+Conceptually similar to mono /etc/mono/config.
+
+It should be possible in a dynamic language such as python to just do:
+
+>>> import PythonIntrospectionBindings
+>>> import Gtk
+
+
+Gtk should be a special namespace provided by the package containing the
+Gtk namespace
+
+Layout of the on disk tool
+==========================
+
+Location to should be /var/lib/glib/introspection-registry.db
+
+root {
+ 'Gtk': (path, version),
+}
+
+The format should be mmap(2):able, changes should only affect new processes.
+Existing ones should keep on using the old registry. The overhead must be minimal.
+
+gir-registry-tool
+================
+Is a command line utility, probably written in C which should be used
+to update/modify the registry.
+
+Example use cases, installing a new typelib
+
+gir-registry-tool --install Gtk /usr/lib/glib/introspection/gtk.typelib 2.12.0
+gir-registry-tool --uninstall Gtk /usr/lib/glib/introspection/gtk.typelib 2.12.0
+
+It's the registry tools responsibility to sort the disk format.
+
+API
+===
+
+libgirepository should provide an api:
+
+gi_locale_typelib (const gchar *name, const gchar * version);
+
+version should NULL, if so it should pick the first one in the on-disk registry.
+
+libgirepository should mmap the registry and read it when that API is called
+the first time.