Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from rust-lang:master #8

Open
wants to merge 549 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
549 commits
Select commit Hold shift + click to select a range
31c8452
regex-syntax-0.7.1
BurntSushi Apr 21, 2023
8a7cb64
deps: bump regex-syntax to 0.7.1
BurntSushi Apr 21, 2023
4e29fce
1.8.1
BurntSushi Apr 21, 2023
1872bdf
changelog: fix some typos
tshepang Apr 24, 2023
98be16a
syntax: fix typo
Kijewski May 14, 2023
a3978b2
fuzz: set a size limit
BurntSushi May 18, 2023
65ec58c
fuzz: drop size limit again
BurntSushi May 21, 2023
f9aec41
syntax: fix overflow for big counted repetitions
BurntSushi May 18, 2023
40cbe1d
changelog: 1.8.2
BurntSushi May 22, 2023
4f664b9
regex-syntax-0.7.2
BurntSushi May 22, 2023
709248c
deps: bump regex-syntax to 0.7.2
BurntSushi May 22, 2023
6fb1810
1.8.2
BurntSushi May 22, 2023
8afffab
fuzz: OSS-fuzz build scripts into this repo
nathaniel-brough May 22, 2023
d555d61
fuzz: don't run on big haystacks
BurntSushi May 24, 2023
40d883d
bug: fix complete literal optimization issue
BurntSushi May 25, 2023
710222d
changelog: 1.8.3
BurntSushi May 25, 2023
a1a9ebe
1.8.3
BurntSushi May 25, 2023
b2ca9c1
compile: make Regex::new(r"(?-u:\B)") fail again
BurntSushi Jun 5, 2023
407f6d3
changelog: 1.8.4
BurntSushi Jun 5, 2023
5a34a39
1.8.4
BurntSushi Jun 5, 2023
1d9ce15
api: add visit_concat_in method to the Visitor traits
plusvic Jun 23, 2023
c79c40a
impl: initial import of regex-automata
BurntSushi Apr 18, 2023
ff27ce0
impl: cut over to regex-automata
BurntSushi Apr 20, 2023
fd19324
scripts: remove 'frequencies' script
BurntSushi Apr 29, 2023
20f3e13
tests: drop old tests
BurntSushi Apr 29, 2023
146bf5c
bench: record last results with old benchmark suite
BurntSushi Apr 28, 2023
0328ba2
bench: move the old recordings to 'record' directory
BurntSushi Apr 29, 2023
78b865e
bench: remove the old harness
BurntSushi Apr 29, 2023
e063ab6
api: introduce new regex-lite crate
BurntSushi Apr 25, 2023
d29bf7b
fuzz: improve fuzz testing
BurntSushi Apr 30, 2023
64099ce
syntax: add new 'arbitrary' crate feature
BurntSushi May 4, 2023
5bec54a
syntax: optimize \B{10000}
BurntSushi May 18, 2023
01a8cf4
fuzz: use structured fuzzer input
5225225 May 4, 2023
805f4aa
fuzz: add size limit to regex building
BurntSushi May 4, 2023
8773579
fuzz: add syntactic structurally aware fuzzers
addisoncrump Mar 8, 2022
95a745e
regex-automata: fix bug in DFA quit behavior
BurntSushi May 4, 2023
72e9f20
fuzz: add regression test
BurntSushi May 4, 2023
ad9ba18
fuzz: add logging support to the fuzzer
BurntSushi May 18, 2023
cacdf37
fuzz: improve Arbitrary impl for Unicode classes
addisoncrump May 6, 2023
7636ba8
*: lots of polish
BurntSushi May 2, 2023
aa64e6d
changelog: 1.9.0
BurntSushi Jul 5, 2023
85d9118
changelog: small updates
BurntSushi Jul 5, 2023
5c10684
api: add TryFrom impls for Regex
nvzqz Jul 5, 2023
4f3a3b1
cargo: fix spacing
BurntSushi Jul 5, 2023
84dfe50
test: minimal polishing for regex-test crate
BurntSushi Jul 5, 2023
377f170
regex-syntax-0.7.3
BurntSushi Jul 5, 2023
572e857
deps: bump to regex-syntax 0.7.3
BurntSushi Jul 5, 2023
4f47b14
1.9.0
BurntSushi Jul 5, 2023
a40b1e5
regex-cli: make it publishable
BurntSushi Jul 5, 2023
53786ce
regex-cli-0.1.0
BurntSushi Jul 5, 2023
7c3463d
regex-cli: update compile-test and add recent measurements
BurntSushi Jul 5, 2023
54690c2
doc: fix typos
jqnatividad Jul 6, 2023
c51486d
fuzz: tweak limits
BurntSushi Jul 6, 2023
4e89cbf
automata/nfa/backtrack: fix memory usage
BurntSushi Jul 7, 2023
663fc54
changelog: 1.9.1
BurntSushi Jul 7, 2023
bd87969
regex-automata-0.3.1
BurntSushi Jul 7, 2023
4136a1b
deps: bump regex-automata to 0.3.1
BurntSushi Jul 7, 2023
a47e245
1.9.1
BurntSushi Jul 7, 2023
3616358
automata: add targeted inline(always) annotations
BurntSushi Jul 8, 2023
28e16fa
regex-automata-0.3.2
BurntSushi Jul 8, 2023
43ba6b8
syntax: improve literal extraction from certain repetitions
plusvic Jul 11, 2023
5e8eaf1
regex-syntax-0.7.4
BurntSushi Jul 11, 2023
bbb285b
regex-cli: update installation instructions
CosmicHorrorDev Jul 11, 2023
40585af
pikevm: fix anchored search bug
BurntSushi Jul 12, 2023
70c7f57
meta: fix anchored search bugs
BurntSushi Jul 12, 2023
961a882
regex-automata-0.3.3
BurntSushi Jul 12, 2023
48daadc
regex-automata/test: ignore some tests in 32-bit targets
BurntSushi Jul 12, 2023
855c5c4
fuzz: add all fuzzers to OSS-fuzz
BurntSushi Jul 13, 2023
e55e96c
doc: clarify ambiguous wording
BurntSushi Jul 21, 2023
7bc8f88
doc: update the old UTF-8 automata algorithm in comment
Licheam Jul 21, 2023
87f7f3f
automata/doc: fix typo when describing implicit unanchored prefix
Licheam Jul 23, 2023
9a8720f
automata: bump regex-syntax to latest version
BurntSushi Jul 28, 2023
a191024
regex-automata-0.3.4
BurntSushi Jul 28, 2023
e10c9d7
automata: add new 'WhichCaptures' config
BurntSushi Aug 3, 2023
a2ec566
automata: respect new 'which_captures' option
BurntSushi Aug 4, 2023
04b11b6
automata: add 'which_captures' knob to meta::Regex
BurntSushi Aug 4, 2023
3127e3b
regex: use new 'which_captures' knob for RegexSet
BurntSushi Aug 4, 2023
e29b915
automata: make PikeVM and backtracker work without capture states
BurntSushi Aug 4, 2023
930770b
regex: switch RegexSet to use WhichCaptures::None
BurntSushi Aug 4, 2023
e003cae
automata: add 'is_match' as its own path to meta regex internals
BurntSushi Aug 5, 2023
d93ddbe
automata: add internal HalfMatch APIs for NFA engines
BurntSushi Aug 5, 2023
4f3390c
changelog: 1.9.2
BurntSushi Aug 5, 2023
2f5bdb0
regex-automata-0.3.5
BurntSushi Aug 5, 2023
8c01708
deps: bump regex-automata to 0.3.5
BurntSushi Aug 5, 2023
bbf0b38
1.9.2
BurntSushi Aug 5, 2023
73f7889
automata: fix incorrect offsets reported by reverse inner optimization
BurntSushi Aug 5, 2023
3d21492
changelog: 1.9.3
BurntSushi Aug 5, 2023
c892d08
regex-automata-0.3.6
BurntSushi Aug 5, 2023
446ecd6
deps: bump regex-automata to 0.3.6
BurntSushi Aug 5, 2023
72f889e
1.9.3
BurntSushi Aug 5, 2023
431c4e4
doc: fix typo in captures_read
orlp Aug 7, 2023
10faa44
doc: fix a couple typos
Aug 23, 2023
81e328a
doc: fix typo in module-level doc
qianxyz Aug 24, 2023
7536e05
syntax: remove superfluous `borrow`
BurntSushi Aug 26, 2023
de03399
automata: fix incorrect use of Aho-Corasick's "standard" semantics
BurntSushi Aug 26, 2023
c788378
ci: drop mips, add powerpc and s390x
BurntSushi Aug 26, 2023
e008f83
changelog: 1.9.4
BurntSushi Aug 26, 2023
990979b
regex-syntax-0.7.5
BurntSushi Aug 26, 2023
89b452a
regex-automata-0.3.7
BurntSushi Aug 26, 2023
3f15f1c
deps: bump regex-syntax and regex-automata versions
BurntSushi Aug 26, 2023
f39ab4d
1.9.4
BurntSushi Aug 26, 2023
2637e11
ci: remove stale comment
BurntSushi Aug 26, 2023
329c6a3
ci: use dtolnay@master instead of @v1
BurntSushi Aug 26, 2023
15cdc64
cli: remove use of deprecated API
BurntSushi Aug 27, 2023
9a505a1
deps: bump to memchr 2.6
BurntSushi Aug 27, 2023
f578d74
automata: reduce regex contention somewhat
BurntSushi Aug 30, 2023
135e11b
changelog: 1.9.5
BurntSushi Sep 2, 2023
894dcbe
regex-automata-0.3.8
BurntSushi Sep 2, 2023
48e09a8
deps: bump regex-automata to 0.3.8
BurntSushi Sep 2, 2023
554469b
1.9.5
BurntSushi Sep 2, 2023
4aaf389
ci: pin to memchr 2.6.2 for MSRV CI job
BurntSushi Sep 3, 2023
cdc0dbd
readme: add section about performance and benchmarks
BurntSushi Sep 3, 2023
8275c1b
doc: fix a few typos
yykamei Sep 7, 2023
061ee81
readme: visually emphasize performance criteria difference
jqnatividad Sep 7, 2023
27a2538
automata: add some #[inline] annotations
BurntSushi Sep 28, 2023
aa4e4c7
automata: fix unintended panic in max_haystack_len
BurntSushi Sep 30, 2023
e467408
changelog: 1.9.6
BurntSushi Sep 30, 2023
03f00bd
regex-automata-0.3.9
BurntSushi Sep 30, 2023
3dda425
deps: bump regex-automata to 0.3.9
BurntSushi Sep 30, 2023
11b4443
1.9.6
BurntSushi Sep 30, 2023
1728445
syntax: fix Markdown for ASCII word class rendering
BurntSushi Oct 2, 2023
e598c4d
automata: clean up regression test
BurntSushi Oct 3, 2023
c5e9de9
automata: fix line wrapping
BurntSushi Oct 3, 2023
f15f3dc
automata: fix word boundary bug
BurntSushi Oct 3, 2023
b8c2066
automata/onepass: future proof bit packing
BurntSushi Oct 3, 2023
0ead128
syntax: make Ast the size of a pointer
BurntSushi Oct 3, 2023
31b4398
syntax: box each AstKind variant
BurntSushi Oct 3, 2023
17d9c1c
syntax: unbox Ast and remove AstKind
BurntSushi Oct 3, 2023
536cf70
syntax: remove guarantees in the HIR related to 'u' flag
BurntSushi Oct 6, 2023
7a7ce83
automata: rejigger DFA start state computation
BurntSushi Oct 6, 2023
201e055
automata: fix doc links
BurntSushi Oct 6, 2023
1c0bf94
automata: fix one outdated regex-cli test command
Licheam Jul 23, 2023
9a4e228
automata: fix more out-dated regex-cli commands
BurntSushi Oct 6, 2023
6d2b09e
syntax: optimize most of the IntervalSet routines
Licheam Jul 21, 2023
baf5b1e
syntax and automata: bump LookSet representation from u16 to u32
BurntSushi Oct 7, 2023
19e54d8
syntax/ast: add support for additional word boundary assertions
BurntSushi Oct 7, 2023
bbb98bb
syntax/hir: add new special word boundaries to HIR
BurntSushi Oct 7, 2023
21eb31e
automata: add special word boundaries to regex-automata
BurntSushi Oct 7, 2023
2743a7a
doc: explain the new word boundary assertions
BurntSushi Oct 8, 2023
dbc5e6d
lite: add special word boundaries to regex-lite
BurntSushi Oct 8, 2023
07dcf20
doc: remove HACKING document
BurntSushi Oct 8, 2023
f967147
changelog: add note about decreasing memory usage
BurntSushi Oct 8, 2023
ed80321
test: disable some tests on non-64-bit
BurntSushi Oct 8, 2023
f6559fe
syntax: fix panics that occur with non-sensical Ast values
BurntSushi Oct 8, 2023
674a952
changelog: start filling out the 1.10 release
BurntSushi Oct 8, 2023
356d3c9
automata: fix subtle DFA performance bug
BurntSushi Oct 9, 2023
8e13494
msrv: bump to Rust 1.65
BurntSushi Oct 9, 2023
0689353
fuzz: institute sane limits for arbitrary-based fuzzers
addisoncrump Jul 15, 2023
912479c
automata: remove 'is_quit_state' debug assertions
BurntSushi Oct 9, 2023
39d8b45
automata: fix invalid accelerators
BurntSushi Oct 9, 2023
fc9a11a
lite: reduce size limit to avoid timeouts
BurntSushi Oct 9, 2023
914198f
regex: reject large patterns when fuzzing
BurntSushi Oct 9, 2023
3feff9e
automata: improve sparse DFA validation
BurntSushi Oct 9, 2023
2c44e2a
fuzz: add regression test for AST roundtripping
BurntSushi Oct 9, 2023
aabbfe0
regex-lite-0.1.1
BurntSushi Oct 9, 2023
ea8f6c0
regex-syntax-0.8.0
BurntSushi Oct 9, 2023
68b7018
deps: bump regex-syntax to 0.8.0
BurntSushi Oct 9, 2023
dc0d79e
regex-automata-0.4.0
BurntSushi Oct 9, 2023
26d8e3a
deps: bump regex-automata to 0.4.0
BurntSushi Oct 9, 2023
2cbd342
1.10.0
BurntSushi Oct 9, 2023
951eebd
regex-cli-0.1.1
BurntSushi Oct 9, 2023
f01f71b
lite: add \< and \> to the syntax docs
BurntSushi Oct 9, 2023
452bc32
regex-lite-0.1.2
BurntSushi Oct 9, 2023
a2a1986
automata: fix sparse DFA state validation in no-std
BurntSushi Oct 9, 2023
dd04a57
regex-automata-0.4.1
BurntSushi Oct 9, 2023
f5b8cb4
lite: fix doctests on 32-bit
decathorpe Oct 10, 2023
6ec0a00
regex-lite-0.1.3
BurntSushi Oct 10, 2023
d5144b2
syntax: add regression tests for new bugs in internal set ops
BurntSushi Oct 11, 2023
f082244
syntax: revert interval set optimizations
BurntSushi Oct 11, 2023
b99cff0
regex-syntax-0.8.1
BurntSushi Oct 11, 2023
ef3e01b
syntax: add regression test for the errant HIR interval set optimizat…
BurntSushi Oct 12, 2023
69051b7
fuzz: add another HIR interval set regression
BurntSushi Oct 12, 2023
25ad29f
bench: add a redirect
BurntSushi Oct 13, 2023
cfd0ca2
automata/meta: force some prefilter inlining
BurntSushi Oct 12, 2023
04f5d7b
syntax: loosen ASCII compatible rules
BurntSushi Oct 12, 2023
8a8d599
automata/meta: tweak reverse suffix prefilter strategy
BurntSushi Oct 13, 2023
049d063
changelog: 1.10.1
BurntSushi Oct 14, 2023
1dbeee7
regex-syntax-0.8.2
BurntSushi Oct 14, 2023
ee01ec2
deps: bump regex-syntax to 0.8.2
BurntSushi Oct 14, 2023
488604d
regex-automata-0.4.2
BurntSushi Oct 14, 2023
d242ede
deps: bump regex-automata to 0.4.2
BurntSushi Oct 14, 2023
5dff4bd
1.10.1
BurntSushi Oct 14, 2023
466e42c
lite: fix stack overflow in NFA compiler
BurntSushi Oct 14, 2023
cd79881
regex-lite-0.1.4
BurntSushi Oct 14, 2023
4ae1472
tests: fix compilation of doctests on 32-bit architectures
decathorpe Oct 15, 2023
0086dec
lite: fix stack overflow test
BurntSushi Oct 14, 2023
e7bd19d
regex-lite-0.1.5
BurntSushi Oct 15, 2023
eb950f6
automata/meta: revert broadening of reverse suffix optimization
BurntSushi Oct 16, 2023
50fe7d1
changelog: 1.10.2
BurntSushi Oct 16, 2023
61242b1
regex-automata-0.4.3
BurntSushi Oct 16, 2023
1a54a82
deps: bump regex-automata to 0.4.3
BurntSushi Oct 16, 2023
5f1f1c8
1.10.2
BurntSushi Oct 16, 2023
20b5317
automata: fix panic in dense DFA deserialization
BurntSushi Oct 20, 2023
6b72eec
syntax: add Hir::literal example for `char`
BurntSushi Oct 25, 2023
662a8b9
cli: change --no-captures to --captures (all|implicit|none)
BurntSushi Nov 1, 2023
837fd85
regex-cli-0.2.0
BurntSushi Nov 1, 2023
4f5992f
doc: tweak `Captures` documentation
BurntSushi Dec 5, 2023
a3d5975
doc: fix link in Index<&str> impl docs
kloune Dec 20, 2023
dc0a9d2
ci: small clean-ups
BurntSushi Dec 29, 2023
027eebd
cargo: set 'default-features = false' for memchr and aho-corasick
BurntSushi Jan 10, 2024
fbd2537
safety: guard in Input::new against incorrect AsRef implementations
SkiFire13 Jan 19, 2024
1bc667d
changelog: 1.10.3
BurntSushi Jan 21, 2024
e7b5401
regex-automata-0.4.4
BurntSushi Jan 21, 2024
653bb59
deps: bump regex-automata to 0.4.4
BurntSushi Jan 21, 2024
0c09903
1.10.3
BurntSushi Jan 21, 2024
07ef7f1
automata: make additional prefileter metadata public
pascalkuthe Jan 25, 2024
d7f9347
regex-automata-0.4.5
BurntSushi Jan 25, 2024
10fe722
style: clean up some recent lint violations
BurntSushi Feb 26, 2024
9cf4a42
automata: fix bug where reverse NFA lacked an unanchored prefix
BurntSushi Mar 4, 2024
a5ae351
regex-automata-0.4.6
BurntSushi Mar 4, 2024
088d7f3
api: add Cow guarantee to replace API
BurntSushi Mar 23, 2024
aa2d8bd
1.10.4
BurntSushi Mar 23, 2024
f5d0b69
syntax: accept `{,n}` as an equivalent to `{0,n}`
plusvic Mar 26, 2024
d895bd9
regex-syntax-0.8.3
BurntSushi Mar 26, 2024
66a3bca
doc: remove repetitive words
JohnEndson Mar 28, 2024
4c565c8
doc: fix typos
careworry Apr 18, 2024
b12a276
syntax/utf8: avoid a spurious vector reallocation
lucab Apr 22, 2024
9c139f4
syntax: simplify `Hir::dot` constructors
Lucretiel May 6, 2024
023f1c9
lite: fix attribute warning about rustfmt
BurntSushi May 8, 2024
ddeb85e
cli/deps: update memmap2 to 0.9
BurntSushi May 8, 2024
ab4c8d1
doc: fix duplicate phrasing typo
purrden Jun 2, 2024
1f9f9cc
bytes: escape invalid UTF-8 bytes in debug output for Match
notJoon Jun 9, 2024
1430b65
changelog: 1.10.4
BurntSushi Jun 9, 2024
4757b5f
regex-syntax-0.8.4
BurntSushi Jun 9, 2024
68c4f0b
regex-automata-0.4.7
BurntSushi Jun 9, 2024
377463b
changelog: 1.10.4 and 1.10.5
BurntSushi Jun 9, 2024
0718fc5
1.10.5
BurntSushi Jun 9, 2024
1288b83
regex-lite-0.1.6
BurntSushi Jun 9, 2024
c2f9ca4
regex-test: bump toml dependency
BurntSushi Jun 9, 2024
c4c76a1
regex-test-0.1.1
BurntSushi Jun 9, 2024
8856fe3
regex-cli-0.2.1
BurntSushi Jun 9, 2024
2970d29
unstable: fit `Pattern` trait implementation
mischnic Aug 2, 2024
76f2d30
changelog: 1.10.6
BurntSushi Aug 2, 2024
ab88aa5
1.10.6
BurntSushi Aug 2, 2024
92efe4a
automata: add explicit lifetime annotation
BurntSushi Sep 29, 2024
d3d3ff7
cli: remove some dead code
BurntSushi Sep 29, 2024
b790aa5
api: add SetMatches::matched_all
tmccombs Sep 29, 2024
7691e49
cli: include \w, \s and \d in Unicode data table generation
BurntSushi Sep 29, 2024
9239e7e
data: update to UCD 16
BurntSushi Sep 29, 2024
1533257
changelog: 1.11.0
BurntSushi Sep 29, 2024
cba0fbc
regex-syntax-0.8.5
BurntSushi Sep 29, 2024
4bb1e3d
deps: bump regex-syntax
BurntSushi Sep 29, 2024
58e16f5
regex-automata-0.4.8
BurntSushi Sep 29, 2024
9e17e56
deps: bump regex-automata
BurntSushi Sep 29, 2024
bcbe403
1.11.0
BurntSushi Sep 29, 2024
991ba88
unstable: fix `Pattern` trait implementation
BurntSushi Oct 24, 2024
80df54e
changelog: 1.11.1
BurntSushi Oct 24, 2024
9870c06
1.11.1
BurntSushi Oct 24, 2024
225c94c
automata/dfa: add `BuildError::is_size_limit_exceeded`
BurntSushi Nov 11, 2024
1a069b9
regex-automata-0.4.9
BurntSushi Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: An issue with the current behavior of the regex crate.
title: ''
labels: ''
assignees: ''
---


