Hacker News new | past | comments | ask | show | jobs | submit login

I would hope that plug-ins and add-ons can be written in C (although any extensions written in C should be only allowed if installed manually by the end user (e.g. by adding it to some configuration file); it should never install them automatically from a "app store" or similar). That is a feature I would use.



If by "C" you're asking for C compiled to WASM, then fine. But otherwise I would hope that WASN'T ever possible.

The endless security nightmare that was ActiveX and NPAPI should serve as more than enough reason why that shouldn't be a thing again.

"Installed manually not from app store" is even worse because then you're encouraging people to download random binaries from random websites and that's even worse


I do not mean C compiled to WASM. I mean native code (with dlopen).

My point is not for other people to make extensions that you must use. Rather, my point is in case the user wants to write their own extensions do things that have more permissions, without needing to recompile everything. It is specifically if the user does not want the extra security (because they intend to program it to do things beyond that provided by the browser's security context), and only for that case.

(However, there might be another alternative: Provide a .a file (in case do not intend to compile it by yourself, which might take some time and require several dependencies) and allow the end user to link that file together with their own .o files, instead of using .so files. The constructor functions can be used to tell the main program of the presence of these extensions.)

(Another alternative would be to provide a separate version that may permit this, e.g. "advanced version", that might also offer additional options and other features which are intended to only be used by advanced users, therefore making the user interface more confusing for users who do not read the documentation.)

C (and other programming languages) that is compiled to WASM could be installable from the app store, since then it is safe. Native code extensions must be installed manually.


I would think that wasm should probably be the "binary" extension target, which could include C source.

Just my opinion.


Wat?




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: