Skip to content

Commit ff8e827

Browse files
committed
cargo binstall対応とインストール手順を追加、v0.1.4
1 parent 77012b7 commit ff8e827

4 files changed

Lines changed: 33 additions & 6 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "grix"
3-
version = "0.1.3"
3+
version = "0.1.4"
44
edition = "2021"
55
authors = ["kyosuke <h.kyosuke0505@gmail.com>"]
66
description = "grep with an index: trigram-indexed code search that answers in milliseconds"
@@ -11,6 +11,17 @@ keywords = ["grep", "search", "index", "trigram", "cli"]
1111
categories = ["command-line-utilities", "text-processing"]
1212
rust-version = "1.74"
1313

14+
# Install a prebuilt binary with `cargo binstall grix`. URLs match the names
15+
# produced by .github/workflows/release.yml.
16+
[package.metadata.binstall]
17+
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }.tar.gz"
18+
bin-dir = "{ name }-v{ version }-{ target }/{ bin }{ binary-ext }"
19+
pkg-fmt = "tgz"
20+
21+
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
22+
pkg-url = "{ repo }/releases/download/v{ version }/{ name }-v{ version }-{ target }.zip"
23+
pkg-fmt = "zip"
24+
1425
[dependencies]
1526
regex = "1"
1627
regex-syntax = "0.8"

README.en.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,19 @@ There is a property test that checks indexed search and a full scan return the
3636
same results, and the benchmark script stops if the two tools' match counts
3737
differ.
3838

39-
## Usage
39+
## Install
4040

4141
```bash
42-
cargo install grix
42+
cargo install grix # build from source
43+
cargo binstall grix # fetch a prebuilt binary
44+
brew install kyo5uke/tap/grix # macOS / Linux
45+
```
46+
47+
Prebuilt binaries (including Windows) are also on the [Releases](https://github.com/kyo5uke/grix/releases) page.
4348

49+
## Usage
50+
51+
```bash
4452
cd your-repo
4553
grix 'fn main' # first run builds the index; every run refreshes it
4654
grix 'fn main' src/ # limit the search to a directory or file

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,19 @@ embedding やセマンティック検索ではなく、最後は実際のファ
2929
テストにも「索引あり検索とフルスキャンの結果が一致する」ことを確認する性質テストを入れています。
3030
ベンチマークスクリプトも、両方のマッチ行数が一致しない場合は計測を止めます。
3131

32-
## 使い方
32+
## インストール
3333

3434
```bash
35-
cargo install grix
35+
cargo install grix # ソースからビルド
36+
cargo binstall grix # ビルド済みバイナリを取得
37+
brew install kyo5uke/tap/grix # macOS / Linux
38+
```
39+
40+
ビルド済みバイナリは [Releases](https://github.com/kyo5uke/grix/releases) からも入手できます(Windows 含む)。
3641

42+
## 使い方
43+
44+
```bash
3745
cd your-repo
3846
grix 'fn main' # 初回は索引を作成。以降は毎回、検索前に索引を増分更新
3947
grix 'fn main' src/ # 検索範囲をディレクトリやファイルに絞る

0 commit comments

Comments
 (0)