gecko-dev/third_party/rust/rure/examples/compile
Nika Layzell 93a9c67b35 Bug 1794001 - Part 1: Import the rure crate for rust regex ffi, r=xpcom-reviewers,supply-chain-reviewers,kmag
While we already have an in-tree `regex-ffi` crate which provides basic
access to regex functionality for use in FormAutofillNative, the `regex`
crate itself provides and maintains its own c api as the `rure` crate.
This patch vendors in `rure` to allow us to use the more-fully-featured
official ffi.

Differential Revision: https://phabricator.services.mozilla.com/D158873
2022-10-13 21:46:54 +00:00

9 lines
349 B
Bash
Executable file

#!/bin/sh
set -ex
# N.B. Add `--release` flag to `cargo build` to make the example run faster.
cargo build --manifest-path ../Cargo.toml
gcc -O3 -DDEBUG -o iter iter.c -ansi -Wall -I../include -L../../target/debug -lrure
# If you're using librure.a, then you'll need to link other stuff:
# -lutil -ldl -lpthread -lgcc_s -lc -lm -lrt -lutil -lrure