5 Commits

Author SHA1 Message Date
Andrew Gallant
fc3e6aa19a
license: remove license headers from files
The Rust project determined these were unnecessary a while back[1,2,3]
and we follow suite.

[1] - 0565653eec
[2] - https://github.com/rust-lang/rust/pull/43498
[3] - https://github.com/rust-lang/rust/pull/57108
2019-08-03 14:47:45 -04:00
Andrew Gallant
2f1e5b0e10 deps: setup workspace
There are a few sub-crates in this repository, so sharing a target
directory makes sense.
2017-12-30 15:37:41 -05:00
Andrew Gallant
75ae79b125 Bump dep versions and release 0.2.1.
Specifically, we bump the dep on aho-corasick to 0.6.0, which includes a
dep on memchr 1.0.0. This avoids compiling two distinct versions of
memchr into every regex build.

Fixes #324
2017-01-02 18:39:02 -05:00
Andrew Gallant
998e945467 Fix nits from so_you_like_donuts on reddit. 2016-05-04 07:17:11 -04:00
Andrew Gallant
97d374b680 Add rure, a C API.
This commit contains a new sub-crate called `regex-capi` which provides
a C library called `rure`.

A new `RegexBuilder` type was also added to the Rust API proper, which
permits both users of C and Rust to tweak various knobs on a `Regex`.
This fixes issue #166.

Since it's likely that this API will be used to provide bindings to
other languages, I've created bindings to Go as a proof of concept:
https://github.com/BurntSushi/rure-go --- to my knowledge, the wrapper
has as little overhead as it can. It was in particular important for the
C library to not store any pointers provided by the caller, as this can
be problematic in languages with managed runtimes and a moving GC.

The C API doesn't expose `RegexSet` and a few other convenience functions
such as splitting or replacing. That can be future work.

Note that the regex-capi crate requires Rust 1.9, since it uses
`panic::catch_unwind`.

This also includes tests of basic API functionality and a commented
example. Both should now run as part of CI.
2016-04-29 10:42:11 -04:00