Is it possible to use c++ binary in chrome extension ?
Google Chrome and Microsoft are major users of and contributors to the fast programming language C++. Google Chrome can't just rip and replace Chromium's existing C++ code with memory-safer Rust. There is interest increasing in using Rust because its memory safety is guaranteed.
How to Create a Chrome Extension. First of all, we need to create an empty folder where we will add our HTML, CSS, and JavaScript files. Now, let's add a link to the Bootstrap CDN in the head tag. We will be using the Bootstrap framework here so that we don't have to write some extra CSS in this example.
(Chrome OS only) Extends Chrome. For example, apps or extensions can allow users to upload files to a website. Allows app or extension to create, read, navigate, and write to the user's local file system at a user-selected location.
NPAPI was deprecated from Chrome/Opera for security concerns.
You can still use NPAPI if you are targeting firefox, but if Firefox follows the trend it might disable it at some point as well.
The better options you have today are
You can use instead NativeClient (A.K.A. NaCL, A.K.A. PPAPI - Pepper Plugin API)
All code ran inside NaCl is sandboxed so it's as secure as a javascript extensions.
Using Emscripten you can compile C/C++ code into highly optimized javascript format called asm.js. It is designed to have near native performance and right now has decent support from grade-A browsers except Safari. Though performance is better in Firefox than Chrome at the moment.
Major browser vendors are also working on a new standard called WebAssembly that is partially inspired by asm.js, but not ready for prime usage as of this article
Native Client is being deprecated and asm.js is being replaced by WebAssembly which is becoming the new standard to compile C++ code for the web.
Yes, like with other browsers, you can write a NPAPI plugin that will comunicate with your extension.
See a generic description at wikipedia
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With