Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion apigw-http-api-lambda-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion apigw-http-api-lambda-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -23,7 +25,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd apigw-http-api-lambda-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down
10 changes: 9 additions & 1 deletion lambda-s3-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion lambda-s3-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -23,7 +25,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd lambda-s3-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down
10 changes: 9 additions & 1 deletion lambda-sfn-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion lambda-sfn-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -23,7 +25,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd lambda-sfn-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down
10 changes: 9 additions & 1 deletion lambda-sqs-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion lambda-sqs-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -23,7 +25,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd lambda-sqs-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down
2 changes: 1 addition & 1 deletion s3-eventbridge-direct-rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "sqs-lambda-rust"
name = "s3-eventbridge-direct-rust"
version = "0.1.0"
edition = "2021"

Expand Down
10 changes: 9 additions & 1 deletion s3-eventbridge-direct-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion s3-eventbridge-direct-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -25,7 +27,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd s3-eventbridge-direct-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down
10 changes: 9 additions & 1 deletion sqs-lambda-rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
FUNCTIONS := handler
ARCH := aarch64-unknown-linux-gnu
ARCH_SPLIT = $(subst -, ,$(ARCH))

build:
cross build --release --target $(ARCH)
ifeq ("$(shell zig targets | jq -r .native.cpu.arch)-$(shell zig targets | jq -r .native.os)-$(shell zig targets | jq -r .native.abi)", "$(word 1,$(ARCH_SPLIT))-$(word 3,$(ARCH_SPLIT))-$(word 4,$(ARCH_SPLIT))")
@echo "Same host and target. Using native build"
cargo build --release --target $(ARCH)
else
@echo "Different host and target. Using zigbuild"
cargo zigbuild --release --target $(ARCH)
endif

rm -rf ./build
mkdir -p ./build
${MAKE} ${MAKEOPTS} $(foreach function,${FUNCTIONS}, build-${function})
Expand Down
4 changes: 3 additions & 1 deletion sqs-lambda-rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Important: this application uses various AWS services and there are costs associ
* [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html) installed and configured
* [Git Installed](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* [AWS Serverless Application Model](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-sam-cli-install.html) (AWS SAM) installed
* [Rust](https://www.rust-lang.org/) 1.56.0 or higher
* [cargo-zigbuild](https://github.com/messense/cargo-zigbuild) and [Zig](https://ziglang.org/) for cross-compilation

## Deployment Instructions

Expand All @@ -23,7 +25,7 @@ Important: this application uses various AWS services and there are costs associ
```
cd sqs-lambda-rust
```
3. Install dependencies and build (docker and cross build are required):
3. Install dependencies and build:
```
make build
```
Expand Down