runtime: added vector_source/sink and template expansion