-
Notifications
You must be signed in to change notification settings - Fork 102
Include mtmd files for publishing in llama-cpp-sys-2 #806
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
llama.cpp/tools/CMakeLists.txt
for publishing in llama-cpp-sys-2
Paused work on this after a few minutes once
all these directories that need to be included showed up and I started to wonder if the entire (I'll come back - energy allowing - later) |
We used to do this but ran into crates.io upload size limits. |
@MarcusDunn I think it is possible to request bigger crates upload sizes. Default is 10MiB I think, but had a PR within another project were the maintainer got bigger sys crates allowed. Until then, I think the git repo is the best way to go to use mtmd? |
…feature Add missing tools/CMakeLists.txt and tools/mtmd/CMakeLists.txt to the include patterns in Cargo.toml. These files are required when building with the 'mtmd' feature enabled, as CMake attempts to build the tools directory but the CMakeLists.txt files were not included in the published crate. Fixes build error: "CMake Error: The source directory [...]/tools does not contain a CMakeLists.txt file" Resolves issues identified in PR utilityai#806 for MTMD multimodal support. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
… building Replace static tools CMakeLists.txt approach with dynamic generation based on enabled features. This creates a scalable, merge-friendly solution for our feature branches. Key improvements: - Dynamic CMakeLists.txt generation via generate_tools_cmake() function - Only builds tools for enabled features (currently just MTMD) - Designed for easy extension by other feature branches - No static files to conflict during merges - Clear extension points with commented examples Architecture: - generate_tools_cmake() creates tools/CMakeLists.txt at build time - any_tool_features flag determines if tools directory should be built - Each feature branch can add their tool by uncommenting their section This solves the original PR utilityai#806 issue (avoiding building all tools) while providing a foundation for RPC, server, quantize, and other tool features. Future branches can easily add their tools by: 1. Adding their feature to any_tool_features check 2. Uncommenting their add_subdirectory() line in generate_tools_cmake() 3. Including their tool's CMakeLists.txt in Cargo.toml 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…r split-model-loading This commit adds the scalable dynamic tools building system to the split-model-loading branch: - Adds generate_tools_cmake() function to dynamically create tools/CMakeLists.txt - Only builds tools for enabled features (solving PR utilityai#806 issue) - Split model loading doesn't require tools but maintains architecture consistency - Includes tools/CMakeLists.txt in Cargo.toml for build system compatibility - Uses feature-based conditional compilation for future extensibility This creates a merge-friendly architecture where each feature branch can extend tool building without conflicts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Merges the complete MTMD (multimodal) feature implementation including: - Dynamic tools CMakeLists.txt generation system - MTMD library and CLI tool building when feature is enabled - Solves PR utilityai#806 issue by only building tools for enabled features - Maintains backward compatibility and merge-friendly architecture - Includes all necessary MTMD source files and CMakeLists.txt files 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Trying to use multimodality added in #744 (thank you everyone who contributed!), the repository can build successfully locally, but not as a dependency of another crate (going through crates.io).
Most relevant part of build error:
CMake Error at CMakeLists.txt:206 (add_subdirectory): The source directory ... /llama-cpp-sys-2-0.1.118/llama.cpp/tools does not contain a CMakeLists.txt file.
This fixes that by including the file for publishing in
llama-cpp-sys-2
'sCargo.toml
file.Will continue testing to see if other files liketools/mtmd/CMakeLists.txt
also need to be included.