Currently uWSGI allows you to embed resources in the binary executable via
symbols and appending.

A new way (that will be the base for plugin dependancies too) is adding
sections to the elf binary:

objcopy uwsgi --add-section foobar=/etc/foo.ini uwsgi

will embed the /etc/foo.ini file in the uwsgi binary as 'foobar'

Then

uwsgi --ini section://foobar

will allows you to refer to that resource.

You can access sections from uwsgi itself via the api:

content = uwsgi.extract("section://foobar")


The advantage over 'symbol://' is that you do not need to rebuild uWSGI
every time you change a resource. The advantage over 'data://' is that you
can give meaningful names to resources.

uwsgi.ZipImport, uwsgi.SymImport and uwsgi.SymZipImport are supported too,
so you can embed modules archives.

Sadly only linux on little endian is supported, i need to release 1.3 (too
much users waiting for it) that will use "section://uwsgi" to store
plugin-specific infos. An update for the other platforms will be released
as soon as possible.

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to