{"id":20764187,"url":"https://github.com/zitsen/unqlite-sys.rs","last_synced_at":"2025-04-30T08:11:58.766Z","repository":{"id":57671139,"uuid":"48357989","full_name":"zitsen/unqlite-sys.rs","owner":"zitsen","description":"Rust bindings for UnQlite library.","archived":false,"fork":false,"pushed_at":"2017-06-12T05:24:22.000Z","size":1509,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T08:11:53.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zitsen.github.io/unqlite-sys.rs","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zitsen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-21T07:42:35.000Z","updated_at":"2022-12-08T03:22:46.000Z","dependencies_parsed_at":"2022-09-26T20:41:18.187Z","dependency_job_id":null,"html_url":"https://github.com/zitsen/unqlite-sys.rs","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitsen%2Funqlite-sys.rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitsen%2Funqlite-sys.rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitsen%2Funqlite-sys.rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zitsen%2Funqlite-sys.rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zitsen","download_url":"https://codeload.github.com/zitsen/unqlite-sys.rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251666336,"owners_count":21624295,"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","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":[],"created_at":"2024-11-17T10:49:07.058Z","updated_at":"2025-04-30T08:11:58.746Z","avatar_url":"https://github.com/zitsen.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# unqlite-sys\n\nRust bindings for [UnQlite][] library.\n\n[![travis-badge][]][travis] [![release-badge][]][cargo] [![downloads]][cargo]\n[![docs-badge][]][docs] [![license-badge][]][cargo]\n\nAs its official site says, **UnQlite** is\n\u003e An Embeddable NoSQL Database Engine.\n\nPlease see [UnQLite C/C++ API Reference][] for full API documents.\n\n## Usage\n\nThis crate provides several features for [UnQlite compile-time\noptions][apidoc-compile]:\n\n* **enable-threads**: equivalent to `UNQLITE_ENABLE_THREADS` enabled.\n* **jx9-disable-builtin-func**: equivalent to `JX9_DISABLE_BUILTIN_FUNC` enabled.\n* **jx9-enable-math-fuc**: equivalent to `JX9_ENABLE_MATH_FUNC` enabled.\n* **jx9-disable-disk-io**: equivalent to `JX9_DISABLE_DISK_IO` enabled.\n* **enable-jx9-hash-io**: equivalent to `UNQLITE_ENABLE_JX9_HASH_IO` enabled.\n\nTo provide the same default behavior as original C does, non of the features\nis enabled by default. When you want some features, such as **enable-threads**,\njust config in `Cargo.toml`:\n\n```toml\n[dependencies.unqlite-sys]\nversion = \"0.3.0\"\nfeatures = [ \"enable-threads\" ]\n```\n\nFor multiple features just add them in toml `features` array.\n\n## Threadsafe\n\nNote that even \"enable-threads\" is featured in your crate, it's not meant\nthat your code is threadsafe.\n\n\u003e When UnQLite has been compiled with threading support then the threading mode can be altered\nat run-time using the unqlite_lib_config() interface together with one of these verbs:\n\n  \u003e\u003e UNQLITE_LIB_CONFIG_THREAD_LEVEL_SINGLE\n\n  \u003e\u003e UNQLITE_LIB_CONFIG_THREAD_LEVEL_MULTI\n\n\u003e Platforms others than Windows and UNIX systems must install their own mutex subsystem via\nunqlite_lib_config() with a configuration verb set to UNQLITE_LIB_CONFIG_USER_MUTEX. Otherwise\nthe library is not threadsafe.\n\u003e\n\u003e Note that you must link UnQLite with the POSIX threads library under UNIX systems (i.e:\n-lpthread).\n\nTo use in multithread cases, that is **threadsafe**, you may use like this:\n\n```rust\nextern crate unqlite_sys as ffi;\nuse ffi::constants as ffic;\n\nfn main() {\n    unsafe {\n        ffi::unqlite_lib_config(ffic::UNQLITE_LIB_CONFIG_THREAD_LEVEL_MULTI);\n        ffi::unqlite_lib_init();\n        assert_eq!(ffi::unqlite_lib_is_threadsafe(), 1);\n\n        // do stuff ...\n\n    }\n}\n```\n\n[UnQlite]: http://unqlite.org\n[UnQLite C/C++ API Reference]: http://unqlite.org/c_api.html\n[travis-badge]: https://img.shields.io/travis/zitsen/unqlite-sys.rs.svg?style=flat-square\n[travis]: https://travis-ci.org/zitsen/unqlite-sys.rs\n[release-badge]: https://img.shields.io/crates/v/unqlite-sys.svg?style=flat-square\n[downloads]: https://img.shields.io/crates/d/unqlite-sys.svg?style=flat-square\n[cargo]: https://crates.io/crates/unqlite-sys\n[docs-badge]: https://img.shields.io/badge/API-docs-blue.svg?style=flat-square\n[docs]: https://zitsen.github.io/unqlite-sys.rs\n[license-badge]: https://img.shields.io/crates/l/unqlite-sys.svg?style=flat-square\n[apidoc-compile]: http://unqlite.org/c_api_const.html#compile_time\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitsen%2Funqlite-sys.rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzitsen%2Funqlite-sys.rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzitsen%2Funqlite-sys.rs/lists"}