drahnr / cargo-spellcheck

Checks all your documentation for spelling and grammar mistakes with hunspell and a nlprule based checker for grammar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support cargo-binstall

EdJoPaTo opened this issue · comments

Is your feature request related to a particular use-case?

When using a tool it needs to be installed first. Normally cargo install cargo-spellcheck can be used but it takes some time / resources to compile from sources. Installing binaries can speed this up. cargo-binstall does exactly that.

It basically checks crates.io to get the Cargo.toml and checks for things like the repository. When its GitHub, it checks some common names from the Release.

Currently the cargo-spellcheck releases have assets with a different name from what cargo-binstall expects.

Describe the solution you'd like to implement/see implemented

Currently it is { target }-{ name }-v{ version } while for example { name }-{ target }-v{ version } would be supported by cargo-binstall.

Also there is only a x64 Linux and x64 Windows variant. More targets would be nice to support for example macOS x64 / arm64 or Linux arm64.

I checked for some CI in cargo-spellcheck to change the order of the output files but it seems like a manual process currently? I build my projects with a GitHub Action Workflow which automatically adds release binaries to a GitHub Release. If there is interest I could try to add the GitHub workflow to this repo too.

Describe alternatives you've considered

Naming assets in the GitHub releases differently seems like a pretty straightforward change.

Additional context

see also #15

It's not a manual process to cut releases, it's fully automated.

I'll change the artifact naming according to what install understands.

Could you create a PR that documents the usage with GH actions? I am not a actions user nor a fan of it, but I do understand the value for other people.

Looks like I have overlooked the automation in the repo then where I could have renamed the artifacts 😬

Not sure where to add it exactly to the docs (maybe here?) but its probably just this:

- name: Install cargo-spellcheck
  uses: taiki-e/install-action@v2
  with:
    tool: cargo-spellcheck

- name: Run cargo-spellcheck
  run: cargo spellcheck --your --arguments

Yeah, a subsection on the C/CD section would be appreciated :)

.concourse.yaml is the CI declaration

Note that the documentation on how to use cargo-binstall (or GitHub Actions which use cargo-binstall) do not completely solve this issue as renaming of the release artifacts is still required for cargo binstall to be faster than cargo install. Solving that is the main part of this issue which #298 does not affect.

As, said I'll take care of it :)

yep, just wanted to prevent the issue to be closed before its done :)

The binary is with 224 MB huge… I quickly tested it with zip and its 51 MB then. That might also be a good improvement to reduce download time.

Please open a new issue.