Extension support for embedding API

Sure, agree to fix separately.

But will the extension still work in existing renderer? Since the java instance is already gone.