I have set of libraries under ~/.platformio/lib which are being used in different projects.
I would like to hide source code of these libraries - is this possible to compile them first and under lib put them already complied ?
It would work similar as we have jar files in Java. Is this possible ?
I think it’s possible. You will need header files and static archive for each library.
Static archives (libname.a) can be found in project environment folder after compiling (.pioenvs/your_env/*.a).
So you will need next steps:
Run your project once.
Copy needed library archives from (.pioenvs/your_env/libName.a) to a separate directory and delete source files (*.c *.cpp) from library folder.
Link these libraries with your project in platformio.ini file via build_flags option: