Skip to content

Commit 429ae3c

Browse files
authored
chore: Remove Rust implementation (#18)
* refactor: Remove Rust implementation --- {"auto-commit-msg":{"language":"go","model":"gemini-2.5-flash","version":"0.4.0-dev","response_time":10.17,"execution_time":10.19}} * refactor: Remove unused language field from Trace struct The `Language` field in the `Trace` struct is no longer used and has been removed. This change simplifies the struct and reduces potential confusion. The CI configuration has also been updated to remove the matrix job for different packages, as the build process now targets the default package. --- {"auto-commit-msg":{"language":"go","model":"gemini-2.5-flash-lite","version":"0.4.0-dev","response_time":1.18,"execution_time":1.2}}
1 parent f44f8b4 commit 429ae3c

16 files changed

Lines changed: 5 additions & 2371 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ jobs:
1414
os:
1515
- macos-latest
1616
- ubuntu-latest
17-
package:
18-
- go
19-
- rust
2017
fail-fast: true
2118
steps:
2219
- uses: actions/checkout@v5
@@ -26,8 +23,8 @@ jobs:
2623
name: sestrella
2724
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
2825
skipPush: ${{ github.ref_name != 'main' }}
29-
- run: nix build .#${{ matrix.package }}
30-
- run: nix run .#${{ matrix.package }} -- --version
26+
- run: nix build .#
27+
- run: nix run .# -- --version
3128

3229
template:
3330
runs-on: ubuntu-latest

README.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -131,16 +131,6 @@ commit` without a commit message generates a commit message. If a commit message
131131
is given, `auto-commit-msg` does not generate a commit message and instead uses
132132
the one provided by the user.
133133

134-
## Benchmark
135-
136-
The following table compares the Go and Rust implementations; it was built using
137-
[hyperfine](https://github.com/sharkdp/hyperfine).
138-
139-
| Command | Mean [s] | Min [s] | Max [s] | Relative |
140-
|:---|---:|---:|---:|---:|
141-
| `./auto-commit-msg` | 1.101 ± 0.205 | 0.776 | 1.309 | 1.00 |
142-
| `./rust/target/release/acm` | 1.244 ± 0.106 | 1.127 | 1.416 | 1.13 ± 0.23 |
143-
144134
## License
145135

146136
[MIT](LICENSE)

cmd/root.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ type DiffConfig struct {
3434
}
3535

3636
type Trace struct {
37-
Language string `json:"language"`
3837
Model string `json:"model"`
3938
Version string `json:"version"`
4039
ResponseTime float64 `json:"response_time"`
@@ -145,7 +144,6 @@ var rootCmd = &cobra.Command{
145144
executionDuration := time.Since(executionTime)
146145
trace, err := json.Marshal(TraceWrapper{
147146
Trace: Trace{
148-
Language: "go",
149147
Model: model,
150148
Version: strings.TrimSpace(cmd.Version),
151149
ResponseTime: math.Round(responseDuration.Seconds()*100) / 100,

devenv.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
git-hooks.hooks.auto-commit-msg = {
2424
enable = true;
25-
entry = lib.getExe (pkgs.callPackage ./rust/default.nix { });
25+
entry = lib.getExe (pkgs.callPackage ./default.nix { });
2626
stages = [ "prepare-commit-msg" ];
2727
verbose = true;
2828
};

devenv.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,3 @@ inputs:
1212
secretspec:
1313
enable: true
1414
provider: keyring
15-
profile: development

flake.nix

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,20 +32,9 @@
3232
nix-filter.overlays.default
3333
];
3434
};
35-
lib = pkgs.lib;
3635
in
37-
rec {
38-
benchmark = pkgs.writeShellScriptBin "benchmark" ''
39-
${lib.getExe pkgs.hyperfine} \
40-
--runs 5 \
41-
--prepare 'sleep 1' \
42-
--export-markdown benchmark.md \
43-
${lib.getExe go} \
44-
${lib.getExe rust}
45-
'';
46-
default = go;
47-
go = pkgs.callPackage ./default.nix { };
48-
rust = pkgs.callPackage ./rust/default.nix { };
36+
{
37+
default = pkgs.callPackage ./default.nix { };
4938
}
5039
);
5140

rust/.envrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

rust/.gitignore

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)