Theoretically it is pretty easy to create an ik but you will have great problems with bones(-animation).
Basically you only need a function that spits out the angles based on the relative postion of the target and the length of the parts of the arm/leg.
This is just trigonometry.
For example

A=Shoulder
B=Target
c=dist Target->Shoulder
b= upper arm length
a= underarm length
And you need to calc the angles on A and C