#### What version of regex are you using?

If it isn't the latest version, then please upgrade and check whether the bug
is still present.

#### Describe the bug at a high level.

Give a brief description of the actual problem you're observing.

#### What are the steps to reproduce the behavior?

This section should almost always provide a COMPLETE Rust program that others
can compile and run with Cargo. It should be as small as possible.

If providing a small and simple reproduction is not easy, please explain why
and the maintainers will help you figure out next steps.

#### What is the actual behavior?

If you provide a Rust program in the previous section, then this should be the
output of that program.

#### What is the expected behavior?

What do you expect the output to be?
7 changes: 7 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
blank_issues_enabled: true
contact_links:
- name: Ask a question
about: |
You've come to seek help or want to discuss something related to the
regex crate.
url: https://github.com/rust-lang/regex/discussions/new
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest a new feature
title: ''
labels: ''
assignees: ''
---


#### Describe your feature request

Please describe the behavior you want and the motivation. Please also provide
examples of how the new feature would be used if your feature request were
added.

The best kind of feature request is one that proposes a concrete change to the
API along with a sketch of the changes to the public API documentation.

If you're not sure what to write here, then try imagining what the ideal
documentation of your new feature would look like. Then try to write it.
240 changes: 240 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,240 @@
name: ci
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '00 01 * * *'

