Eshell is written entirely in EmacsLisp, without requiring a shell to run.
Lots of information at the EmacsWiki: http://www.emacswiki.org/cgi-bin/wiki/CategoryEshell.
CategoryEmacs