Spin compiler and loader