https://github.com/bialang/gobia
A Go wrapper for Bia
https://github.com/bialang/gobia
bia bialang embedded-scripting-language go golang
Last synced: about 2 months ago
JSON representation
A Go wrapper for Bia
- Host: GitHub
- URL: https://github.com/bialang/gobia
- Owner: bialang
- License: bsd-3-clause
- Created: 2020-07-27T19:15:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-13T06:33:21.000Z (over 5 years ago)
- Last Synced: 2024-06-21T09:38:48.750Z (over 1 year ago)
- Topics: bia, bialang, embedded-scripting-language, go, golang
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gobia
A CGo wrapper for Bia
## Usage
```go
package main
import (
"fmt"
"github.com/bialang/gobia"
)
func main() {
engine, err := gobia.NewEngine()
// don't forget to close the engine after usage!
defer engine.Close()
engine.UseBSL()
engine.PutFunction("hello_world", func(params *gobia.Parameters) {
fmt.Println("Hello, World! - Go")
})
engine.Run([]byte(`
import io
io.print("Hello, World! - Bia")
hello_world()
`))
}
```
## Installation
### Requirements
- Bia
- Go *>= 1.12*
- GCC
### Downloading
```sh
go get github.com/bialang/gobia
```