-
Notifications
You must be signed in to change notification settings - Fork 344
fix: add missing supported native targets #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughAdds Windows (mingwX64) to Kotlin/Native target selection in a Gradle build script and updates documentation to reflect new Windows and Android native targets, removing a prior Windows limitation note. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal). Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
codeSnippets/snippets/embedded-server-native/build.gradle.kts (1)
22-24
: Consider Windows ARM64 handling and clearer fallback.On Windows ARM64 hosts,
os.arch
may beaarch64
. Today you unconditionally pickmingwX64
, which can mismatch the host and fail toolchain detection. Suggest:
- Gate
mingwX64
behindarch in {"x86_64","amd64"}
.- Add a branch for
arch == "aarch64"
with a TODO to usemingwArm64("native")
when it’s stable in your Kotlin version, otherwise throw with a clear message.This avoids confusing failures on ARM64 machines.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
codeSnippets/snippets/embedded-server-native/build.gradle.kts
(1 hunks)topics/server-native.md
(0 hunks)topics/server-platforms.md
(2 hunks)
💤 Files with no reviewable changes (1)
- topics/server-native.md
🔇 Additional comments (1)
topics/server-platforms.md (1)
60-80
: Android targets verified; mingwArm64 not supported yetandroidNativeArm32, androidNativeArm64, androidNativeX86, androidNativeX64 are the official Kotlin/Native (Kotlin 2.x) Android Gradle target names and androidNativeArm32/androidNativeX86 are not listed as deprecated. mingwArm64 is not an official/supported Kotlin/Native Gradle Windows target—use mingwX64 and add mingwArm64 only if/when upstream adds it.
File: topics/server-platforms.md (lines 60–80, 180–191)
The

Native Server
section of the Ktor documentation currently says thatWindows target is not supported
as follows:This statement almost stopped me from proceeding on my project, which is based on Kotlin/Native and Ktor and intended to support all desktop platforms (Windows, macOS, Linux). Later I checked Maven Central and found that nearly every module had a distribution suffixed
-mingwX64
, which convinced me that Windows platform had been well supported after April 2024, so I deleted the misleading statement in this PR.I further read through the documentation and found more missing platforms in
Supported Platform
section, e.g.androidNativeX64
. I appended them to that section in this PR.Additionally, I added Windows target to the related code snippet, and corrected the link to
Supported Platform
section (the older link also points to this page but the user will experience a redirection).