Repository: kcl-lang/kcl (language: rust)

Issue:
[WIP] Feat : Support Call Kclvm Cli by C API
<!-- Thank you for contributing to KusionStack!

Note: 

1. With pull requests:

    - Open your pull request against "main"
    - Your pull request should have no more than two commits, if not you should squash them.
    - It should pass all tests in the available continuous integration systems such as GitHub Actions.
    - You should add/modify tests to cover your proposed code changes.
    - If your pull request contains a new feature, please document it on the README.

2. Please create an issue first to describe the problem.

    We recommend that link the issue with the PR in the following question.
    For more info, check https://kusionstack.io/docs/governance/contribute/
-->

#### 1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):

- [ ] N
- [x] Y 
re #125 

#### 2. What is the scope of this PR (e.g. component or file name):

<!-- You can add the scope of this change here. 
-->
        KCLVM/kclvm/spec
        KCLVM/kclvm/src/lib.rs

#### 3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):

<!-- You can choose a brief description here -->
- [ ] Affects user behaviors
- [ ] Contains syntax changes
- [ ] Contains variable changes
- [x] Contains experimental features
- [ ] Performance regression: Consumes more CPU
- [ ] Performance regression: Consumes more Memory
- [ ] Other

<!-- You can add more details here.
-->
    Support user to call kclvm_cli by c_api


#### 4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):

- [x] N
- [ ] Y 

<!-- You can add more details here.

-->

#### 5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links:

<!-- You can choose a brief description here -->
- [x] Unit test
- [ ] Integration test
- [ ] Benchmark (add benchmark stats below)
- [ ] Manual test (add detailed scripts or steps below)
- [ ] Other

<!-- You can add more details here.
None
-->
KCLVM/kclvm/src/api_test.rs

#### 6. Release note

<!-- compatibility change, improvement, bugfix, and new feature need a release note -->

