https://github.com/apache/openwhisk-runtime-deno
Apache OpenWhisk Runtime Deno supports Apache OpenWhisk functions written in Deno
https://github.com/apache/openwhisk-runtime-deno
apache cloud deno docker faas functions functions-as-a-service openwhisk openwhisk-runtime serverless serverless-architectures serverless-functions typescript
Last synced: 3 months ago
JSON representation
Apache OpenWhisk Runtime Deno supports Apache OpenWhisk functions written in Deno
- Host: GitHub
- URL: https://github.com/apache/openwhisk-runtime-deno
- Owner: apache
- License: apache-2.0
- Created: 2020-08-19T04:54:49.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-09-24T15:33:04.000Z (9 months ago)
- Last Synced: 2025-04-03T04:17:03.884Z (3 months ago)
- Topics: apache, cloud, deno, docker, faas, functions, functions-as-a-service, openwhisk, openwhisk-runtime, serverless, serverless-architectures, serverless-functions, typescript
- Language: Scala
- Homepage: https://openwhisk.apache.org
- Size: 116 KB
- Stars: 14
- Watchers: 30
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Apache OpenWhisk Runtime for Deno
[](http://www.apache.org/licenses/LICENSE-2.0)
This repository contains sources files needed to build the Deno
runtimes for Apache OpenWhisk. The build system will produce a Docker
image for each runtime version. These images are used in the platform
to execute Deno actions.Try it out using Docker image:
```sh
wsk action create hello main.ts --docker=openwhisk/action-deno-1.3.0
```The content of the `main.ts` is shown below.
```ts
export default (args: any) => {
return {
message: `Hello, ${args.name || 'World'}!`
}
}
```
For the return result, not only support `dictionary` but also support `array`So a very simple `hello array` function would be:
```ts
export default (args: any) => {
return ["a", "b"]
}
```And support array result for sequence action as well, the first action's array result can be used as next action's input parameter.
So the function can be:
```ts
func main(args: Any) -> Any {
return args
}
```
When invokes above action, we can pass an array object as the input parameter.## Development
A Dockerfile for each runtime image is defined in its respective
runtime version directory. Modify this file if you need to add extra
dependencies to a runtime version.### Build
- Run the `distDocker` command to generate local Docker images for the different runtime versions.
```
./gradlew distDocker
```### Test
1. Build the local Docker images for the Deno runtime (see the instructions above).
2. Install project dependencies from the top-level Apache OpenWhisk
[project](https://github.com/apache/openwhisk), which ensures correct
versions of dependent libraries are available in the Maven cache.```
./gradlew install
```*This command **MUST BE** run from the directory containing the main
Apache OpenWhisk [repository](https://github.com/apache/openwhisk),
not this repository's directory.*3. Run the project tests.
```
./gradlew :tests:test
```