main
port: use a dynamic logtype
use C linkage where appropriate in headers
build: mark exported symbols