# The section is needed to drop write-all permissions that are granted on
# `schedule` event. By specifying any permission explicitly all others are set
# to none. By using the principle of least privilege the damage a compromised
# workflow can do (because of an injection or compromised third party tool or
# action) is restricted. Currently the worklow doesn't need any additional
# permission except for pulling the code. Adding labels to issues, commenting
# on pull-requests, etc. may need additional permissions:
#
# Syntax for this section:
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
#
# Reference for how to assign permissions on a job-by-job basis:
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
#
# Reference for available permissions that we can enable if needed:
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token
permissions:
# to fetch code (actions/checkout)
contents: read

jobs:
# This job does our basic build+test for supported platforms.
test:
env:
# For some builds, we use cross to test on 32-bit and big-endian
# systems.
CARGO: cargo
# When CARGO is set to CROSS, TARGET is set to `--target matrix.target`.
# Note that we only use cross on Linux, so setting a target on a
# different OS will just use normal cargo.
TARGET:
# Bump this as appropriate. We pin to a version to make sure CI
# continues to work as cross releases in the past have broken things
# in subtle ways.
CROSS_VERSION: v0.2.5
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- build: stable
os: ubuntu-latest
rust: stable
- build: stable-32
os: ubuntu-latest
rust: stable
target: i686-unknown-linux-gnu
- build: stable-powerpc64
os: ubuntu-latest
rust: stable
target: powerpc64-unknown-linux-gnu
- build: stable-s390x
os: ubuntu-latest
rust: stable
target: s390x-unknown-linux-gnu
- build: beta
os: ubuntu-latest
rust: beta
- build: nightly
os: ubuntu-latest
rust: nightly
- build: macos
os: macos-latest
rust: stable
- build: win-msvc
os: windows-latest
rust: stable
- build: win-gnu
os: windows-latest
rust: stable-x86_64-gnu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Install and configure Cross
if: matrix.os == 'ubuntu-latest' && matrix.target != ''
run: |
# In the past, new releases of 'cross' have broken CI. So for now, we
# pin it. We also use their pre-compiled binary releases because cross
# has over 100 dependencies and takes a bit to compile.
dir="$RUNNER_TEMP/cross-download"
mkdir "$dir"
echo "$dir" >> $GITHUB_PATH
cd "$dir"
curl -LO "https://github.com/cross-rs/cross/releases/download/$CROSS_VERSION/cross-x86_64-unknown-linux-musl.tar.gz"
tar xf cross-x86_64-unknown-linux-musl.tar.gz
echo "CARGO=cross" >> $GITHUB_ENV
echo "TARGET=--target ${{ matrix.target }}" >> $GITHUB_ENV
- name: Show command used for Cargo
run: |
echo "cargo command is: $CARGO"
echo "target flag is: $TARGET"
- name: Show CPU info for debugging
if: matrix.os == 'ubuntu-latest'
run: lscpu
- name: Basic build
run: ${{ env.CARGO }} build --verbose $TARGET
- name: Build docs
run: ${{ env.CARGO }} doc --verbose $TARGET
- name: Run subset of tests
run: ${{ env.CARGO }} test --verbose --test integration $TARGET
- name: Build regex-syntax docs
run: ${{ env.CARGO }} doc --verbose --manifest-path regex-syntax/Cargo.toml $TARGET
- name: Run subset of regex-syntax tests
run: ${{ env.CARGO }} test --verbose --manifest-path regex-syntax/Cargo.toml $TARGET
- name: Build regex-automata docs
run: ${{ env.CARGO }} doc --verbose --manifest-path regex-automata/Cargo.toml $TARGET
- name: Run subset of regex-automata tests
if: matrix.build != 'win-gnu' # Just horrifically slow.
run: ${{ env.CARGO }} test --verbose --manifest-path regex-automata/Cargo.toml $TARGET
- name: Run regex-lite tests
run: ${{ env.CARGO }} test --verbose --manifest-path regex-lite/Cargo.toml $TARGET
- name: Run regex-cli tests
run: ${{ env.CARGO }} test --verbose --manifest-path regex-cli/Cargo.toml $TARGET

