Skip to content

JadenSimon/multi-arch-zig-lambda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a demo project showing some of my tool's features:

  • Defining infrastructure using generated synapse-provider:* modules
  • Programmatically bundling individual closures into infra
  • Calling Zig functions from TypeScript
  • Deploying, testing, tearing down

Components

add.zig exports a function adding two arguments plus an environment value.

lambda.ts defines a class for creating Lambda functions from JS closures.

main.ts creates and tests two Lambdas.

Prerequisites

Commands

synapse test runs install, compile, and deploy automatically if needed, then executes the tests.

Example output:

Deploying (8/8)
✓ + fn <LambdaFunction> (17s)
✓ + test

aarch64 (EXTRA_VAL: 67) (589ms)
x64 (EXTRA_VAL: 21) (467ms)

On a fresh machine install can take a minute, mostly due to the large AWS Terraform provider.

Subsequent changes to the code will reuse the deployment, updating as little as possible.

synapse destroy tears everything down:

Destroying (8/8)
✓ - test
✓ - fn <LambdaFunction> (1s)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published