The authors have recently demonstrated two prototypes where photonics and microelectromechanical system (MEMs) technologies have been integrated to show proof-of-principle functionality for weapon surety functions. These activities are part of a program which is exploring the miniaturization of electromechanical components for making weapon systems safer. Such miniaturization can lead to a low-cost, small, high-performance ``systems-on-a-chip``, and have many applications ranging from advanced military systems to large-volume commercial markets like automobiles, rf or land-based communications networks and equipment, or commercial electronics. One of the key challenges in realization of the microsystem is integration of several technologies including digital electronics; analog and rf electronics, optoelectronics (light emitting and detecting devices and circuits), sensors and actuators, and advanced packaging technologies. In this work the authors describe efforts in integrating MEMs and photonic functions and the fabrication constraints on both system components. Here, they discuss two examples of integration of MEMs and a photonic device. In the first instance, a MEMs locking device pin is driven by a voltage generated by photovoltaic cells connected in series, which are driven by a laser. In the second case, a VCSEL emitting at 1.06 {micro}m is packaged together with a metallized MEMs shutter. By appropriate alignment to the opening in the shutter, the VCSEL is turned on and off by the movement of the Si chopper wheel