kcl-lang/kcl-go

[Enhancement] kclvm-go needs to be able to be installed through go install command

Peefy opened this issue · 2 comments

Peefy commented

Enhancement

To enable kusionctl to be installed through go install, kclvm go needs to be installed and used through go install, which can be done through go embedded, such as the go binding method of wasmer and wasmtime:

Goals

The following commands can be used directly

  • a.k
a = 1
$ go install kusionstack.io/kclvm-go@latest
$ kcl-go run a.k
a: 1
Peefy commented

After #72, I run the following command and then I got

$ go install kusionstack.io/kclvm-go@latest
package kusionstack.io/kclvm-go is not a main package

One of the expected results is to directly install and build a kcl-go command. cc @NeverRaR

Peefy commented

Test go install kusionstack.io/kclvm-go/cmds/kcl-go@main successfully.