You can use "resource" to link to a regular binary in your addon: add this to your manifest:
resource YOUR-ADDON-LIB path/to/libaddon.so ABI=Linux_x86-gcc3 resource YOUR-ADDON-LIB path/to/addon.dll ABI=WINNT_x86-msvc
The "ABI" directive will provide you with the correct lib path on another platform.
In your javascript file, you can reference the lib path as follows:
const ioService = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService); var uri = ioService.newURI('resource://YOUR-ADDON-LIB', null, null); if (uri instanceof Components.interfaces.nsIFileURL) { var lib = ctypes.open(uri.file.path);
source share