This is an automated email from the ASF dual-hosted git repository.

pdesai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwhisk-wskdeploy.git


The following commit(s) were added to refs/heads/master by this push:
     new ee2db4c  Add Rust extension to list of known runtimes (#1117)
ee2db4c is described below

commit ee2db4cac436c0e61c60a0e26a22b78da65968ea
Author: Matt Rutkowski <[email protected]>
AuthorDate: Thu Feb 18 00:23:51 2021 -0600

    Add Rust extension to list of known runtimes (#1117)
---
 runtimes/runtimes.go | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/runtimes/runtimes.go b/runtimes/runtimes.go
index 30e1bc0..76e083e 100644
--- a/runtimes/runtimes.go
+++ b/runtimes/runtimes.go
@@ -43,6 +43,7 @@ const (
        PHP_FILE_EXTENSION      = "php"
        ZIP_FILE_EXTENSION      = "zip"
        RUBY_FILE_EXTENSION     = "rb"
+       RUST_FILE_EXTENSION     = "rs"
        GO_FILE_EXTENSION       = "go"
        NODEJS_RUNTIME          = "nodejs"
        SWIFT_RUNTIME           = SWIFT_FILE_EXTENSION
@@ -51,6 +52,7 @@ const (
        DOTNET_RUNTIME          = ZIP_FILE_EXTENSION
        PHP_RUNTIME             = PHP_FILE_EXTENSION
        RUBY_RUNTIME            = "ruby"
+       RUST_RUNTIME            = "rust"
        GO_RUNTIME              = GO_FILE_EXTENSION
        HTTP_CONTENT_TYPE_KEY   = "Content-Type"
        HTTP_CONTENT_TYPE_VALUE = "application/json; charset=UTF-8"
@@ -205,6 +207,8 @@ func FileExtensionRuntimes(op OpenWhiskInfo) (ext 
map[string]string) {
                        ext[JAR_FILE_EXTENSION] = k
                } else if strings.Contains(k, RUBY_RUNTIME) {
                        ext[RUBY_FILE_EXTENSION] = k
+               } else if strings.Contains(k, RUST_RUNTIME) {
+                       ext[RUST_FILE_EXTENSION] = k
                } else if strings.Contains(k, GO_RUNTIME) {
                        ext[GO_FILE_EXTENSION] = k
                } else if strings.Contains(k, DOTNET_RUNTIME) {
@@ -233,6 +237,8 @@ func FileRuntimeExtensions(op OpenWhiskInfo) (rte 
map[string]string) {
                                        rte[v[i].Kind] = JAVA_FILE_EXTENSION
                                } else if strings.Contains(k, RUBY_RUNTIME) {
                                        rte[v[i].Kind] = RUBY_FILE_EXTENSION
+                               } else if strings.Contains(k, RUST_RUNTIME) {
+                                       rte[v[i].Kind] = RUST_FILE_EXTENSION
                                } else if strings.Contains(k, GO_RUNTIME) {
                                        rte[v[i].Kind] = GO_FILE_EXTENSION
                                } else if strings.Contains(k, DOTNET_RUNTIME) {

Reply via email to