State persistence


I am new to event store and I am trying out projections to create aggregations of my data. I create state for my projection and was wondering whether this state is persisted per stream which is generated from the projection or is the state calculated on the fly. If, I were to restart event store, will it rebuild the state or will the state for that projection already exist for the events that were already processed.

Thanks for all the help and support.

Best regards,