{"id":33936932,"url":"https://github.com/rust-onig/rust-onig","last_synced_at":"2026-01-11T17:03:31.854Z","repository":{"id":41463442,"uuid":"41687796","full_name":"rust-onig/rust-onig","owner":"rust-onig","description":"Rust bindings for the Oniguruma regex library","archived":false,"fork":false,"pushed_at":"2025-12-19T11:32:49.000Z","size":3098,"stargazers_count":130,"open_issues_count":12,"forks_count":51,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-05T02:26:58.879Z","etag":null,"topics":["hacktoberfest","oniguruma","oniguruma-regex-library","regex","rust","rust-bindings"],"latest_commit_sha":null,"homepage":"https://docs.rs/crate/onig/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rust-onig.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-08-31T16:40:00.000Z","updated_at":"2025-12-13T22:51:45.000Z","dependencies_parsed_at":"2024-06-18T18:39:50.388Z","dependency_job_id":"937ab7c9-d2d8-4103-bcd0-f956ed92b397","html_url":"https://github.com/rust-onig/rust-onig","commit_stats":{"total_commits":357,"total_committers":31,"mean_commits":"11.516129032258064","dds":"0.33333333333333337","last_synced_commit":"76bc1d29651bd17c7d5ecea9266bd2e0e83cb2e0"},"previous_names":["iwillspeak/rust-onig"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/rust-onig/rust-onig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-onig%2Frust-onig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-onig%2Frust-onig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-onig%2Frust-onig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-onig%2Frust-onig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rust-onig","download_url":"https://codeload.github.com/rust-onig/rust-onig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rust-onig%2Frust-onig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28314262,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["hacktoberfest","oniguruma","oniguruma-regex-library","regex","rust","rust-bindings"],"created_at":"2025-12-12T14:37:37.453Z","updated_at":"2026-01-11T17:03:31.849Z","avatar_url":"https://github.com/rust-onig.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Onig\n\n[![Cargo](https://img.shields.io/crates/v/onig.svg)](\nhttps://crates.io/crates/onig)\n[![Documentation](https://docs.rs/onig/badge.svg)](\nhttps://docs.rs/onig)\n![CI](https://github.com/rust-onig/rust-onig/workflows/CI/badge.svg)\n[![CI Windows](https://github.com/rust-onig/rust-onig/actions/workflows/ci-win.yml/badge.svg)](https://github.com/rust-onig/rust-onig/actions/workflows/ci-win.yml)\n[![dependency status](https://deps.rs/crate/onig/6.4.0/status.svg)](https://deps.rs/crate/onig/6.4.0)\n\nRust bindings for the [Oniguruma regex library][Onig_wiki], a powerful and mature regular expression library with support for a wide range of character sets and language syntaxes. Oniguruma is written in C. This repository provides two crates: `onig-sys` which provides the raw Rust FFI bindings, and `onig`, which provides a safe Rust wrapper around them.\n\n## Documentation\n\nCheck out the [module documentation][onig_crate_doc] to find out all the features that are available. To see some example usage of this crate take a look a the [examples folder][examples_folder]. The examples can be run from the command line with `cargo run --example \u003cexamplename\u003e`.\n\n## Getting Started\n\nAdd the following to your `Cargo.toml` file:\n\n```toml\n[dependencies]\nonig = \"6\"\n```\n\nAdd the following extern to your crate root if you are not using edition 2018:\n\n```rust\nextern crate onig;\n```\n\nYou can compile simple regular expressions with [`Regex::new`][regex_new], check if the pattern matches an entire `\u0026str` with [`Regex::is_match`][regex_is_match] and find matches within a `\u0026str` with [`Regex::find`][regex_find]. The `onig` crate also supplies more powerful versions of these methods which expose the wide range of options Oniguruma provides.\n\n```rust\nuse onig::*;\n\nlet regex = Regex::new(\"e(l+)\").unwrap();\nfor (i, pos) in regex.captures(\"hello\").unwrap().iter_pos().enumerate() {\n    match pos {\n         Some((beg, end)) =\u003e\n             println!(\"Group {} captured in position {}:{}\", i, beg, end),\n         None =\u003e\n             println!(\"Group {} is not captured\", i)\n    }\n}\n```\n\n## Linking\n\nIf a version of Oniguruma can be found by `pkg-config` then that will be used. If not then Oniguruma will be compiled from source and linked to the `onig-sys` crate.\n\nBy default `rust-onig` will be statically linked to `libonig`. If you would rather that dynamic linking is used then the environment variables `RUSTONIG_STATIC_LIBONIG` and `RUSTONIG_DYNAMIC_LIBONIG` can be set. On *nix:\n\n    $ RUSTONIG_DYNAMIC_LIBONIG=1 cargo build\n\nOr Windows:\n\n    \u003e set RUSTONIG_DYNAMIC_LIBONIG=1\n    \u003e cargo build\n\n## Build errors caused by libclang/llvm\n\nBy default `onig` uses `bindgen` to generate bindings for libonig. If you plan to only use the bundled version of libonig, you can make compilation faster and more reliable by disabling the default `generate` feature:\n\n```toml\n[dependencies]\nonig = { version = \"6\", default-features = false }\n```\n\n## Debugging\n\nSometimes it's useful to debug how Oniguruma parses, compiles, optimizes or\nexecutes a particular pattern.\n\nWhen activating the `print-debug` feature for this crate, Oniguruma is compiled\nwith debugging. Note that it's a compile-time setting, so you also need to make\n`rust-onig` not use the system Oniguruma by using `RUSTONIG_SYSTEM_LIBONIG`.\n\nWith all that combined, here's an example command to debug the pattern `a|b`:\n\n    RUSTONIG_SYSTEM_LIBONIG=0 cargo run --features print-debug --example capturedump 'a|b'\n\n## Supported Rust Versions\n\nRust Onig supports Rust 1.70.0 or later (2021 edition) for Windows, Linux, and\nmacOS. If the minimum supported rust version (MSRV) is changed then the minor\nversion number will be increased. That is v6.5.x should always compile\nwith the same version of the compiler.\n\n## Rust-Onig is Open Source\n\nThe contents of this repository are distributed under the MIT license. See\n[LICENSE](LICENSE.md) for more details. If you'd like to contribute take a look\nat our open [easy issues][easy_issues].\n\n [Onig_wiki]: https://en.wikipedia.org/wiki/Oniguruma\n [onig_crate_doc]: https://docs.rs/onig/\n [examples_folder]: https://github.com/rust-onig/rust-onig/tree/main/onig/examples\n [regex_new]: https://docs.rs/onig/6.4.0/onig/struct.Regex.html#method.new\n [regex_is_match]: https://docs.rs/onig/6.4.0/onig/struct.Regex.html#method.is_match\n [regex_find]: https://docs.rs/onig/6.4.0/onig/struct.Regex.html#method.find\n [easy_issues]: https://github.com/rust-onig/rust-onig/issues?q=is%3Aopen+is%3Aissue+label%3AE-Easy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-onig%2Frust-onig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frust-onig%2Frust-onig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frust-onig%2Frust-onig/lists"}