{"id":19331922,"url":"https://github.com/developermindset-com/faiss-mobile","last_synced_at":"2025-10-07T00:19:20.463Z","repository":{"id":175728312,"uuid":"654382580","full_name":"DeveloperMindset-com/faiss-mobile","owner":"DeveloperMindset-com","description":"FAISS library compiled for iOS, macOS, tvOS, watchOS","archived":false,"fork":false,"pushed_at":"2025-01-19T19:47:26.000Z","size":4353,"stargazers_count":50,"open_issues_count":3,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T23:39:06.194Z","etag":null,"topics":["c","cpp","embeddings","faiss","ios","knn","macos","neighbor-search","search","similarity-search","tvos","vector","watchos"],"latest_commit_sha":null,"homepage":"https://www.developermindset.com/faiss-mobile/","language":"Roff","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DeveloperMindset-com.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-16T02:30:12.000Z","updated_at":"2025-04-07T07:04:25.000Z","dependencies_parsed_at":"2025-04-22T23:43:01.591Z","dependency_job_id":null,"html_url":"https://github.com/DeveloperMindset-com/faiss-mobile","commit_stats":null,"previous_names":["eugenehp/faiss-mobile"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/DeveloperMindset-com/faiss-mobile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperMindset-com%2Ffaiss-mobile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperMindset-com%2Ffaiss-mobile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperMindset-com%2Ffaiss-mobile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperMindset-com%2Ffaiss-mobile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DeveloperMindset-com","download_url":"https://codeload.github.com/DeveloperMindset-com/faiss-mobile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DeveloperMindset-com%2Ffaiss-mobile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278700913,"owners_count":26030810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cpp","embeddings","faiss","ios","knn","macos","neighbor-search","search","similarity-search","tvos","vector","watchos"],"created_at":"2024-11-10T02:43:02.059Z","updated_at":"2025-10-07T00:19:20.432Z","avatar_url":"https://github.com/DeveloperMindset-com.png","language":"Roff","readme":"# FAISS Mobile\n\nThis library provides means to compile and distribute FAISS library for iOS.\n\n[FAISS](https://github.com/facebookresearch/faiss) is a library — developed by Facebook AI — that enables efficient similarity search. So, given a set of vectors, we can index them using Faiss — then using another vector (the query vector), we search for the most similar vectors within the index.\n\n## Version\n\nLatest supported version of FAISS is [1.9.0](https://github.com/facebookresearch/faiss/releases/tag/v1.9.0).\n\n## Supported platforms\n\n- iOS\n- iOS Simulator\n- tvOS\n- tvOS Simulator\n- watchOS\n- watchOS Simulator\n- macOS\n\n## Requirements\n\n- Git [LFS](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage)\n- Xcode (including multiple `platforms`)\n- LLVM with Clang\n- Homebrew\n- g++\n- CMake\n- node\n- python\n- perl\n- ruby (for Cocoapods)\n- carthage\n- swift\n- [OpenMP](https://github.com/DeveloperMindset-com/openmp-mobile)\n\n## Why\n\nModern machine learning tools focus on the server side or desktop solutions, few of them optimise their code bases for mobile, this repository is a structured way to get the FAISS source code compiled and distributed to iOS developers.\n\n## Getting started\n\nRun `./faiss.sh` and it will create `dist/faiss.xcframework` that you can use in your Xcode project.\n\n## faiss.xcframework\n\u003cdetails\u003e\n\u003csummary\u003eOnce the compilation is done, you'll have XCframework created with the files below\u003c/summary\u003e\n\n```shell\ntree dist/faiss.xcframework -P '*.a'\ndist/faiss.xcframework\n├── ios-arm64_arm64e\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n├── ios-arm64_arm64e_x86_64-simulator\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n├── macos-arm64_arm64e_x86_64\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n├── tvos-arm64\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n├── tvos-x86_64-simulator\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n├── watchos-arm64_32_armv7k\n│   ├── Headers\n│   │   └── faiss\n│   │       ├── c_api\n│   │       │   ├── impl\n│   │       │   └── utils\n│   │       ├── impl\n│   │       │   └── code_distance\n│   │       ├── invlists\n│   │       └── utils\n│   │           ├── approx_topk\n│   │           ├── approx_topk_hamming\n│   │           ├── distances_fused\n│   │           ├── hamming_distance\n│   │           └── transpose\n│   └── libfaiss.a\n└── watchos-i386-simulator\n    ├── Headers\n    │   └── faiss\n    │       ├── c_api\n    │       │   ├── impl\n    │       │   └── utils\n    │       ├── impl\n    │       │   └── code_distance\n    │       ├── invlists\n    │       └── utils\n    │           ├── approx_topk\n    │           ├── approx_topk_hamming\n    │           ├── distances_fused\n    │           ├── hamming_distance\n    │           └── transpose\n    └── libfaiss.a\n\n106 directories, 7 files\n```\n\u003c/details\u003e\n\n## faiss_c.xcframework\n\u003cdetails\u003e\n\u003csummary\u003eA C only version, without C++ dependency is inside `faiss_c.xcframework`\u003c/summary\u003e\n\n```shell\ndist/faiss_c.xcframework\n├── Info.plist\n├── ios-arm64_arm64e\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n├── ios-arm64_arm64e_x86_64-simulator\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n├── macos-arm64_arm64e_x86_64\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n├── tvos-arm64\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n├── tvos-x86_64-simulator\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n├── watchos-arm64_32_armv7k\n│   ├── Headers\n│   │   ├── AutoTune_c.h\n│   │   ├── Clustering_c.h\n│   │   ├── IndexBinary_c.h\n│   │   ├── IndexFlat_c.h\n│   │   ├── IndexIVFFlat_c.h\n│   │   ├── IndexIVF_c.h\n│   │   ├── IndexLSH_c.h\n│   │   ├── IndexPreTransform_c.h\n│   │   ├── IndexReplicas_c.h\n│   │   ├── IndexScalarQuantizer_c.h\n│   │   ├── IndexShards_c.h\n│   │   ├── Index_c.h\n│   │   ├── MetaIndexes_c.h\n│   │   ├── VectorTransform_c.h\n│   │   ├── clone_index_c.h\n│   │   ├── error_c.h\n│   │   ├── error_impl.h\n│   │   ├── faiss_c.h\n│   │   ├── impl\n│   │   │   └── AuxIndexStructures_c.h\n│   │   ├── index_factory_c.h\n│   │   ├── index_io_c.h\n│   │   ├── macros_impl.h\n│   │   └── utils\n│   │       └── distances_c.h\n│   └── libfaiss_c.a\n└── watchos-i386-simulator\n    ├── Headers\n    │   ├── AutoTune_c.h\n    │   ├── Clustering_c.h\n    │   ├── IndexBinary_c.h\n    │   ├── IndexFlat_c.h\n    │   ├── IndexIVFFlat_c.h\n    │   ├── IndexIVF_c.h\n    │   ├── IndexLSH_c.h\n    │   ├── IndexPreTransform_c.h\n    │   ├── IndexReplicas_c.h\n    │   ├── IndexScalarQuantizer_c.h\n    │   ├── IndexShards_c.h\n    │   ├── Index_c.h\n    │   ├── MetaIndexes_c.h\n    │   ├── VectorTransform_c.h\n    │   ├── clone_index_c.h\n    │   ├── error_c.h\n    │   ├── error_impl.h\n    │   ├── faiss_c.h\n    │   ├── impl\n    │   │   └── AuxIndexStructures_c.h\n    │   ├── index_factory_c.h\n    │   ├── index_io_c.h\n    │   ├── macros_impl.h\n    │   └── utils\n    │       └── distances_c.h\n    └── libfaiss_c.a\n\n29 directories, 169 files\n```\n\u003c/details\u003e\n\n\n\n## Distribution\n\nThis package is available using following package managers.\n\n### Swift Package Manager\n\n`./Pacakage.swift` points to remote release hosted on this GitHub repository.\nUse [these](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app) instructions to add this GitHub repository.\n\nSPM version points to both libraries `FAISS` in C++ and its C version `FAISS_C`.\n\n### Cocoapods\n\n`./FAISS.podspec` and `./FAISS_C.podspec` include all the specific details about the build.\n\nIn your `Podfile` you can add this library using this syntax:\n\n```ruby\npod 'FAISS', :git =\u003e 'https://github.com/DeveloperMindset-com/faiss-mobile.git', :tag =\u003e 'v1.9.0'\npod 'FAISS_C', :git =\u003e 'https://github.com/DeveloperMindset-com/faiss-mobile.git', :tag =\u003e 'v1.9.0'\n```\n\n### Carthage\n\nIn `Cartfile` add following:\n\n```ruby\nbinary \"https://raw.githubusercontent.com/DeveloperMindset-com/faiss-mobile/master/carthage/faiss-static-xcframework.json\" ~\u003e 1.9.0\n```\n\nSlightly different for a C version:\n\n```ruby\nbinary \"https://raw.githubusercontent.com/DeveloperMindset-com/faiss-mobile/master/carthage/faiss-c-static-xcframework.json\" ~\u003e 1.9.0\n```\n\n## Releases\n\nRelease management works using [gh](https://cli.github.com/manual/installation).\n\n```shell\nbrew install gh tree\n```\n\nTo release a draft:\n\n```shell\n./faiss.sh release\n```\n\n## Examples\n\n- `FAISS-Mac-Objective-C` [read more](/examples/FAISS-Mac-Objective-C/README.md).\n- `FAISS-Mac-Objective-C++` [read more](/examples/FAISS-Mac-Objective-C++/README.md).\n- `FAISS-iOS-Objective-C` [read more](/examples/FAISS-iOS-Objective-C/README.md).\n\n## Contributing\n\nContributions are welcome, feel free to submit an issue or open a pull request.\n\n## License\n\n[MIT](./LICENSE)\n\nCopyright © 2023-2025 [Eugene Hauptmann](http://twitter.com/eugenehp)\n\n## Legal\n\nFaiss is MIT-licensed, refer to the [LICENSE file](https://github.com/facebookresearch/faiss/blob/main/LICENSE) in the top level directory.\n\nCopyright © Meta Platforms, Inc. See the [Terms of Use](https://opensource.fb.com/legal/terms/) and [Privacy Policy](https://opensource.fb.com/legal/privacy/) for this project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopermindset-com%2Ffaiss-mobile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevelopermindset-com%2Ffaiss-mobile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevelopermindset-com%2Ffaiss-mobile/lists"}