# This job runs a stripped down version of CI to test the MSRV. The specific
# reason for doing this is that the regex crate's dev-dependencies tend to
# evolve more quickly. There isn't as tight of a control on them because,
# well, they're only used in tests and their MSRV doesn't matter as much.
#
# It is a bit unfortunate that our MSRV test is basically just "build it"
# and pass if that works. But usually MSRV is broken by compilation problems
# and not runtime behavior. So this is in practice good enough.
msrv:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.65.0
- name: Basic build
run: cargo build --verbose
- name: Build docs
run: cargo doc --verbose

# This job runs many more tests for the regex crate proper. Basically,
# it repeats the same test suite for a bunch of different crate feature
# combinations. There are so many features that exhaustive testing isn't
# really possible, but we cover as much as is feasible.
#
# If there is a feature combo that should be tested but isn't, you'll want to
# add it to the appropriate 'test' script in this repo.
testfull-regex:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Run full test suite
run: ./test

# Same as above, but for regex-automata, which has even more crate features!
testfull-regex-automata:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Run full test suite
run: ./regex-automata/test

# Same as above, but for regex-syntax.
testfull-regex-syntax:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Run full test suite
run: ./regex-syntax/test

# Same as above, but for regex-capi.
testfull-regex-capi:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- name: Run full test suite
run: ./regex-capi/test

# Runs miri on regex-automata's test suite. This doesn't quite cover
# everything. Many tests are disabled when building with miri because of
# how slow miri runs. But it still gives us decent coverage.
miri-regex-automata:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
# We use nightly here so that we can use miri I guess?
# It caught me by surprise that miri seems to only be
# available on nightly.
toolchain: nightly
components: miri
- name: Run full test suite
run: cargo miri test --manifest-path regex-automata/Cargo.toml

# Tests that everything is formatted correctly.
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
29 changes: 0 additions & 29 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .vim/coc-settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"rust-analyzer.linkedProjects": [
"fuzz/Cargo.toml",
"Cargo.toml"
]
}
Loading