Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Similar technology to Chrome's Native Client Messaging in Firefox?

We want to replace a custom NPAPI interface between a browser based web application and an client side daemon process.

Is there a similar technology to Chrome's Native Client Messaging in Firefox?

like image 641
Ruediger Jungbeck Avatar asked Sep 24 '13 19:09

Ruediger Jungbeck


People also ask

What is native messaging trace host?

The native app host sends and receives messages with extensions using standard input and standard output. Extensions that use native messaging are installed in Microsoft Edge similar to any other extension. However, native apps aren't installed or managed by Microsoft Edge.

What is native Client application?

An application that was developed for the computer it is running in. For example, a Windows app runs only in a Windows environment, and a Mac app runs only in a Mac environment.

What is native code in browser?

Native Client was a sandbox for running compiled C and C++ code in the browser efficiently and securely, independent of the user's operating system. It was deprecated in 2020 and support will end in June 2021.

What is chrome native?

What is the Google Chrome Native Client? Native Client is an open-source technology that allows you to build web applications that seamlessly execute native compiled code inside the browser. This Google Code project is for maintaining the Native Client implementation, including compiler and browser support.


2 Answers

js-ctypes[1] is probably the closest alternative for Mozilla.

https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes

I have a C++ module that I compile as a binary executable for native-messaging or as a library for js-ctypes. The difference between the two is primarily that native-messaging calls a binary executable and performs stdin/stdout data exchange, and js-ctypes opens a static/shared library (via dlopen) and calls exposed methods of your library which can return compatible data types[2] and optionally call a passed JavaScript callback method.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes

[2] https://developer.mozilla.org/en-US/docs/Mozilla/js-ctypes/js-ctypes_reference/ctypes#Predefined_data_types

like image 84
kylehuff Avatar answered Sep 21 '22 03:09

kylehuff


With new support for Mozilla 'Chrome' WebExtensions API seems like soon there will be a very similar technology to Chrome's Native Client Messaging.

At this time it's still on the 'List of APIs [mozilla] will likely support in the future'

like image 25
Greg Domjan Avatar answered Sep 19 '22 03:09

Greg Domjan