Skip to content

template to build your own copy of yaegi with custom packages and readline support

Notifications You must be signed in to change notification settings

s1gnate-sync/mkyaegi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

custom packages

$ cat lib/go1.23-generate.go 
//go:build go1.23

package lib

//go:generate extract github.com/bitfield/script

make generate

building

make

to reduce size install upx and run make yaegi0

usage

yaegi [OPTIONS] [SCRIPT [ARGS]]

Usage of ./yaegi:
  -eval code
    	evaluate code before running script
  -keep-init-main
    	do not blank init and main functions before entering repl
  -no-env
    	start with empty environment
  -no-import-used
    	disable automatic import of used packages
  -repl
    	enter repl after script
  -tags string
    	build tags


Examples:

	# repl
	yaegi

	# execute script
	yaegi script.go

	# eval code and start repl
	yaegi -eval "println(os.Args)" - a b c

	# eval code and execute script
	yaegi -eval "println(1)" script.go a b c

	# enter repl after script 
	yaegi -repl script.go 

	# same, but for shebang 
	YAEGI_REPL=1 ./script.go

	# all 3
	yaegi -repl -eval "runs before script" script.go
	> enters repl after script
	

About

template to build your own copy of yaegi with custom packages and readline support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published