SPVM::Resource::RE2 - The Resource of Google/RE2
SPVM::Resource::RE2 is a resource of SPVM for the Google/RE2.
MyClass.config:
my $config = SPVM::Builder::Config->new_cpp17(file => __FILE__); my $resource = $config->use_resource('Resource::RE2'); if ($^O eq 'MSWin32') { $config->add_static_lib('stdc++', 'winpthread', 'gcc'); } else { $config->add_lib('stdc++'); } $config->add_ldflag('-pthread'); $config;
MyClass.cpp:
#include "re2/re2.h" extern "C" { int32_t SPVM__MyClass__test(SPVM_ENV* env, SPVM_VALUE* stack) { int32_t match = RE2::PartialMatch("abcde", "bcd"); return 0; } }
Google/RE2
Google/RE2 2023-02-01
C++
C++17
Windows:
stdc++ (The static link is preffered)
winpthread (The static link is preffered)
gcc (The static link is preffered)
Unix/Linux/Mac:
stdc++
-pthread
util/logging.h
util/test.h
util/mix.h
util/util.h
util/mutex.h
util/strutil.h
util/malloc_counter.h
util/pcre.h
util/flags.h
util/utf.h
util/benchmark.h
re2/prefilter.h
re2/re2.h
re2/sparse_set.h
re2/unicode_casefold.h
re2/filtered_re2.h
re2/pod_array.h
re2/stringpiece.h
re2/prefilter_tree.h
re2/bitmap256.h
re2/sparse_array.h
re2/set.h
re2/regexp.h
re2/testing/regexp_generator.h
re2/testing/tester.h
re2/testing/exhaustive_tester.h
re2/testing/string_generator.h
re2/walker-inl.h
re2/fuzzing/compiler-rt/include/fuzzer/FuzzedDataProvider.h
re2/unicode_groups.h
re2/prog.h
re2/dfa.cc
re2/prefilter_tree.cc
re2/stringpiece.cc
re2/bitstate.cc
re2/unicode_casefold.cc
re2/simplify.cc
re2/filtered_re2.cc
re2/onepass.cc
re2/bitmap256.cc
re2/re2.cc
re2/parse.cc
re2/set.cc
re2/prog.cc
re2/prefilter.cc
re2/mimics_pcre.cc
re2/regexp.cc
re2/nfa.cc
re2/tostring.cc
re2/perl_groups.cc
re2/unicode_groups.cc
re2/compile.cc
util/strutil.cc
util/rune.cc
util/pcre.cc
-Wno-unused-parameter
-Wno-missing-field-initializers
mkdir -p original.tmp git clone https://github.com/google/re2.git original.tmp/re2 git -C original.tmp/re2 checkout tags/2023-02-01 -b branch_2023-02-01 git -C original.tmp/re2 branch
All files of Google/RE2 is copied by the following steps into the src directory.
src
rsync -av --exclude='*.h' original.tmp/re2/ lib/SPVM/Resource/RE2.native/src/
The source files that is used in the config are extracted by the following command.
find lib/SPVM/Resource/RE2.native/src/* | perl -p -e 's|^\Qlib/SPVM/Resource/RE2.native/src/||' | grep -P '(util|re2)/\w+\.cc$' | grep -v -P 'util/(test|benchmark|fuzz)\.cc$'
Header files of Google/RE2 is copied into the include directory by the following way.
include
rsync -av --include='*/' --include='*.h' --exclude='*' original.tmp/re2/ lib/SPVM/Resource/RE2.native/include/
SPVM::Resource::RE2 - Github
YuKi Kimoto kimoto.yuki@gmail.com
kimoto.yuki@gmail.com
Copyright (c) 2023 Yuki Kimoto
MIT License
To install SPVM::Resource::RE2, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM::Resource::RE2
CPAN shell
perl -MCPAN -e shell install SPVM::Resource::RE2
For more information on module installation, please visit the detailed CPAN module installation guide.