compile client code as bare function