Silicon photonics for optical interconnects, sensing and electron acceleration