apps: instead of varying implementation, make setup_engine a function always