Skip to content
This repository was archived by the owner on Mar 19, 2024. It is now read-only.

Commit 9c5b6d2

Browse files
Merge pull request #12 from Andrea-Scuderi/feature/swift_5_3
Support Swift 5.3
2 parents 1635c6a + e07a9e3 commit 9c5b6d2

File tree

6 files changed

+48
-12
lines changed

6 files changed

+48
-12
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
SWIFT_VERSION?=5.2.3
1+
SWIFT_VERSION?=5.3-amazonlinux2
2+
DOCKER_OS?=amazonlinux2
23

34
DOCKER_TAG=nio-swift:$(SWIFT_VERSION)
45
SWIFT_DOCKER_IMAGE=$(DOCKER_TAG)

Package.resolved

Lines changed: 26 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
# aws-lambda-swift-sprinter-nio-plugin
22

33

4-
[![Swift 5](https://img.shields.io/badge/Swift-5.0-blue.svg)](https://swift.org/download/) [![Swift 5.1](https://img.shields.io/badge/Swift-5.1-blue.svg)](https://swift.org/download/) [![Swift 5.2](https://img.shields.io/badge/Swift-5.2-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0-green) [![Build Status](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin.svg?branch=master)](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) [![codecov](https://codecov.io/gh/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin)
4+
[![Swift 5](https://img.shields.io/badge/Swift-5.3-blue.svg)](https://swift.org/download/) ![](https://img.shields.io/badge/version-1.0.0-green) [![Build Status](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin.svg?branch=master)](https://travis-ci.com/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin) [![codecov](https://codecov.io/gh/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin/branch/master/graph/badge.svg)](https://codecov.io/gh/swift-sprinter/aws-lambda-swift-sprinter-nio-plugin)
55

66
The project implements an HTTPS client plugin for the [LambdaSwiftSprinter](https://github.com/swift-sprinter/aws-lambda-swift-sprinter-core) framework.
77

88
The plugin is based on swift-nio 2.0 and uses the third part library [async-http-client](https://github.com/swift-server/async-http-client.git)
99

1010

11-
- Allow the handler to make an HTTPS call. Swift's implementation relies on ``libgnutls`` which expects to find its root certificates in ``/etc/ssl/certs/ca-certificates.crt`` directory. That directory is absent on Amazon Linux. **Currently calls to HTTPS endpoint will fail with an error** : ``error setting certificate verify locations:\n CAfile: /etc/ssl/certs/ca-certificates.crt\n CApath: /etc/ssl/certs``
12-
This library fix this issue by using `swift-nio 2`.
11+
- Allow the handler to make an HTTPS call using swift-nio
1312

1413
# Usage
1514

docker/5.3-amazonlinux2/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM swift:5.3-amazonlinux2 as builder
2+
3+
RUN yum -y install zip

docker/5.3-amazonlinux2/bootstrap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
EXECUTABLE=$LAMBDA_TASK_ROOT/"$(echo $_HANDLER | cut -d. -f1)"
3+
$EXECUTABLE
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/usr/lib/swift/linux/libBlocksRuntime.so
2+
/usr/lib/swift/linux/libFoundation.so
3+
/usr/lib/swift/linux/libFoundationNetworking.so
4+
/usr/lib/swift/linux/libFoundationXML.so
5+
/usr/lib/swift/linux/libdispatch.so
6+
/usr/lib/swift/linux/libicudataswift.so.65
7+
/usr/lib/swift/linux/libicui18nswift.so.65
8+
/usr/lib/swift/linux/libicuucswift.so.65
9+
/usr/lib/swift/linux/libswiftCore.so
10+
/usr/lib/swift/linux/libswiftDispatch.so
11+
/usr/lib/swift/linux/libswiftGlibc.so
12+
/usr/lib/swift/linux/libswiftSwiftOnoneSupport.so

0 commit comments

Comments
 (0)