crystal README

The project's README from github.com/crystal-lang/crystal. As one markdown file: README.md.

Crystal

Linux CI Build Status macOS CI Build Status AArch64 CI Build Status Windows CI Build Status CircleCI Build Status Join the chat at https://gitter.im/crystal-lang/crystal Code Triagers Badge


Crystal - Born and raised at Manas

Crystal is a programming language with the following goals:

Why?

We love Ruby's efficiency for writing code.

We love C's efficiency for running code.

We want the best of both worlds.

We want the compiler to understand what we mean without having to specify types everywhere.

We want full OOP.

Oh, and we don't want to write C code to make the code run faster.

Project Status

Within a major version, language features won't be removed or changed in any way that could prevent a Crystal program written with that version from compiling and working. The built-in standard library might be enriched, but it will always be done with backwards compatibility in mind.

Development of the Crystal language is possible thanks to the community's effort and the continued support of 84codes and every other sponsor.

Installing

Follow these installation instructions

Try it online

play.crystal-lang.org

Documentation

Community

Have any questions or suggestions? Ask on the Crystal Forum, on our Gitter channel or IRC channel #crystal-lang at irc.libera.chat, or on Stack Overflow under the crystal-lang tag. There is also an archived Google Group.

Contributing

The Crystal repository is hosted at crystal-lang/crystal on GitHub.

Read the general Contributing guide, and then:

  1. Fork it (https://github.com/crystal-lang/crystal/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

crystal (crystal-lang/crystal)

Searching Database…

20.5K ·GitHub
这是什么?Crystal 是一门开源的通用编程语言,语法深受 Ruby 启发;自 2012 年起一直在 GitHub 上公开开发。
它是一个框架、一个库,还是一门完整的语言?它就是语言本身:这个仓库存放的是 Crystal 编译器和它的标准库,编译器会把你的程序编译成高效的原生代码。
怎么把它跑起来?安装之前能不能先试试?按照官方安装说明装好编译器即可;也可以不安装,直接在浏览器里通过 play.crystal-lang.org 试用 Crystal。
我现有的 C 库还能用吗?可以——你可以在 Crystal 里为 C 代码编写绑定来调用它,这样原生 C 库就能被封装起来,直接在你的程序中使用。
语法跟 Ruby 差不多,那我的 Ruby 代码能直接跑吗?不能——Ruby 兼容性明确不是目标;语法相似,但 Crystal 是一门独立的编译型语言,并不是 Ruby 的实现。
是不是得像 Java 或 Go 那样到处写类型标注?不用——Crystal 是静态类型检查的,但你不需要声明变量或方法参数的类型,编译器会自动推断。
它有没有元编程功能,可以少写些重复样板代码?有——这门语言支持编译期求值和代码生成,重复的代码可以在构建阶段自动生成,而不用手写。
升级 Crystal 之后,我现有的程序会不会挂掉?在同一个主版本内不会——语言特性不会被移除或做出导致程序无法编译的改动,标准库的扩展也始终顾及向后兼容。
What are similar projects?spinel, scala, morloc, CalcKernel, reason, TypeScript, Singeli, gleam
Size
62 MB
Stars
20.5K
Age
13y
Commits · 90 Days