Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance readme: add how-to-choose #195

Merged
merged 2 commits into from
Sep 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions README-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
<img src="https://img.shields.io/github/license/KusionStack/KCLVM.svg">
</p>


## 介绍

Kusion 配置语言(KCL)是一个开源的基于约束的记录及函数语言。KCL 通过成熟的编程语言技术和实践来改进对大量繁杂配置的编写,致力于构建围绕配置的更好的模块化、扩展性和稳定性,更简单的逻辑编写,以及更快的自动化集成和良好的生态延展性。


## 特性

+ **简单易用**:源于 Python、Golang 等高级语言,采纳函数式编程语言特性,低副作用
Expand All @@ -32,6 +34,8 @@ Kusion 配置语言(KCL)是一个开源的基于约束的记录及函数语
+ **API 亲和**:原生支持 [OpenAPI](https://github.com/KusionStack/kcl-openapi)、 Kubernetes CRD, Kubernetes YAML 等 API 生态规范
+ **开发友好**:[语言工具](https://kusionstack.io/docs/reference/cli/kcl/) (Format,Lint,Test,Vet,Doc 等)、 [IDE 插件](https://github.com/KusionStack/vscode-kcl) 构建良好的研发体验
+ **安全可控**:面向领域,不原生提供线程、IO 等系统级功能,低噪音,低安全风险,易维护,易治理
+ **生产可用**:广泛应用在蚂蚁集团平台工程及自动化的生产环境实践中


## 场景

Expand All @@ -44,10 +48,23 @@ Kusion 配置语言(KCL)是一个开源的基于约束的记录及函数语
+ 通过分块编写配置数据可扩展地管理庞大的配置
+ 与 [Kusion Stack](https://kusionstack.io) 一起,用作平台工程语言来交付现代应用程序


## 如何选择

简单的答案:
+ 如果你需要编写结构化的静态的 K-V,或使用 Kubernetes 原生的技术工具,建议选择 YAML
+ 如果你希望引入编程语言便利性以消除文本(如 YAML、JSON) 模板,有良好的可读性,或者你已是 Terraform 的用户,建议选择 HCL
+ 如果你希望引入类型功能提升稳定性,维护可扩展的配置文件,建议选择 CUE
+ 如果你希望以现代语言方式编写复杂类型和建模,维护可扩展的配置文件,原生的纯函数和策略,和生产级的性能和自动化,建议选择 KCL

稍后我们将提供更详细的功能和场景对比。


## 安装

从 Github releases 页面[下载](https://github.com/KusionStack/KCLVM/releases),并且将 `{install-location}/kclvm/bin` 添加到您的环境变量中


## 快速开始

`./samples/fib.k` 是一个计算斐波那契数列的例子
Expand Down Expand Up @@ -81,14 +98,17 @@ YAML 输出
fib8: 21
```


## 文档

更多文档请访问[语言手册](https://kusionstack.io/docs/reference/lang/lang/tour)


## 贡献

参考[开发手册](./docs/dev_guide/1.about_this_guide.md).


## 路线规划

参考[KCLVM 路线规划](https://kusionstack.io/docs/governance/intro/roadmap#kclvm-%E8%B7%AF%E7%BA%BF%E8%A7%84%E5%88%92)
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
<img src="https://img.shields.io/github/license/KusionStack/KCLVM.svg">
</p>


## Introduction

Kusion Configuration Language (KCL) is an open source constraint-based record and functional language. KCL improves the writing of a large number of complex configurations through mature programming language technology and practice, and is committed to building better modularity, scalability and stability around configuration, simpler logic writing, fast automation and good ecological extensionality.


## Features

+ **Easy-to-use**: Originated from high-level languages ​​such as Python and Golang, incorporating functional language features with low side effects.
Expand All @@ -32,6 +34,8 @@ Kusion Configuration Language (KCL) is an open source constraint-based record an
+ **API affinity**: Native support API ecological specifications such as [OpenAPI](https://github.com/KusionStack/kcl-openapi), Kubernetes CRD, Kubernetes YAML spec.
+ **Development friendly**: Friendly development experiences with rich [language tools](https://kusionstack.io/docs/reference/cli/kcl/) (Format, Lint, Test, Vet, Doc, etc.) and [IDE plugins](https://github.com/KusionStack/vscode-kcl).
+ **Safety & maintainable**: Domain-oriented, no system-level functions such as native threads and IO, low noise and security risk, easy maintenance and governance.
+ **Production-ready**: Widely used in production practice of platform engineering and automation at Ant Group.


## What is it for?

Expand All @@ -44,10 +48,23 @@ You can use KCL to
+ Manage large configurations scalably with isolated configuration blocks.
+ Used as a platform engineering lang to deliver modern app with [Kusion Stack](https://kusionstack.io).


## How to choose?

The simple answer:
+ YAML is recommended if you need to write structured static K-V, or use Kubernetes' native tools
+ HCL is recommended if you want to use programming language convenience to remove boilerplate with good human readability, or if you are already a Terraform user
+ CUE is recommended if you want to use type system to improve stability and maintain scalable configurations
+ KCL is recommended if you want types and modeling like a modern language, scalable configurations, in-house pure functions and rules, and production-ready performance and automation

A detailed feature and scenario comparison will be coming later.


## Installation

[Download](https://github.com/KusionStack/KCLVM/releases) the latest release from GitHub and add `{install-location}/kclvm/bin` to the environment `PATH`.


## Showcase

`./samples/fib.k` is an example of calculating the Fibonacci sequence.
Expand Down Expand Up @@ -81,14 +98,17 @@ YAML output
fib8: 21
```


## Documentation

Detailed documentation is available at [KCL tour](https://kusionstack.io/docs/reference/lang/lang/tour)


## Contributing

See [Developing Guide](./docs/dev_guide/1.about_this_guide.md).


## Roadmap

See [KCLVM Roadmap](https://kusionstack.io/docs/governance/intro/roadmap#kclvm-%E8%B7%AF%E7%BA%BF%E8%A7%84%E5%88%92).