Hi, as a personal toy i have integrated libtcc as a uWSGI plugin:

https://github.com/unbit/uwsgi/blob/master/plugins/libtcc/libtcc.c

Currently it only allows defining c hooks directly in the config:

UWSGI_EMBED_PLUGINS=libtcc make

[uwsgi]
hook-asap = tcc:mkdir("/var/run/sockets");printf("directory created\n");
hook-as-user = tcc:printf("i am process with pid %d\n", getpid());
hook-post-app = tcc:if (getenv("DESTROY_THE_WORLD")) exit(1);
http-socket = /var/run/sockets/foobar.sock

currently every chunk of code is compiled in a new tccstate so there is no
shared state.

I hope it will be useful for someone else

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

Reply via email to