The Yun has two processors. One processor is a System on a Chip (SoC) that runs the OpenWRT Linux -> and our node.js server.A second processor is a MCU that runs the Arduino Code.Both processors communicate via a serial Interface.

The GPIO's are connected with the MCU so that you can program them with the Arduino IDE. The Arduino Library communicates with the server (runing on the SoC) to add new I/O points and send data for these points back and forth.

In the case of a raspberry pi , there is only one processor so to create an interface for the pi , we would have to create a library similar to the arduino hybrid object library for sending and receiving data , as well as the interface code for gpio, ?