Skip to content

Conversation

Wesley-Young
Copy link

@Wesley-Young Wesley-Young commented Sep 23, 2025

The Native Server section of the Ktor documentation currently says that Windows target is not supported as follows:
image

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).

Copy link

coderabbitai bot commented Sep 23, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary
Build script: Kotlin/Native target detection
codeSnippets/snippets/embedded-server-native/build.gradle.kts
Adds Windows host detection (hostOs.startsWith("Windows")) mapping to mingwX64("native"); updates comment reference; retains macOS/Linux mappings and unsupported-host error.
Docs: Server native compatibility
topics/server-native.md
Removes bullet stating Windows target is not supported.
Docs: Server platforms targets list
topics/server-platforms.md
Adds Android native targets (androidNativeArm32/Arm64/X86/X64) and Windows target (mingwX64) to the targets table.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Mention linuxArm64 support #665 — Similar updates to Kotlin/Native target-selection logic and platform docs; modifies target set in Gradle and documentation.

Suggested reviewers

  • vnikolova

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "fix: add missing supported native targets" is concise and accurately summarizes the primary change — adding missing native targets (Windows/mingwX64 and Android native presets) to the documentation and a code snippet; it directly reflects the changes described in the raw summaries and PR objectives and is specific enough for a teammate scanning history.
Description Check ✅ Passed The PR description clearly describes removing the misleading "Windows not supported" statement, adding missing native targets (including Android and mingwX64), updating the related code snippet, and fixing a link, which matches the provided file summaries and PR objectives and is therefore related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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 be aarch64. Today you unconditionally pick mingwX64, which can mismatch the host and fail toolchain detection. Suggest:

  • Gate mingwX64 behind arch in {"x86_64","amd64"}.
  • Add a branch for arch == "aarch64" with a TODO to use mingwArm64("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

📥 Commits

Reviewing files that changed from the base of the PR and between 069df1e and fc1ca40.

📒 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 yet

androidNativeArm32, 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant