Skip to content

Add win-arm64, linux-arm64, android-x64, android-arm, ios-x64 to NativeRuntimeSettings.DefaultSettings#729

Open
neuecc wants to merge 1 commit intoGlitchEnzo:masterfrom
neuecc:master
Open

Add win-arm64, linux-arm64, android-x64, android-arm, ios-x64 to NativeRuntimeSettings.DefaultSettings#729
neuecc wants to merge 1 commit intoGlitchEnzo:masterfrom
neuecc:master

Conversation

@neuecc
Copy link

@neuecc neuecc commented Sep 5, 2025

First of all, thank you for the wonderful library. I am actively recommending its use in my OSS projects as well.

While testing libraries that include native runtimes, I confirmed that some packages are not being imported.

image

This is caused by the absence of entries in NativeRuntimeSettings, and I have also confirmed that there are no issues if overwritten with the corresponding json.
https://github.com/Cysharp/NativeCompressions/blob/6123b5a/sandbox/UnityApp/ProjectSettings/Packages/com.github-glitchenzo.nugetforunity/NativeRuntimeSettings.json

This is a proposal to include support for these (win-arm64, etc.) in the default settings.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for additional native runtime identifiers (RIDs) to NativeForUnity's default configuration. The PR addresses missing platform/architecture combinations that prevented certain NuGet packages with native dependencies from being properly imported into Unity projects.

Changes:

  • Added support for five new runtime identifiers: win-arm64, linux-arm64, android-x64, android-arm, and ios-x64
  • Each new entry is configured with appropriate CPU architecture mappings and BuildTarget settings to ensure proper asset handling in Unity

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

new NativeRuntimeAssetConfiguration("linux-arm64", "ARM64", null, "Linux", BuildTarget.StandaloneLinux64),
new NativeRuntimeAssetConfiguration("android", null, null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-x64", "x86_64", null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-arm", null, null, null, BuildTarget.Android),
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The android-arm runtime identifier typically refers to ARMv7 architecture. Consider setting the CPU architecture to "ARMv7" instead of null to ensure proper platform targeting for ARMv7 devices. This would be consistent with how other architecture-specific entries like android-x64 and android-arm64 explicitly specify their CPU architecture.

Suggested change
new NativeRuntimeAssetConfiguration("android-arm", null, null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-arm", "ARMv7", null, null, BuildTarget.Android),

Copilot uses AI. Check for mistakes.
Comment on lines +78 to +86
new NativeRuntimeAssetConfiguration("win-arm64", "ARM64", null, "Windows", BuildTarget.StandaloneWindows64),
new NativeRuntimeAssetConfiguration("linux-x64", "x86_64", "x86_64", "Linux", BuildTarget.StandaloneLinux64),
new NativeRuntimeAssetConfiguration("linux-arm64", "ARM64", null, "Linux", BuildTarget.StandaloneLinux64),
new NativeRuntimeAssetConfiguration("android", null, null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-x64", "x86_64", null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-arm", null, null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("android-arm64", "ARM64", null, null, BuildTarget.Android),
new NativeRuntimeAssetConfiguration("ios", null, null, null, BuildTarget.iOS),
new NativeRuntimeAssetConfiguration("ios-x64", "x86_64", null, null, BuildTarget.iOS),
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The NativeSettingsTest in NuGetTests.cs only tests a subset of runtime configurations (win7-x64, win7-x86, win-x64, win-x86, linux-x64, osx-x64). Consider adding test cases for the newly added runtime configurations (win-arm64, linux-arm64, android-x64, android-arm, ios-x64) to ensure they are properly deserialized and have the expected BuildTarget values.

Copilot uses AI. Check for mistakes.
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.

2 participants

Comments