Skip to content

Commit

Permalink
feat: portable binaries
Browse files Browse the repository at this point in the history
- SIMD capabilities are now discovered at runtime,
allowing us to distribute one binary per target.
- Requirements for SIMD are now more granular,
allowing weaker CPUs to still get some of the acceleration:
  - Base SIMD is either SSE2, SSSE3, or AVX2.
  - Structural classification works on SSSE3 and above.
  - Quote classification works if `pclmulqdq` is available.
  - Depth classification works if `popcnt` is available.
- To counteract the increased binary size debug info is no longer
included in distributed binaries.
- Codegen for distributed binaries is improved with fat LTO and setting
codegen units to 1.
- SIMD capabilities are listed with `rq --version`.

#231
  • Loading branch information
V0ldek committed Sep 10, 2023
1 parent 51129e4 commit adaaf0b
Show file tree
Hide file tree
Showing 53 changed files with 1,784 additions and 1,318 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build]
rustflags = ["-C", "target-cpu=native", "-C", "link-arg=-fuse-ld=lld"]
rustflags = ["-C", "link-arg=-fuse-ld=lld"]

[alias]
rsontest = "hack test -q --feature-powerset --skip default --skip default-optimizations"
rsontest = "hack test -q --feature-powerset --skip default"

[env]
RUST_BACKTRACE = "1"
4 changes: 2 additions & 2 deletions .github/workflows/book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
toolchain: stable
target: x86_64-unknown-linux-gnu
- name: Override toolchain
run: rustup override set stable
run: rustup override set stable
- name: Cache restore (Cargo)
id: cache-restore-cargo
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
Expand All @@ -63,7 +63,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-pages-artifact@a753861a5debcf57bf8b404356158c8e1e33150c # v2.0.0
with:
path: './book/wwwroot'
path: "./book/wwwroot"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@9dbe3824824f8a1377b8e298bafde1a50ede43e5 # v2.0.4
24 changes: 12 additions & 12 deletions .github/workflows/closed-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
permissions:
issues: write
steps:
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
with:
action: remove
issue-number: ${{ github.event.issue.number }}
label-id: 'LA_kwDOHodxeM8AAAABA8dlvA'
token: ${{ secrets.GITHUB_TOKEN }}
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
with:
action: remove
issue-number: ${{ github.event.issue.number }}
label-id: 'LA_kwDOHodxeM8AAAABA8dh3A'
token: ${{ secrets.GITHUB_TOKEN }}
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
with:
action: remove
issue-number: ${{ github.event.issue.number }}
label-id: "LA_kwDOHodxeM8AAAABA8dlvA"
token: ${{ secrets.GITHUB_TOKEN }}
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
with:
action: remove
issue-number: ${{ github.event.issue.number }}
label-id: "LA_kwDOHodxeM8AAAABA8dh3A"
token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# PRs introducing known-vulnerable packages will be blocked from merging.
#
# Source repository: https://github.com/actions/dependency-review-action
name: 'Dependency Review'
name: "Dependency Review"
on: [pull_request]

permissions:
Expand All @@ -16,7 +16,7 @@ jobs:
dependency-review:
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
- name: "Checkout Repository"
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
- name: 'Dependency Review'
- name: "Dependency Review"
uses: actions/dependency-review-action@6c5ccdad469c9f8a2996bfecaec55a631a347034 # v3.1.0
54 changes: 27 additions & 27 deletions .github/workflows/new-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@ jobs:
issues: write
repository-projects: write
steps:
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
id: add-label
with:
action: add
issue-number: ${{ github.event.issue.number }}
label-id: 'LA_kwDOHodxeM8AAAABA8dlvA'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Issue comment tag
uses: devops-actions/issue-comment-tag@ec5e2b8d5f031330ff19bf4ee5b5252b1176995a # v0.1.8
with:
# The tag of the team to mention in the issue comment
team: V0ldek
# The issue number to create a new comment in
issue: ${{ github.event.issue.number }}
# The owner for the repo to create a new comment in
owner: ${{ github.event.repository.owner.login }}
# The repo to create a new comment in
repo: ${{ github.event.repository.name }}
# The GitHub token to use to create a new comment with. Use `secrets.GITHUB_TOKEN` to inject it
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add To GitHub projects
uses: actions/add-to-project@31b3f3ccdc584546fc445612dec3f38ff5edb41c # v0.5.0
with:
# URL of the project to add issues to
project-url: https://github.com/users/V0ldek/projects/1
# A GitHub personal access token with write access to the project
github-token: ${{ secrets.RSONPATH_PROJECT_TOKEN }}
- uses: V0ldek/modify-label@65905feb4c09417e7caed08928595a0b4f9b3d42 # v1.0.0
id: add-label
with:
action: add
issue-number: ${{ github.event.issue.number }}
label-id: "LA_kwDOHodxeM8AAAABA8dlvA"
token: ${{ secrets.GITHUB_TOKEN }}
- name: Issue comment tag
uses: devops-actions/issue-comment-tag@ec5e2b8d5f031330ff19bf4ee5b5252b1176995a # v0.1.8
with:
# The tag of the team to mention in the issue comment
team: V0ldek
# The issue number to create a new comment in
issue: ${{ github.event.issue.number }}
# The owner for the repo to create a new comment in
owner: ${{ github.event.repository.owner.login }}
# The repo to create a new comment in
repo: ${{ github.event.repository.name }}
# The GitHub token to use to create a new comment with. Use `secrets.GITHUB_TOKEN` to inject it
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Add To GitHub projects
uses: actions/add-to-project@31b3f3ccdc584546fc445612dec3f38ff5edb41c # v0.5.0
with:
# URL of the project to add issues to
project-url: https://github.com/users/V0ldek/projects/1
# A GitHub personal access token with write access to the project
github-token: ${{ secrets.RSONPATH_PROJECT_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/nix-shell.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: "Nix Shell Build"
on:
pull_request:
branches: [ "main", "nix" ]
branches: ["main", "nix"]
push:
branches: [ "main", "nix" ]
branches: ["main", "nix"]

permissions:
contents: read

Expand Down
Loading

0 comments on commit adaaf0b

Please sign in to comment.