Please refer to [Release Notes Language Style Guide](https://kusionstack.io/docs/governance/release-policy/) to write a quality release note.

```release-note
None
```



Discussion / hints:
****CLA Assistant Lite bot**** All contributors have signed the CLA  ✍️ ✅
I have read the CLA Document and I hereby sign the CLA
## Pull Request Test Coverage Report for [Build 2744948016](https://coveralls.io/builds/51191024)

* **2** of **5523**   **(0.04%)**  changed or added relevant lines in **6** files are covered.
* No unchanged relevant lines lost coverage.
* Overall coverage decreased (**-7.6%**) to **51.731%**

---

|  Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [kclvm/spec/src/main.rs](https://coveralls.io/builds/51191024/source?filename=kclvm%2Fspec%2Fsrc%2Fmain.rs#L2) | 1 | 3 | 33.33%
| [kclvm/spec/src/service/util.rs](https://coveralls.io/builds/51191024/source?filename=kclvm%2Fspec%2Fsrc%2Fservice%2Futil.rs#L2) | 0 | 25 | 0.0%
| [kclvm/spec/src/service/service.rs](https://coveralls.io/builds/51191024/source?filename=kclvm%2Fspec%2Fsrc%2Fservice%2Fservice.rs#L10) | 0 | 109 | 0.0%
| [kclvm/spec/src/service/api.rs](https://coveralls.io/builds/51191024/source?filename=kclvm%2Fspec%2Fsrc%2Fservice%2Fapi.rs#L10) | 0 | 153 | 0.0%
| [kclvm/spec/src/model/gpyrpc.rs](https://coveralls.io/builds/51191024/source?filename=kclvm%2Fspec%2Fsrc%2Fmodel%2Fgpyrpc.rs#L28) | 0 | 5232 | 0.0%
<!-- | **Total:** | **2** | **5523** | **0.04%** | -->


|  Totals | [![Coverage Status](https://coveralls.io/builds/51191024/badge)](https://coveralls.io/builds/51191024) |
| :-- | --: |
| Change from base [Build 2743999583](https://coveralls.io/builds/51186839): |  -7.6% |
| Covered Lines: | 22244 |
| Relevant Lines: | 42999 |

---
##### 💛  - [Coveralls](https://coveralls.io)


Fix patch:
diff --git a/VERSION b/VERSION
index 034de4606..142464bf2 100644
--- a/VERSION
+++ b/VERSION
@@ -1,1 +1,1 @@
-0.11.0-alpha.1
\ No newline at end of file
+0.11.0
\ No newline at end of file
diff --git a/cli/Cargo.toml b/cli/Cargo.toml
index f8909a6ad..30ea22483 100644
--- a/cli/Cargo.toml
+++ b/cli/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm_cli"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 [[bin]]
diff --git a/kclvm/Cargo.lock b/kclvm/Cargo.lock
index f2c9a0670..28d20ba40 100644
--- a/kclvm/Cargo.lock
+++ b/kclvm/Cargo.lock
@@ -1847,7 +1847,7 @@ dependencies = [
 
 [[package]]
 name = "kcl-language-server"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "chrono",
@@ -1892,7 +1892,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "kclvm-api",
  "kclvm-ast",
@@ -1914,7 +1914,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-api"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "criterion",
@@ -1954,7 +1954,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-ast"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "compiler_base_span",
@@ -1970,7 +1970,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-ast-pretty"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "compiler_base_macros",
  "compiler_base_session",
@@ -1984,7 +1984,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-cmd"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "clap",
@@ -2002,7 +2002,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-compiler"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "ahash",
  "bit-set",
@@ -2022,7 +2022,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-config"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "ahash",
  "anyhow",
@@ -2046,7 +2046,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-driver"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "flate2",
@@ -2068,7 +2068,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-error"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "annotate-snippets",
  "anyhow",
@@ -2089,7 +2089,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-evaluator"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "generational-arena",
@@ -2106,7 +2106,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-lexer"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "expect-test",
  "kclvm-error",
@@ -2116,7 +2116,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-loader"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "indexmap 1.9.3",
@@ -2133,7 +2133,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-macros"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -2143,7 +2143,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-parser"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "bstr",
@@ -2178,7 +2178,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-query"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "compiler_base_macros",
@@ -2200,7 +2200,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-runner"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "cc",
@@ -2235,7 +2235,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-runtime"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "ahash",
  "anyhow",
@@ -2273,7 +2273,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-sema"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "ahash",
  "anyhow",
@@ -2308,7 +2308,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-span"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "compiler_base_span",
  "kclvm-macros",
@@ -2318,7 +2318,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-tools"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "compiler_base_session",
@@ -2351,7 +2351,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-utils"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "anyhow",
  "fslock",
@@ -2360,7 +2360,7 @@ dependencies = [
 
 [[package]]
 name = "kclvm-version"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 dependencies = [
  "vergen-gitcl",
 ]
diff --git a/kclvm/Cargo.toml b/kclvm/Cargo.toml
index bb858aed1..f2cf647a5 100644
--- a/kclvm/Cargo.toml
+++ b/kclvm/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/api/Cargo.toml b/kclvm/api/Cargo.toml
index 5d8052a89..4d4ab7953 100644
--- a/kclvm/api/Cargo.toml
+++ b/kclvm/api/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-api"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 [dependencies]
diff --git a/kclvm/ast/Cargo.toml b/kclvm/ast/Cargo.toml
index 12a011544..732749011 100644
--- a/kclvm/ast/Cargo.toml
+++ b/kclvm/ast/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-ast"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/ast_pretty/Cargo.toml b/kclvm/ast_pretty/Cargo.toml
index 0331caf86..eacb583f8 100644
--- a/kclvm/ast_pretty/Cargo.toml
+++ b/kclvm/ast_pretty/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-ast-pretty"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/cmd/Cargo.toml b/kclvm/cmd/Cargo.toml
index 43190499a..5aa586ae3 100644
--- a/kclvm/cmd/Cargo.toml
+++ b/kclvm/cmd/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-cmd"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 [dependencies]
diff --git a/kclvm/compiler/Cargo.toml b/kclvm/compiler/Cargo.toml
index 2cb7ed329..c646865c4 100644
--- a/kclvm/compiler/Cargo.toml
+++ b/kclvm/compiler/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-compiler"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/config/Cargo.toml b/kclvm/config/Cargo.toml
index 6e854242d..0da52d958 100644
--- a/kclvm/config/Cargo.toml
+++ b/kclvm/config/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-config"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/driver/Cargo.toml b/kclvm/driver/Cargo.toml
index 6dabe3b59..66497d578 100644
--- a/kclvm/driver/Cargo.toml
+++ b/kclvm/driver/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-driver"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/error/Cargo.toml b/kclvm/error/Cargo.toml
index f019e1174..8ce827d03 100644
--- a/kclvm/error/Cargo.toml
+++ b/kclvm/error/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-error"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/evaluator/Cargo.toml b/kclvm/evaluator/Cargo.toml
index 8b7492cea..d4338b1cf 100644
--- a/kclvm/evaluator/Cargo.toml
+++ b/kclvm/evaluator/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-evaluator"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/lexer/Cargo.toml b/kclvm/lexer/Cargo.toml
index 389db3c75..e4b147304 100644
--- a/kclvm/lexer/Cargo.toml
+++ b/kclvm/lexer/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-lexer"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/loader/Cargo.toml b/kclvm/loader/Cargo.toml
index b8ea827e6..b89dd0079 100644
--- a/kclvm/loader/Cargo.toml
+++ b/kclvm/loader/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-loader"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/macros/Cargo.toml b/kclvm/macros/Cargo.toml
index 91f3cfe80..273f91274 100644
--- a/kclvm/macros/Cargo.toml
+++ b/kclvm/macros/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-macros"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/parser/Cargo.toml b/kclvm/parser/Cargo.toml
index cfc968302..ed82afe41 100644
--- a/kclvm/parser/Cargo.toml
+++ b/kclvm/parser/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-parser"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/query/Cargo.toml b/kclvm/query/Cargo.toml
index 8474630e2..eb5bc552c 100644
--- a/kclvm/query/Cargo.toml
+++ b/kclvm/query/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-query"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/runner/Cargo.toml b/kclvm/runner/Cargo.toml
index ac0640623..9cfe718ab 100644
--- a/kclvm/runner/Cargo.toml
+++ b/kclvm/runner/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-runner"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/runtime/Cargo.toml b/kclvm/runtime/Cargo.toml
index efe0532b7..f0e4d1024 100644
--- a/kclvm/runtime/Cargo.toml
+++ b/kclvm/runtime/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-runtime"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 [dependencies]
diff --git a/kclvm/sema/Cargo.toml b/kclvm/sema/Cargo.toml
index 85f05d2ff..966215911 100644
--- a/kclvm/sema/Cargo.toml
+++ b/kclvm/sema/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-sema"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/span/Cargo.toml b/kclvm/span/Cargo.toml
index 0b51c1d0f..8c7ef5611 100644
--- a/kclvm/span/Cargo.toml
+++ b/kclvm/span/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-span"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/tools/Cargo.toml b/kclvm/tools/Cargo.toml
index 6d0867d00..9c09941e3 100644
--- a/kclvm/tools/Cargo.toml
+++ b/kclvm/tools/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-tools"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/tools/src/LSP/Cargo.toml b/kclvm/tools/src/LSP/Cargo.toml
index 04dd0e8ff..e3967bb50 100644
--- a/kclvm/tools/src/LSP/Cargo.toml
+++ b/kclvm/tools/src/LSP/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kcl-language-server"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/utils/Cargo.toml b/kclvm/utils/Cargo.toml
index 5b4f9d9b1..7337f69b0 100644
--- a/kclvm/utils/Cargo.toml
+++ b/kclvm/utils/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-utils"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
diff --git a/kclvm/version/Cargo.toml b/kclvm/version/Cargo.toml
index 18a3feddd..925d9b7d3 100644
--- a/kclvm/version/Cargo.toml
+++ b/kclvm/version/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "kclvm-version"
-version = "0.11.0-alpha.1"
+version = "0.11.0"
 edition = "2021"
 
 [build-dependencies]


Test patch: