Skip to content

Commit

Permalink
chore: bump repo name to lib
Browse files Browse the repository at this point in the history
Signed-off-by: peefy <[email protected]>
  • Loading branch information
Peefy committed Dec 6, 2023
1 parent 10f7049 commit cf92051
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 27 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### How to Use

```shell
cargo add kcl-lang
cargo add --git https://github.com/kcl-lang/lib --branch main
```

Write the Code
Expand All @@ -32,7 +32,7 @@ fn main() -> Result<()> {
### How to Use

```shell
go get kcl-lang.io/kcl-artifact-go
go get kcl-lang.io/lib
```

Write the Code
Expand All @@ -41,7 +41,7 @@ Write the Code
package main

import (
artifact "kcl-lang.io/kcl-artifact-go"
artifact "kcl-lang.io/lib"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module kcl-lang.io/kcl-artifact-go
module kcl-lang.io/lib

go 1.19
2 changes: 1 addition & 1 deletion install.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
"fmt"
Expand Down
2 changes: 1 addition & 1 deletion install_lib_unix.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//go:build linux || darwin
// +build linux darwin

package kclvm_artifact
package lib

import (
"runtime"
Expand Down
2 changes: 1 addition & 1 deletion install_lib_windows.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

func installLib(libDir, libName string, versionMatched bool) error {
libFullName := libName + ".dll"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_darwin_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_darwin_arm64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_linux_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_linux_arm64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_windows_amd64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
2 changes: 1 addition & 1 deletion kclvm_cli_shared_lib_windows_arm64.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
_ "embed"
Expand Down
12 changes: 6 additions & 6 deletions lib/dummy.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package lib

import (
_ "kcl-lang.io/kcl-artifact-go/lib/darwin-amd64"
_ "kcl-lang.io/kcl-artifact-go/lib/darwin-arm64"
_ "kcl-lang.io/kcl-artifact-go/lib/linux-amd64"
_ "kcl-lang.io/kcl-artifact-go/lib/linux-arm64"
_ "kcl-lang.io/kcl-artifact-go/lib/windows-amd64"
_ "kcl-lang.io/kcl-artifact-go/lib/windows-arm64"
_ "kcl-lang.io/lib/lib/darwin-amd64"
_ "kcl-lang.io/lib/lib/darwin-arm64"
_ "kcl-lang.io/lib/lib/linux-amd64"
_ "kcl-lang.io/lib/lib/linux-arm64"
_ "kcl-lang.io/lib/lib/windows-amd64"
_ "kcl-lang.io/lib/lib/windows-arm64"
)
10 changes: 4 additions & 6 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,24 @@ KCL Rust SDK
### How to Use

```shell
cargo add kcl
cargo add --git https://github.com/kcl-lang/lib --branch main
```

Write the Code

```rust
use kcl_lang::*;
use std::path::Path;
use anyhow::Result;

fn main() -> Result<()> {
// File case
let api = API::new()?;
let args = &ExecProgramArgs {
work_dir: Path::new(".").join("src").join("testdata").canonicalize().unwrap().display().to_string(),
k_filename_list: vec!["test.k".to_string()],
k_filename_list: vec!["main.k".to_string()],
k_code_list: vec!["a = 1".to_string()],
..Default::default()
};
let exec_result = api.exec_program(args)?;
assert_eq!(exec_result.yaml_result, "alice:\n age: 18");
println!("{}", exec_result.yaml_result);
Ok(())
}
```
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! ## How to Use
//!
//! ```no_check,no_run
//! cargo add kcl
//! cargo add --git https://github.com/kcl-lang/lib --branch main
//! ```
//!
//! Write the Code
Expand Down
2 changes: 1 addition & 1 deletion util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package kclvm_artifact
package lib

import (
"os"
Expand Down

0 comments on commit cf92051

Please sign in to comment.