I just started a yii2 project and I am trying to create a curl extension that I can reuse it in my future projects as well. When I opened "Extension Generator" on gii tool, I noticed that in the "Type" field we can provide:

* yii2-extension
* library

I would like to know the main differences between those two and some use cases that would feat the best for each type.