When you say text indexing and serving http are library functions, what do you mean? Also, is the language here go or what? Since you said python is too slow and then necessitates all the infra to manage it.
When I say something is a library function, I mean you just compile it into your code. In your code, you just call the function.
This is in contrast to the current defactor practice of making an http request to ask another program (potentially on a different machine) to do the work.