Giter Club home page Giter Club logo

scoop-crystal's Introduction

Crystal for Windows Preview

This repo provides an official way to try the Crystal programming language on Windows.

Getting started

Requirements

  1. Enable developer mode in Settings.
  2. Scoop package manager
  3. Visual Studio or Visual Studio Build Tools with Microsoft.VisualStudio.Workload.VCTools and Microsoft.VisualStudio.Component.VC.ATL components.
    • If you already have an existing Visual Studio installation (2017 or later), open the installer and simply select these components under Desktop Development.
    • Otherwise you can install a smaller subset of Visual Studio with only the tools you need from this bucket, see below.

Instructions

  1. scoop install git

  2. scoop bucket add crystal-preview https://github.com/neatorobito/scoop-crystal

    • If you don't already have the correct Visual Studio components discussed earlier, run scoop install vs_2022_cpp_build_tools. The Visual Studio Installer UI will open to display progress. If you see ERROR Exit code was 3010!, this simply means you need to reboot. Run the same command again and reboot.
  3. scoop install crystal

Create a file called hello.cr with the editor of your choice:

puts "Hello from Windows!"

Restart your terminal and voila!

image

Working/Not Working

The majority of the language is available and functional on Windows with the exception of multi-threading and signals.

Keep in mind, however, that Crystal for Windows is still under development and so you may encounter some issues. Please file bugs for any issues you encounter on the Crystal repo page. For more in-depth information and the current status of the Windows port, see #5430 Coordinate porting to Windows

scoop-crystal's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

scoop-crystal's Issues

Error when run `scoop install vs_2022_cpp_build_tools` after installed it already use vs_BuildTools

Please check following screenshot. (选项=option, 未知=unknown)

image

I guess the --passive was passed with without -- prefix.

Thanks

PS C:\Users\zw963> scoop install vs_2022_cpp_build_tools
Installing 'vs_2022_cpp_build_tools' (17.0) [64bit] from crystal-preview bucket
vs_BuildTools.exe (2.0 MB) [=============================================================================================================================================================================] 100%
Checking hash of vs_BuildTools.exe ... ok.
Running installer... done.
Linking ~\scoop\apps\vs_2022_cpp_build_tools\current => ~\scoop\apps\vs_2022_cpp_build_tools\17.0

Nightly build install is not working

Hi,

PS C:\Users\mavu> scoop install crystal-nightly
Couldn't find manifest for 'crystal-nightly'.

 scoop install https://github.com/neatorobito/scoop-crystal/raw/main/nightly/crystal-nightly.json
Installing 'crystal-nightly' (1.6.56) [64bit]
The remote server returned an error: (404) Not Found.
URL https://nightly.link/crystal-lang/crystal/actions/artifacts/485523404.zip is not valid

Can't install nightly build with scoop install crystal-nightly or scoop install crystal-preview
if I try the manifest directly, see above error.

[email protected]: hash check failed

It seems that the expected hash for vs_2022_cpp_build_tools does not match the actual upstream one. Maybe the upstream installer was updated?

btw, thank you for making this scoop bucket!

Recommend `shards` when installing `crystal`

I think it's good to have separate packages for crystal and shards. But it can be confusing when you install crystal but don't get shards and no information about it. This has already been noticed here: https://forum.crystal-lang.org/t/cant-run-shards-command-on-windows-crystal-v-1-3-0/4243

Most packages ship shards with crystal, but I think separation is better.
However, it would help to recommend installing shards when you install crystal (and vice versa probably?).
It seems scoop has a "suggest" property for this. That would print a recommendation to install shards when you install crystal (and don't have shards installed).

Alternatively, it could also be considered as a dependency. This would install shards automatically if you install crystal. But that would be wrong. shards is only a weak dependency. You can use Crystal perfectly well without shards.

Scoop install doesn't work with non-ASCII user name

PS C:\Users\Андрей> scoop install crystal
Installing 'crystal' (1.3.1.2) [64bit]
Loading 144748738.zip from cache
Checking hash of 144748738.zip ... ok.
Extracting 144748738.zip ... done.
Linking ~\scoop\apps\crystal\current => ~\scoop\apps\crystal\1.3.1.2
Creating shim for 'crystal'.
Running post-install script...
'crystal' (1.3.1.2) was installed successfully!
'crystal' suggests installing 'scoop-crystal/shards'.
PS C:\Users\Андрей> crystal -v
Could not create process with command 'C:\Users\??????\scoop\apps\crystal\current\crystal.exe  -v'.
PS C:\Users\Андрей>

Crystal tagged builds now available - should they replace nightlies?

https://github.com/crystal-lang/crystal/releases/tag/1.3.1
https://github.com/crystal-lang/crystal/releases/download/1.3.1/crystal-1.3.1-windows-x86_64-msvc-unsupported.zip

I think these downloads should become what 'crystal.json' is about. Whereas the current 'crystal.json' might be moved to 'crystal-nightly'.

These downloads also contain 'shards.exe'. Perhaps 'shards.json' could rely on that exact same download but keep only 'shards.exe' from it. Or do you think 'crystal.json' should provide 'shards.exe'? (I don't think so)

Ref crystal-lang/crystal#11489 (comment)

Error when updating to 1.9.0

Installing 'crystal' (1.9.0) [64bit] from crystal-preview bucket
Loading crystal-1.9.0-windows-x86_64-msvc-unsupported.exe from cache
Linking A:\Scoop\apps\crystal\current => A:\Scoop\apps\crystal\1.9.0
Creating shim for 'crystal'.
Can't shim 'crystal.exe': File doesn't exist.

scoop vs tools


PS C:\Users\rdp> git --version
git version 2.10.1.windows.1

PS C:\Users\rdp> scoop install vs_2022_cpp_build_tools

Couldn't find manifest for 'vs_2022_cpp_build_tools'.

Can anybody confirm?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.