firebase / firebase-functions

Firebase SDK for Cloud Functions
https://firebase.google.com/docs/functions/
MIT License
1.01k stars 201 forks source link

Multi language support for firebase functions - Kotlin, Dart, Golang #1385

Open algoflows opened 1 year ago

algoflows commented 1 year ago

Many users have been requesting Dart and Kotlin support for Firebase functions. AWS already supports layers and custom runtimes, and CDK and Pulumi both support multiple languages. Google's competitors, such as Deno, AWS, Azure, and other edge platforms, provide better JavaScript experiences or multiple vendor and language support.

As a leading tech company, Google and it's users would greatly benefit from supporting other languages, why not start with Google-backed or created languages such as Go, Dart, and Kotlin. With the emergence of unified codebases and deploying to multiple platforms, having support for more languages can help users deliver frontend and backend logic using a single language.

However, whenever someone brings up the topic of supporting Dart or Kotlin for Firebase functions, it seems to get dismissed. This has pushed me and possibly others away from Firebase and Firebase functions, as I don't want to feel locked into using JavaScript.

Hopefully, you'll adopt a similar approach to multi language support like pulumi, give the user the choice on which language he can write his firebase functions in.

To remain competitive, it's crucial for Google to start supporting other languages, listening to customer feedback, or it may risk being left behind by other players who are meeting these demands. It would be a shame to see Google get left behind.

google-oss-bot commented 1 year ago

I found a few problems with this issue:

ZacharyBohn commented 1 year ago

Since Firebase is often used with Flutter, it would be great to see firebase functions support dart especially. Not sure if there would be an easy implementation since dart already support compiling to js, but I would love to see that feature!

Also, may be worth noting that there is an open source package (out of support) that provided this ability to some extent: https://github.com/pulyaevskiy/firebase-functions-interop

glorat commented 10 months ago

Firebase v2 functions are now using Google Cloud Run under the hood. And even before v1, Google Cloud Run can be invoked as a function via firebase hosting. That means that any language that can be run in a docker container on an http port can be packaged as a function. I've successfully deployed a firebase function written in Scala and called it from my firebase client app.

tomasweigenast commented 6 months ago

@glorat how? can you provide some link to read more about it?

Albertbol commented 1 week ago

up for official support like python for Dart

glorat commented 1 week ago

@glorat how? can you provide some link to read more about it?

Make a Google Cloud Run service using any language you like as long as it can be dockerised - done separately from Firebase. Then integrate it with Firebase using https://cloud.google.com/run/docs/integrate/firebase-hosting