context.h copied from working multi-runtime