summaryrefslogtreecommitdiff
path: root/docs/global-module-registry.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/global-module-registry.txt')
-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.