Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wren-Go Bindings

These are PureGo bindings for the Wren scripting language to be used with Go.

pkg.dev

What is Wren?

"Wren is a small, fast, class-based concurrent scripting language."

Other bindings exist, right?

Yes, but they:

  • May not use Purego. This hurts cross-compilation.
  • May be outdated.
  • May not be efficient.
  • May not be as Go-like as these bindings.

These bindings, while incomplete and imperfect, still fulfill the above restrictions.

The following platforms should work with these bindings:

  • Windows x86 / x86_64
  • Linux x86_64
  • Mac x86_64 / arm_64

Though only Linux has been tested.

How do I use the bindings?

  1. go get github.com/solarlune/wren-go
  2. Copy the lib directory to your project directory.
func main() {

	err := wrengo.InitFromDirectory("./lib")
	if err != nil {
		panic(err)
	}

	// Create a config.
	config := wrengo.NewConfig()

	// Create a VM with the config.
	vm := wrengo.NewVM(config)

	// Run Wren!
	vm.Run("main", `System.print("Hi from Wren!")`)

}

About

wren-go is a set of purego bindings to run the Wren scripting engine in Go.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages