How to create a pure klib file


I am trying to create data model source code as kotlin native.

And I expect that this data model can be re-used later by spring cloud code, or by other mpp project for client app(js/android/ios).

It seems like that I need to create a klib file, just like io.ktor-ktor-client-json-commonMain.klib
I have tried to read ktor github, but it is too complex for me, I am hard to figure out the whole picture about how to create a klib.

Does someone knows how to pack my koltin source code to a simple klib with correct dependency?