Repository navigation
refactor(app)!: ncnn 插件拆仓为独立包(github.com/hhoao/ncnn) - #2
Merged
Merged
Conversation
…ji_ncnn) - Replace huji-app/packages/huji_ncnn with a git submodule of github.com/hhoao/ncnn (package:ncnn); pin efff93d. - Delete app-side ncnn_inference_engine.dart / ncnn_helper_process.dart and the package-level tests that migrated with the package (ncnn_plugin_test, ncnn_real_frame_test, ncnn_stale_marker_test); NcnnInferenceEngine/NcnnHelperProcess now come from package:ncnn. - NcnnModelPredictor wires NcnnInferenceEngine(onLog: AppLogger().i) and passes NcnnOptions.yolo(warmupWidth/Height: imgsz) parsed from the newly bundled ultralytics metadata.yaml (falls back to const NcnnOptions.yolo()). - New slim test bootstrap pins the built plugin dir via NcnnRuntime.overrideLibraryDirectory (app build + package example build); native-dependent tests skip cleanly without a build. - Rename huji_ncnn references across pubspec, scripts, workflows, generated plugin files, Podfile.lock (hand-edited, SHA-1 of the new podspec); env vars HUJI_NCNN_* -> NCNN_*. Co-Authored-By: Claude <noreply@anthropic.com>
The ncnn package's linux bundling installed the real ncnn shared lib under its versioned file name; the plugin's DT_NEEDED (libncnn.so.1) then failed to resolve on machines without the build tree (masked by the plugin's absolute dev RUNPATH, and previously in AppImages by linuxdeploy deploying libncnn.so.1 from the old libhuji_ncnn_plugin name). Pull the fix so the Flutter bundle — and the AppImage built from it — is self-contained. Co-Authored-By: Claude <noreply@anthropic.com>
…odfile.lock order, bump ncnn pin Co-Authored-By: Claude <noreply@anthropic.com>
hhoao
added a commit
to hhoao/ncnn
that referenced
this pull request
Sep 11, 2026
…duct name collision
The pod is named 'ncnn', so the pod target's own build product is
${PODS_CONFIGURATION_BUILD_DIR}/ncnn/ncnn.framework while CocoaPods
stages the vendored ncnn xcframework slices into
${PODS_CONFIGURATION_BUILD_DIR}/XCFrameworkIntermediates/ncnn/.
Both directories end up in the app target's FRAMEWORK_SEARCH_PATHS and
the link line contains -framework ncnn — ld resolves the flag against
the pod-product dir (sorted first) and picks the shim-only framework,
leaving every ncnn:: C++ symbol undefined at app link time.
The prepare_command now renames the vendored bundle (and inner binary;
the ar symbol table is unaffected by a rename) to ncnn_static(.xc).framework,
so the aggregate OTHER_LDFLAGS become -framework ncnn (shim product) +
-framework ncnn_static (real library) with no ambiguity. Verified against
CocoaPods 1.15 locally: generated xcconfigs, copy-xcframeworks script and
staged headers all point at the renamed bundle, and the staged fat ar
archive still exports Net::load_param / get_gpu_count / GpuInfo::* /
Mat::from_pixels.
iOS follow-up: vendored plain .framework bundles are never staged into
XCFrameworkIntermediates, so HEADER_SEARCH_PATHS now points directly at
the renamed bundle's Headers via $(PODS_TARGET_SRCROOT).
Pre-migration (pod 'huji_ncnn') there was no collision — see hhoao/huji#2.
Co-Authored-By: Claude <noreply@anthropic.com>
…name fixes macOS link Bumps ncnn to daf3faf: the vendored ncnn(.xc)framework is renamed to ncnn_static in the podspec prepare_command so -framework ncnn no longer collides with the pod target's own product dir (root cause of the 'Undefined symbols for architecture arm64' failure in the macOS job). Co-Authored-By: Claude <noreply@anthropic.com>
… VM segfault The package migration replaced the app's engine wrapper with package:ncnn's NcnnInferenceEngine but dropped the wiring of its gpuDeviceProbe through GpuDeviceSelector. The default probe calls NcnnRuntime.gpuDevices directly with no FLUTTER_TEST guard, so in the flutter_test VM ncnn's Vulkan init actually runs (on macOS CI it now loads MoltenVK — previously impossible, hence green before) and flutter_tester segfaults at test teardown: unhandled error during finalization of test: TestDeviceException(Shell subprocess crashed with segmentation fault.) (4 occurrences in the macOS integration step; only 6/19 tests ran and the step exited 1 even though every started test passed.) Restore the pre-migration behavior: gpuDeviceProbe: () async => GpuDeviceSelector.devices. Its FLUTTER_TEST probe guard keeps the test VM on CPU (NCNN_ENABLE_GPU_IN_TESTS=1 to override). Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
huji-app/packages/huji_ncnn拆出为独立 pub 包 ncnn(https://github.com/hhoao/ncnn),本分支以 git submodule 接入(huji-app/packages/ncnn,pind9092fa,CI 绿)hn_extract_f32浮点输入、YOLO classify/detect 纯 Dart 工具、ultralytics metadata 解析(类名 + imgsz)docs/superpowers/specs/2026-09-10-ncnn-package-extraction-design.md,实施计划:docs/superpowers/plans/2026-09-10-ncnn-package-extraction.md验收
flutter test207/207(含真实 native GPU 推理 golden 测试)--ncnn-selftest:Vulkan(RTX 4060)+ 强制 CPU 双路 ALL OKflutter analyze0 错误(117 条预存在 info,比基线少 2)注意事项
HUJI_NCNN_LIB_DIR→NCNN_DART_LIB_DIR、HUJI_NCNN_ENABLE_GPU_IN_TESTS→NCNN_ENABLE_GPU_IN_TESTS、HUJI_NCNN_STRICT_GOLDENS→NCNN_STRICT_GOLDENSmacos/Podfile.lock中 ncnn 条目 checksum 对应旧 podspec 版本,下次 macOSpod install会自动重写(非阻塞)🤖 Generated with Claude Code