This is a legal problem more than a technical problem.
Any protection you implement will allmost certanly be trivial to break or get around.
Just tell people they have to pay to use your library.
This is a legal problem more than a technical problem.
Any protection you implement will allmost certanly be trivial to break or get around.
Just tell people they have to pay to use your library.
You can stand a crappy UI if your need is big enough.
As to your second question.
I used (and payed for) a library that used your planned solution.
It was a c# library to to manipulate flash/swf files (~20 years ago) it shipped with python and java wrappers, but those only worked on windows. If you go this route try to build for dotnet on linux too.
Good luck