Ref Arch: Serverless GraphQL in Rust on AWS This repository demonstrates how to create and host (serverlessly) a GraphQL subgraph for a federated graph using
rust
and aws-cdk
. It is currently a work in progress; as such, do not use in production.
About • Features • Installation • Documentation • Resources • License
About
Blazingly fast, memory efficient, and ready to power performance-critical services, serverless GraphQL apis written in rust
are super sweet! Paired with production-grade, cloud-native infrastructure managed and provisioned as code, you get consistent, repeatable, and successful deployments wherever and whenever you need.
Installation
Note: Currently, the service build script (./scripts/build_service.sh
) only supports MacOS. Theoretically, it should work with both aarch64
and x86_64
architectures. That said, I haven't tested it on x86_64
yet.
To begin, run the following command in project root:
pnpm build:service
The above command will perform the following actions:
- Install or update
homebrew
- Install pre-built crosscompilers
- Install scripting dependencies (
wget
,jq
) - Install or update
rust
(viarustup
) - Install shared compilation cache (
sccache
) - Establish a build tool-chain to target
AWS Graviton2
processors - Create a deployment package for use with
AWS Lambda