Azure Functions 中支持的语言Supported languages in Azure Functions

本文介绍为可用于 Azure Functions 的语言提供的支持级别。This article explains the levels of support offered for languages that you can use with Azure Functions.

支持级别Levels of support

有三个支持级别:There are three levels of support:

  • 正式发布 (GA) - 完全支持并获得批准在生产中使用。Generally available (GA) - Fully supported and approved for production use.
  • 预览 - 尚不支持,但将来应达到 GA 状态。Preview - Not yet supported but is expected to reach GA status in the future.
  • 实验性 - 不支持,将来可能会弃用;不保证最终达到预览或 GA 状态。Experimental - Not supported and might be abandoned in the future; no guarantee of eventual preview or GA status.

按运行时版本列出的语言Languages by runtime version

这两个版本的 Azure Functions 运行时都可用。Two versions of the Azure Functions runtime are available. 下表显示每个运行时版本支持的语言。The following table shows which languages are supported in each runtime version.

语言Language 1.x1.x 2.x2.x 3.x13.x1
C#C# GA (.NET Framework 4.7)GA (.NET Framework 4.7) GA (.NET Core 2.2)GA (.NET Core 2.2) 预览版 (.NET Core 3.x)Preview (.NET Core 3.x)
JavaScriptJavaScript GA (Node 6)GA (Node 6) GA(Node 8 和 10)GA (Node 8 & 10) 预览版(Node 8 和 Node 10)Preview (Node 8 & 10)
F#F# GA (.NET Framework 4.7)GA (.NET Framework 4.7) GA (.NET Core 2.2)GA (.NET Core 2.2) 预览版 (.NET Core 3.x)Preview (.NET Core 3.x)
JavaJava 不适用N/A GA (Java 8)GA (Java 8) 预览版 (Java 8)Preview (Java 8)
TypeScriptTypeScript 试验Experimental 正式版2GA2 预览版2Preview2
BashBash 试验Experimental 不适用N/A 不适用N/A
批处理(.cmd、.bat)Batch (.cmd, .bat) 试验Experimental 不适用N/A 不适用N/A
PHPPHP 试验Experimental 不适用N/A 不适用N/A

1Functions v3.x 运行时处于预览状态。1The Functions v3.x runtime is in preview.
2通过转换为 JavaScript 来得到支持。2Supported through transpiling to JavaScript.

实验性语言Experimental languages

1.x 版中的实验性语言扩展性不好,并且不支持所有绑定。The experimental languages in version 1.x don't scale well and don't support all bindings.

不要对所依赖的任何内容使用实验性功能,因为对其没有官方支持。Don't use experimental features for anything that you rely on, as there is no official support for them. 不应针对实验性语言的问题开启支持案例。Support cases should not be opened for problems with experimental languages.

2.x 版运行时不支持实验性语言。The version 2.x runtime doesn't support experimental languages. 只有在生产环境中支持该语言时,才会添加对新语言的支持。Support for new languages is added only when the language can be supported in production.

语言扩展性Language extensibility

从版本 2.x 开始,运行时旨在提供语言扩展性Starting with version 2.x, the runtime is designed to offer language extensibility. 2.x 运行时中的 JavaScript 和 Java 语言是使用此扩展性生成的。The JavaScript and Java languages in the 2.x runtime are built with this extensibility.

后续步骤Next steps

若要详细了解如何使用支持的语言开发函数,请参阅以下资源:To learn more about how to develop functions in the supported languages, see the following resources: