The X-ray solar monitor (XSM) is a calibration instrument of the demonstration of compact imaging X-ray spectrometer (D-CIXS) experiment, with a separate Silicon detector unit on the SMART-1 spacecraft. The non-imaging HPSi PIN sensor has a wide field-of-view (FOV) to enable Sun visibility during a significant fraction of the mission lifetime, which is essential for obtaining calibration spectra for the X-ray fluorescence measurements by the imaging D-CIXS spectrometer. The energy range (1-20 keV), spectral resolution (about 250 eV at 6 keV), and sensitivity (about 7000 cps at flux level of 10-4 W m-2 in the range 1-8 Å) are tuned to provide optimal knowledge about the Solar X-ray flux on the Lunar surface, matching well with the activating energy range for the fluorescence measured by D-CIXS. The independent science of the XSM will also be valuable, since the XSM energy range is very sensitive to solar flares. The countrate during the top of an X1 flare will be about 35 times higher than the average quiescent countrate at solar maximum. The relative increase will be the same for an M1 flare during the SMART-1 mission, which will be closer to the next solar minimum. Since the XSM will observe the Sun as a star, and the energy range and spectral resolution are close to those of present astronomical X-ray satellites (e.g., XMM-Newton, ASCA, Chandra), we will obtain an X-ray database of the Sun which can be related with the stellar X-ray observations more easily than the data from present solar X-ray instruments. In this publication we give a detailed description of the design, performance, and tasks of the XSM instrument, and view the science perspectives.