web function as local lib

Is there any way to exclude my js or php code into local lib that will be installed on users PC, whome’ll use my web-application in there modern browsers such as firefox, chrome, etc? I looking something like ‘object’ tag + ‘codebase’ param, but nor for IE, but for actual browsers on chromium and other.

In base – I want to make custom js+php lib, so the user can install (register) lib in their Windows systems and than use my web-app, which ask some commands from code in that lib. Is that possible?

I already looked in to ‘web assembly’, but not sure that its what I’m looking for…