Binary XPCOM components are dead - js-ctypes is the way to go · 2011-07-12 13:19 by Wladimir Palant
Daniel Glazman is shocked to see how hard shipping binary XPCOM components with an extension became now. Fact is, we simply didn’t notice the hidden message of blog posts announcing dropping binary compatibility (meaning that your component needs to be recompiled for each new Firefox version, no matter how simple it is) and rapid releases — binary XPCOM components in extensions are deprecated. Theoretically, somebody could still continue using them but it requires so much effort that nobody can be expected to do that. Unfortunately, I haven’t seen it said like that anywhere, hence this blog post. There is still tons of documentation on binary XPCOM components on MDN and no deprecation warnings. Even XPCOM changes in Gecko 2.0 page lists all the important changes without making any conclusions.
<em:unpack>true</em:unpack> to your extension’s install manifest, the library can only be loaded if it is unpacked into a file on disk. Use AddonManager.getAddonByID() and then Addon.getResourceURI() to locate the library on disk and open it with js-ctypes.
Update: I am closing comments because I won’t be able to follow the discussion. Jorge wrote a pretty thorough reply and you might just as well reply there.
Commenting is closed for this article.