Skip to content

feat: universal SPM build plugin, builder CLI, and multi-platform stubs (#10) - #11

Merged
gumaciel merged 10 commits into
masterfrom
feat/simplify-ios-build
Sep 16, 2026
Merged

gumaciel merged 10 commits into
masterfrom
feat/simplify-ios-build

Conversation

@gumaciel

Copy link
Copy Markdown
Contributor

Resolves #10

Summary of Changes

1. Native Swift Package Command Plugin (swift package godot-build)

  • Added Plugins/GodotBuildPlugin/Plugin.swift and exposed godot-build command in Package.swift.
  • Allows downstream repositories depending on godot-swift-plugin to compile both macOS .dylib and iOS .xcframework with zero local shell script maintenance.

2. Universal Plugin Builder (scripts/build_plugin.sh)

  • Centralized build orchestration auto-discovering targets and Godot addon output directory (addons/<slug>/bin).
  • Builds iOS device (iphoneos arm64) and simulator (iphonesimulator arm64 + x86_64) slices.
  • Assembles static archives dynamically and outputs a static XCFramework (xcodebuild -create-xcframework).

3. Interactive 1-Line Scaffolding Wizard (scripts/create_plugin.sh)

  • Generates complete Godot Swift plugin projects via curl -fsSL ... | bash.
  • Interactive prompts for PascalCase naming, platform targeting (all, ios, macos), automated stub copying, and optional immediate compilation.

4. Precompiled Multi-Architecture Stubs (templates/stubs/)

  • Generates minimal no-op C GDExtension stubs (< 80 KB total) satisfying Godot 4.6–4.7 loader across all CPU architectures:
    • macOS: Universal dylib (arm64 + x86_64).
    • Windows: stub_windows_x86_64.dll & stub_windows_arm64.dll.
    • Linux: libstub_linux_x86_64.so & libstub_linux_arm64.so.
    • Android: libstub_android_arm64.so & libstub_android_x86_64.so.
    • iOS: stub_ios.xcframework (Static archive arm64 device + universal simulator).
  • Configured with include_tags for Godot 4.8+ native platform filtering.

5. CI & Documentation

  • Updated .github/workflows/ci.yml to run the centralized build script.
  • Updated documentation guides in docs/guide/ and validated build with VitePress (npm run docs:build).

Verification

  • swift test: 9/9 passed.
  • swift test --package-path example/ios: 3/3 passed.
  • ./scripts/build_local.sh all: compiled macOS dynamic dylib & iOS universal static XCFramework.
  • ./scripts/run_example.sh --headless --quit-after 1: 100% verified with Godot 4.7.2.
  • gdlint example/godot_editor/addons/: 0 problems found.
  • npm run docs:build: built successfully in 4.17s.

…orm stubs (#10)

- Add GodotBuildPlugin SPM Command Plugin (swift package godot-build)
- Add universal builder scripts/build_plugin.sh for macOS dylib & iOS static XCFramework
- Add interactive 1-liner scaffolding wizard scripts/create_plugin.sh
- Add multi-architecture GDExtension stubs for Windows, Linux, Android, macOS, and iOS
- Update CI workflow and documentation with VitePress verification
@poing-ai poing-ai Bot added android Android platform documentation Improvements or additions to documentation enhancement New feature or request ios iOS platform medium priority Medium priority issue labels Sep 15, 2026

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: 0abec3513a · Model: gemini-3.8-flash

🔴 Changes requested

Introduces the godot-build SPM command plugin, universal plugin builder script, interactive plugin creation wizard, and multi-platform GDExtension stubs.

Findings

Severity File Finding
🔴 Plugins/GodotBuildPlugin/Plugin.swift packageManager is not in scope. In SwiftPM CommandPlugin, packageManager is a member of PluginContext (context.packageManager), causing a build failure when compiling the plugin.
🔴 scripts/create_plugin.sh The remote curl stub fallback only downloads generic stub_windows.dll, libstub_linux.so, and libstub_android.so, but the generated .gdextension manifest requires architecture-specific stubs (*_x86_64.* and *_arm64.*), resulting in broken references.
🟡 scripts/build_plugin.sh In build_macos(), the Python parsing fallback outputs ${PLUGIN_NAME} instead of an empty string when no .dynamic library is found, making [ -z "${dynamic_product}" ] dead code and preventing graceful skipping when targeting all.
🟡 scripts/run_example.sh Contains a hardcoded machine-specific path (/Volumes/Mac500GB/Downloads/...) in the Godot binary detection cascade.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread Plugins/GodotBuildPlugin/Plugin.swift Resolved
Comment thread scripts/create_plugin.sh Resolved
Comment thread scripts/build_plugin.sh Resolved
Comment thread scripts/run_example.sh Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: f134f30c14 · Model: gemini-3.7-flash

✅ Approved

Introduces the GodotBuildPlugin SPM command plugin, universal build and scaffolding scripts (build_plugin.sh, create_plugin.sh, generate_stubs.sh), and multiplatform GDExtension stubs for clean editor operation across operating systems. Adds helper script for launching the example Godot project, provides minimal GDExtension stub C source and binaries across multiple target platforms, and updates the godot-cpp submodule commit.


ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: 8c654aae23 · Model: gemini-3.8-flash

🔴 Changes requested

Introduces a universal build script (build_plugin.sh), a Swift Package Manager command plugin (godot-build), and migrates the example package directory from example/ios to example/apple. Adds GDExtension stub libraries and a generator script (generate_stubs.sh) to support multi-platform compatibility, along with a helper script to launch the Godot sample project.

Findings

Severity File Finding
🔴 .github/workflows/ci.yml The CI workflow swift-test job still runs swift test --package-path example/ios, but the directory has been renamed to example/apple, which will cause CI test execution to fail.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread .github/workflows/ci.yml Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: 6154929821 · Model: gemini-3.8-flash

🟡 Approved with suggestions

Adds the GodotBuildPlugin SwiftPM command plugin and universal build scripts, renames example/ios to example/apple for unified Apple platform targeting, and provides precompiled multiplatform stubs. Adds GDExtension stub compilation scripts and prebuilt binaries for unsupported platforms, a sample project runner script, and updates the godot-cpp submodule commit.

Findings

Severity File Finding
🟡 .github/workflows/ci.yml In .github/workflows/ci.yml, the Run Example Swift Unit Tests step still references --package-path example/ios, which was renamed to example/apple and will cause CI test execution to fail.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread .github/workflows/ci.yml Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: b3b41d8d4a · Model: gemini-3.7-flash

🟡 Approved with suggestions

Adds a SwiftPM command plugin (GodotBuildPlugin) and automation scripts (build_plugin.sh, create_plugin.sh, build_local.sh) to support building and generating Godot Swift plugins. Also adds multiplatform precompiled stubs and updates project documentation and CI workflows. Adds helper scripts for generating cross-platform GDExtension stubs and running the sample Godot project, along with prebuilt stub binaries and an updated submodule commit.

Findings

Severity File Finding
🟡 Plugins/GodotBuildPlugin/Plugin.swift Downloading and executing an arbitrary shell script over HTTP using curl | chmod +x | bash at runtime introduces security risks if GitHub or network traffic is compromised.
🟢 docs/guide/sample-project.md Outdated directory reference in sample documentation: the directory tree still refers to example/ios/ whereas the project was migrated to example/apple/.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread Plugins/GodotBuildPlugin/Plugin.swift Resolved
Comment thread docs/guide/sample-project.md Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: b840f6a11c · Model: gemini-3.7-flash

🟡 Approved with suggestions

Introduces the GodotBuildPlugin SPM command plugin and universal build scripts, migrates example/ios to example/apple, and packages multiplatform GDExtension stubs. Adds multi-platform GDExtension stub generation scripts and templates alongside a helper script to run the example Godot project.

Findings

Severity File Finding
🟡 scripts/create_plugin.sh In scripts/create_plugin.sh, AUTHOR_NAME command substitution and variable expansion are escaped with backslashes (\$(...) and \${AUTHOR_NAME}), causing author="${AUTHOR_NAME}" to be written literally to plugin.cfg instead of resolving the git user name.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread scripts/create_plugin.sh Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: cbd0cab13c · Model: gemini-3.6-flash

✅ Approved

Adds the GodotBuildPlugin Swift Package Manager command plugin, universal build scripts (build_plugin.sh, create_plugin.sh), multi-platform GDExtension stubs, and migrates the sample project structure from example/ios to example/apple. Adds build scripts and C source code for generating cross-platform GDExtension stub libraries, a script for running example projects, and updates the godot-cpp submodule pointer.


ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: b70839c96f · Model: gemini-3.7-flash

🔴 Changes requested

Introduces a native Swift Package Manager command plugin (godot-build) and universal build script (build_plugin.sh), standardizing project creation and multi-platform compilation. Adds helper scripts to compile GDExtension stubs across multiple platforms (scripts/generate_stubs.sh), run the sample Godot project (scripts/run_example.sh), provides minimal stub C entrypoints, and updates the godot-cpp submodule.

Findings

Severity File Finding
🔴 scripts/common.sh In run_step, calling wait "${pid}" under set -e causes bash to exit immediately if the child process fails. The ERR trap aborts execution before local exit_code=$? is reached, preventing the failure diagnostic block from displaying compiler error output and cleaning up the temporary log file.
🟡 Plugins/GodotBuildPlugin/Plugin.swift GodotBuildPlugin halts execution if an addons//bin directory is not detected and does not parse -o or --output-dir arguments. This causes the documented CLI setup in README.md (Option B: swift package init) to fail during build, unlike build_plugin.sh which falls back to build/artifacts.

ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

Comment thread scripts/common.sh Resolved
Comment thread Plugins/GodotBuildPlugin/Plugin.swift Resolved
@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: 99d0eca2f1 · Model: gemini-3.6-flash

✅ Approved

Adds the unified build pipeline and project scaffolding tools, including the GodotBuildPlugin SPM Command Plugin, multiplatform stubs, and streamlined CI/documentation updates. Adds helper scripts for generating cross-platform GDExtension stubs (generate_stubs.sh, stub.c) and running example projects (run_example.sh), along with prebuilt stub binaries and an updated godot-cpp submodule commit.


ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

@gumaciel

Copy link
Copy Markdown
Contributor Author

/review

@poing-ai poing-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Poing AI

Commit: 99d0eca2f1 · Model: gemini-3.5-flash

✅ Approved

Refactors example package directory to example/apple, adds SPM GodotBuildPlugin command plugin, universal builder and generator scripts, and multiplatform GDExtension stubs. Introduces minimal GDExtension stub functions and compilation scripts to generate stub libraries for unsupported platforms, preventing loading errors in Godot.


ℹ️ About Poing AI

Poing AI is an open-source AI code reviewer and guidelines verifier for Godot, Unity, Unreal, and multi-platform repositories.

⭐ Support: If you find Poing AI helpful, consider starring the repo on GitHub!

Commands:

  • Comment /review or @poing-ai review on this PR to run a fresh review (requires issue_comment trigger in workflow).
  • Run locally in terminal: poing --local

@gumaciel
gumaciel merged commit c9dbe70 into master Sep 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

android Android platform documentation Improvements or additions to documentation enhancement New feature or request ios iOS platform medium priority Medium priority issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Universal godot-swift CLI & SPM Plugin to Eliminate In-Repo Build Scripts

1 participant