build-cr
Version, currently 0.1.67 versions
github.com/crenv/crystal-build-cr
Facilitates the process of building, downloading, and/or installing Crystal.
12 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
build-cr:
github: crenv/crystal-build-cr
version: ~> 0.1.6Then run:
shards installshard.yml
- Crystal
1.6- License
- MIT
- Target
buildfrom src/build.cr
Dependencies
Runtime Dependencies
- crest~> 1.3.6github: mamantoha/crest
README

## crystal-build
**Disclaimer**: This is an in-progress-but-working rewrite of `crystal-build` in Crystal. While largely functional, the existing application is written in Perl and in general it's hard to find maintainers, and people who are willing to work on Perl projects.
`crystal-build` is a plugin for [`crenv`](https://github.com/crenv/crenv) which provides a `crenv install` command. This command facilitates downloading and building/installing specific versions of Crystal and Shards.
Currently this project only supports downloading and installing Crystal from a released Crystal binary from the [crystal-lang GitHub releases page](https://github.com/crystal-lang/crystal/releases). Building Crystal from source is a feature that is on the roadmap. Shards, if not included in the GitHub release, will be built and installed from source using the Crystal version that was just installed.
### Installation
For a really basic installation, if a binary for your OS is included in the Releases page of this repository, rename the binary to `crenv-install`, and add that binary to `$CRENV_ROOT/plugins/crystal-build/bin/`. You won't have the ablility to uninstall Crystal versions with `crenv uninstall` this way.
To build from scratch, clone the repository and build it with an existing Crystal installation. If you don't have an existing Crystal installation and you use macOS, the easiest way is to install `crystal` using homebrew. This should typically work.
```bash
git clone https://github.com/taylorthurlow/crystal-build-cr.git $CRENV_ROOT/plugins/crystal-build
cd $CRENV_ROOT/plugins/crystal-build
shards install
crystal build --release src/build.cr -o bin/crenv-install
```
### Usage
```
crenv install [options] <version>
-h, --help Print this help
-v, --verbose Enable verbose output
--version Print the version number
--shards-version=SHARDS_VERSION Specify a version of Shards to be installed, if it is not already present
-l, --list Print a list of available Crystal versions
```
Install a specific version of Crystal with:
```bash
crenv install 1.6.0
```
If you compile from source you should also have access to `crenv uninstall <version>`. If you just copied the binary and you don't have the uninstall command, you can achieve the same effect by removing the desired directory from `$CRENV_ROOT/versions`. You can add a simple uninstall script with this command:
```bash
echo "rm -r $CRENV_ROOT/versions/$1" > $CRENV_ROOT/plugins/crystal-build/bin/crenv-uninstall
```
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.1.6- Tagged
- Oct 10, 2022
- Commit
6dd3430936cc- Crystal
1.6- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/crenv/crystal-build-cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 13, 2026
- Synced
- Aug 13, 2026
- Versions
- 7