begin code emission and basic library