Skip to content

Commit 289bd42

Browse files
authored
Update README.md
1 parent 5654cc9 commit 289bd42

File tree

1 file changed

+11
-20
lines changed

1 file changed

+11
-20
lines changed

README.md

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ A runtime for executing AWS Lambda Functions written in Kotlin/Native, designed
1111

1212
## Supported [OS-only runtime machines](https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html)
1313

14-
- Amazon Linux 2023 (provided.al2023) with x86_64 or ARM architecture
15-
- Amazon Linux 2 (provided.al2) with x86_64 or ARM architecture
14+
- Amazon Linux 2023 (provided.al2023) with x86_64 or arm64 architecture
15+
- Amazon Linux 2 (provided.al2) with x86_64 or arm64 architecture
1616

1717
## Performance
1818

@@ -36,17 +36,21 @@ See [Get started with Kotlin/Native](https://kotlinlang.org/docs/native-get-star
3636
Add the following to your `build.gradle` file:
3737
```kotlin
3838
plugins {
39-
id("io.github.trueangle.plugin.lambda") version "0.0.1"
39+
id("io.github.trueangle.plugin.lambda") version "0.0.2"
4040
}
4141

4242
kotlin {
4343
sourceSets {
4444
nativeMain.dependencies {
45-
implementation("io.github.trueangle:lambda-runtime:0.0.2")
46-
implementation("io.github.trueangle:lambda-events:0.0.2")
45+
implementation("io.github.trueangle:lambda-runtime:$lambda_runtime_version")
46+
implementation("io.github.trueangle:lambda-events:$lambda_runtime_version")
4747
}
4848
}
4949
}
50+
51+
buildLambdaRelease {
52+
architecture.set(Architecture.LINUX_X64) // or Architecture.LINUX_ARM64
53+
}
5054
```
5155

5256
### 3. Specify Entry Point and Targets
@@ -196,19 +200,6 @@ Log.fatal(message: T?) // Messages about serious errors that cause the applicati
196200
## Troubleshooting
197201

198202
- For Amazon Linux 2023, create a [Lambda layer](https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html) with the libcrypt.so dependency. This library can be taken from your Linux machine or via the [Github Action workflow](https://github.com/trueangle/kotlin-native-aws-lambda-runtime/actions/workflows/libcrypt.yml).
199-
- Currently, only x86-64 architecture is supported by the runtime. LinuxArm64 is not supported by Kotlin Native yet, For more details, see:
200-
1. The list of supported targets for Kotlin Native (
201-
2.0.20-RC2) https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-prebuilt/2.0.20-RC2/
203+
- Currently, it's not possible to build ARM type target on Linux machine (use macOS instead) as Kotlin repo misses necessary metadata. For more details, see:
204+
1. The list of supported targets for Kotlin Native https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-native-prebuilt/
202205
2. https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
203-
- If you are running the project build on MacOS you might come across a set of errors connected with
204-
curl linking e.g. `ld.lld: error: undefined symbol: curl_global_init`. This means that your local
205-
machine [uses different curl version from what is requested by the runtime](https://youtrack.jetbrains.com/issue/KTOR-6361/Curl-Error-linking-curl-in-linkDebugExecutableLinuxX64-on-macOS).
206-
To solve that either
207-
use [Gihub Actions workflow](https://github.com/trueangle/kotlin-native-aws-lambda-runtime/actions/workflows/buildLinux86_64.yml)
208-
or local docker container with ubuntu 22 under the hood. Example [Dockerfile](Dockerfile) and
209-
build command:
210-
211-
```bash
212-
docker build -t sample .
213-
docker run --rm -v $(pwd):/sample -w /sample sample ./gradlew build
214-
```

0 commit comments

Comments
 (0)