如何在Google Cloud Functions上运行C ++文件? [英] How to run C++ files on the Google Cloud Functions?

查看:124
本文介绍了如何在Google Cloud Functions上运行C ++文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,Google Cloud Functions仅允许您部署NodeJ或Python脚本.

From what I am aware, Google Cloud Functions only allows you to deploy NodeJs or Python scripts.

问题:如何在 Google Cloud Functions 上部署简单的Hello_World.cpp?例如,编写一个hello world HTTP函数.

Question: How would I be able to deploy a simple Hello_World.cpp on Google Cloud Functions? For example, writing a hello world HTTP function.

有哪些其他方法可以做到这一点?我想使用无服务器方法,因为它是最便宜的方法.因此,这就是为什么我要使用Google Cloud Functions.我是否必须使用docker才能运行C ++文件?我已经坚持了一段时间,任何指导或帮助都将不胜感激.

What are alternate methods to do this? I want to use serverless approach, since it's cheapest method. Therefore, that is why I'm going with Google Cloud Functions. Would I have to use docker in order to run C++ files? I've been stuck on this for a while and any guidance or help would be appreciated.

推荐答案

您不能在Cloud Functions上使用C ++,期间.您只能使用Node.js 6.14,Node.js 8.11.1(测试版)和Python 3.7(也包括测试版).

You can't use C++ on Cloud Functions, period. You can only use Node.js 6.14, Node.js 8.11.1 (beta) and Python 3.7 (also beta).

如果您希望通过无服务器方法在GCP中使用C ++,我最好的建议是运行自己的

If you wish to use C++ in GCP with a serverless approach, my best suggestion would be running your own Custom Runtime in App Engine. You would still need to configure some instances options, but you don't have to manage servers and so on.

这篇关于如何在Google Cloud Functions上运行C ++文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