Pass Craft Instance to A Vendor PHP File
You don't need to pass anything in there.

The function craft() is just a public function that returns the static app. It does not matter if you call it inside a plugin or somewhere else. 

namespace Craft; //&lt;----- added namespace
class Wally {
   function __construct() {
      $criteria = craft()-&gt;elements-&gt;getCriteria(ElementType::Entry);
   }
}


If you don't want to be in the same namespace you can do

class Wally {
   function __construct() {
      $criteria = \Craft\craft()-&gt;elements-&gt;getCriteria(\Craft\ElementType::Entry);
   }
}


If you really want to save the app in an extra variable for whatever reasons you would do

new Wally(craft());