While this sounds like a good solution to this specific use case, and
while I agree that js-ctypes is horribly fragile, I'm not certain that
this solution can be generalized to AMO-released add-ons that need
access to OS-specific features, since we don't really like add-ons that
ship native code.

So if we ever decide to stop supporting js-ctypes, I vote that we first
get in touch with add-on authors who make use of it, gather them in a
room, and come up with an alternative solution.

Cheers,
 David

On 28/08/15 17:42, Benjamin Smedberg wrote:
> 
> I recommend that you write this as a Firefox addon in the following way:
> 
> * construct a shim program which links the C library and communicates
> with the addon on stdin/stdout
> * use the addon SDK and system/child_process to launch your shim program
> and communicate with it
> 
> See
> https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/system_child_process
> for a description of system/child_process.
> 
> I'm going to contradict Ehsan here: ctypes is a powerful-but-dangerous
> API and I wouldn't recommend it unless you have no other choice. We may
> decide to stop supporting it in the future.
> 
> --BDS
> 
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform


-- 
David Rajchenbach-Teller, PhD
 Performance Team, Mozilla

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to