Fix #344

Support embed-dependency
Add unit tests
Add documentation

Signed-off-by: Clement Escoffier <clement.escoffier@gmail.com>