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

Enable SIMD #34

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea
build
target
go.work.sum
2 changes: 1 addition & 1 deletion buildtools/aho-corasick/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ RUN apk add --no-cache binaryen && rustup target add wasm32-wasi

ADD buildtools/aho-corasick /aho-corasick
WORKDIR /aho-corasick
ENV RUSTFLAGS "-C target-feature=-crt-static -C link-args=--export=malloc -C link-args=--export=free"
ENV RUSTFLAGS "-C target-feature=-crt-static -Ctarget-feature=+simd128 -C link-args=--export=malloc -C link-args=--export=free"
RUN cargo build --release --target wasm32-wasi

RUN wasm-opt -o target/wasm32-wasi/release/aho_corasick.wasm --flatten --rereloop --converge -O3 target/wasm32-wasi/release/aho_corasick.wasm
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ go 1.20
require (
github.com/magefile/mage v1.14.0
github.com/petar-dambovaliev/aho-corasick v0.0.0-20211021192214-5ab2d9280aa9
github.com/tetratelabs/wazero v1.7.1
github.com/tetratelabs/wazero v1.7.2-0.20240506055917-3df6408adf73
)
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ github.com/petar-dambovaliev/aho-corasick v0.0.0-20211021192214-5ab2d9280aa9 h1:
github.com/petar-dambovaliev/aho-corasick v0.0.0-20211021192214-5ab2d9280aa9/go.mod h1:EHPiTAKtiFmrMldLUNswFwfZ2eJIYBHktdaUTZxYWRw=
github.com/tetratelabs/wazero v1.7.1 h1:QtSfd6KLc41DIMpDYlJdoMc6k7QTN246DM2+n2Y/Dx8=
github.com/tetratelabs/wazero v1.7.1/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
github.com/tetratelabs/wazero v1.7.2-0.20240506055917-3df6408adf73 h1:qPNAINWhyTSZ7p0KIwQvSx9hnL8AyU3s8d+MGDZvIpg=
github.com/tetratelabs/wazero v1.7.2-0.20240506055917-3df6408adf73/go.mod h1:ytl6Zuh20R/eROuyDaGPkp82O9C/DJfXAwJfQ3X6/7Y=
12 changes: 0 additions & 12 deletions go.work.sum

This file was deleted.

Binary file modified wasm/aho_corasick.wasm
Binary file not shown.
Binary file modified wasm/libaho_corasick.a
Binary file not shown.
Loading