This project is licensed under the Apache-2.0 License.
Building
CRT interfaces are subject to change.
Docker
Building CRT for Kotlin/Native on Linux requires Docker images to be locally built and consumed. Before running the
Gradle build for this project, ensure that Docker is installed and run:
./docker-images/build-all.sh
If you encounter this error:
Unable to find image 'aws-crt-kotlin/linux-x64:latest' locally
docker: Error response from daemon: pull access denied for aws-crt-kotlin/linux-x64, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
Then your Docker daemon may not be properly configured to allow non-root access. To allowlist your account for access to
the Docker daemon, run:
sudo usermod -aG docker $USER
Git Submodules
This repository makes use of Git submodules. The first time you
clone the repository, you will also need to initialize the submodules:
git submodule update --init --recursive
Linux/Unix
Testing Different Linux Distros and Architectures
Build the test executable(s) for the architecture(s) you want to test.
See the usage/help for different distributions provided: python3 .github/scripts/run-container.py -h
OSX
Debugging simulator test issues
Xcode does not support simulator tests for <native target>
* What went wrong:
Execution failed for task ':aws-crt-kotlin:iosX64Test'.
> Error while evaluating property 'device' of task ':aws-crt-kotlin:iosX64Test'.
> Failed to calculate the value of task ':aws-crt-kotlin:iosX64Test' property 'device'.
> Xcode does not support simulator tests for ios_x64. Check that requested SDK is installed.
Ensure that you have an appropriate simulator runtime installed.
e.g. to install iOS platform support including simulator runtimes:
Building on Windows is slightly trickier and involves more prerequisites to configure the toolchain. There are slightly
different steps depending on whether you intend to build from an MSYS2 MinGW64 terminal or from a PowerShell
terminal:
AWS CRT Kotlin
Kotlin bindings to the AWS Common Runtime
License
This project is licensed under the Apache-2.0 License.
Building
CRT interfaces are subject to change.
Docker
Building CRT for Kotlin/Native on Linux requires Docker images to be locally built and consumed. Before running the Gradle build for this project, ensure that Docker is installed and run:
If you encounter this error:
Then your Docker daemon may not be properly configured to allow non-root access. To allowlist your account for access to the Docker daemon, run:
Git Submodules
This repository makes use of Git submodules. The first time you clone the repository, you will also need to initialize the submodules:
Linux/Unix
Testing Different Linux Distros and Architectures
run-container-test.pyhelper script to execute tests locallySee the usage/help for different distributions provided:
python3 .github/scripts/run-container.py -hOSX
Debugging simulator test issues
Xcode does not support simulator tests for <native target>
Ensure that you have an appropriate simulator runtime installed.
e.g. to install
iOSplatform support including simulator runtimes:List simulator runtimes with:
See also:
Windows
Building on Windows is slightly trickier and involves more prerequisites to configure the toolchain. There are slightly different steps depending on whether you intend to build from an MSYS2 MinGW64 terminal or from a PowerShell terminal:
Common Windows steps (terminal agnostic)
pacman -S --noconfirm mingw-w64-x86_64-cmake mingw-w64-x86_64-toolchainSteps to build using MSYS2 MinGW64
After following the Common Windows steps (terminal agnostic), in an MSYS2 MinGW64 terminal:
Add Git and the JDK to the
PATHenvironment variable:echo 'export PATH="$PATH:/c/Program Files/Git/bin"' >> ~/.bashrc⚠️ Note: The exact path may differ on your system depending on how you installed Git
echo 'export PATH="$PATH:/c/Program Files/Amazon Corretto/jdk25.0.3_9/bin"' >> ~/.bashrc⚠️ Note: The exact path may differ on your system depending on which JDK distribution/version you installed
. ~/.bashrcThis refreshes the
PATHenvironment variable with the preceding updatesClone and build aws-crt-kotlin:
Steps to build using PowerShell
After following the Common Windows steps (terminal agnostic), in a PowerShell terminal:
Add Bash and MinGW to the
PATHenvironment variable:[Environment]::SetEnvironmentVariable("PATH", $env:PATH + ";C:\msys64\usr\bin;C:\msys64\mingw64\bin", "Machine")⚠️ Note: The exact path may differ on your system depending on how you installed MSYS2
Configure
MINGW_PREFIXenvironment variable:[Environment]::SetEnvironmentVariable("MINGW_PREFIX", "C:\msys64\mingw64", "Machine")⚠️ Note: The exact path may differ on your system depending on how you installed MSYS2
Close and restart the PowerShell terminal so that the environment variable updates take effect
Clone and build aws-crt-kotlin: