func baseRawEqual(state *lua.State) int {
	state.CheckAny(1)
	state.CheckAny(2)
	state.Push(state.RawEqual(1, 2))
	return 1
}
rawequal(v1, v2)

Checks whether v1 is equal to v2, without invoking the __eq metamethod.
Returns a boolean.

See https://www.lua.org/manual/5.3/manual.html#pdf-rawequal
package base
import (
	"fmt"
	"os"
	"runtime"
	"strconv"
	"strings"
	"github.com/Azure/golua/lua"
)
func Open(state *lua.State) int {
	var baseFuncs = map[string]lua.Func{
		"assert":         lua.Func(baseAssert),
		"dofile":         lua.Func(baseDoFile),
		"error":          lua.Func(baseError),
		"getmetatable":   lua.Func(baseGetMetaTable),
		"ipairs":         lua.Func(baseIPairs),
		"loadfile":       lua.Func(baseLoadFile),
		"load":           lua.Func(baseLoad),
		"next":           lua.Func(baseNext),
		"pairs":          lua.Func(basePairs),
		"pcall":          lua.Func(basePCall),
		"print":          lua.Func(basePrint),
		"rawequal":       lua.Func(baseRawEqual),
		"rawlen":         lua.Func(baseRawLen),
		"rawget":         lua.Func(baseRawGet),
		"rawset":         lua.Func(baseRawSet),
		"select":         lua.Func(baseSelect),
		"setmetatable":   lua.Func(baseSetMetaTable),
		"tonumber":       lua.Func(baseToNumber),
		"tostring":       lua.Func(baseToString),
		"type":           lua.Func(baseType),
		"xpcall":         lua.Func(baseXpcall),
		"collectgarbage": lua.Func(baseGC),
	}
	state.PushGlobals()
	state.SetFuncs(baseFuncs, 0)
	state.PushIndex(-1)
	state.SetField(-2, "_G")
	state.Push(lua.Version)
	state.SetField(-2, "_VERSION")
	return 1
}
func baseAssert(state *lua.State) int {
	if state.ToBool(1) {
		return state.Top()
	}
	state.CheckAny(1)
	state.Remove(1)
	state.Push("assert failed!")
	state.SetTop(1)
	return baseError(state)
}
func baseDoFile(state *lua.State) int {
	var (
		file             = state.OptString(1, "")
		src  interface{} = nil
	)
	state.SetTop(1)
	if file == "" {
		file = "stdin"
		src = os.Stdin
	}
	if err := state.LoadChunk(file, src, 0); err != nil {
		panic(err)
	}
	state.Call(0, lua.MultRets)
	return state.Top() - 1
}
func baseError(state *lua.State) int {
	level := int(state.OptInt(2, 1))
	state.SetTop(1)
	if state.TypeAt(1) == lua.StringType && level > 0 {
		state.Where(level)
		state.PushIndex(1)
		state.Concat(2)
	}
	return state.Error()
}
func baseGetMetaTable(state *lua.State) int {
	state.CheckAny(1)
	if !state.GetMetaTableAt(1) {
		state.Push(nil)
		return 1  
	}
	state.GetMetaField(1, "__metatable")
	return 1  
}
func baseIPairs(state *lua.State) int {
	ipairs := func(state *lua.State) int {  
		i := state.CheckInt(2) + 1
		state.Push(i)
		if t := state.GetIndex(1, i); t == lua.NilType || t == lua.NoneType {
			return 1
		}
		return 2
	}
	state.CheckAny(1)
	state.PushClosure(ipairs, 0)  
	state.PushIndex(1)            
	state.Push(0)                 
	return 3
}
func baseLoadFile(state *lua.State) int {
	var (
		name string = state.OptString(1, "")
		env  int    = 0  
	)
	var mode lua.Mode  
	switch state.OptString(2, "bt") {
	case "b":
		mode |= lua.BinaryMode
	case "t":
		mode |= lua.TextMode
	}
	if !state.IsNone(3) {
		env = 3
	}
	if err := state.LoadChunk(name, nil, mode); err != nil {
		state.Push(nil)
		state.Push(err.Error())
		return 2  
	} else {
		if env != 0 {  
			state.PushIndex(env)                
			if state.SetUpValue(-2, 1) == "" {  
				state.Pop()  
			}
		}
		return 1
	}
}
func baseLoad(state *lua.State) int {
	var (
		mode lua.Mode  
		name string
		env  int = 0  
	)
	switch state.OptString(3, "bt") {
	case "b":
		mode |= lua.BinaryMode
	case "t":
		mode |= lua.TextMode
	}
	if !state.IsNoneOrNil(4) {
		env = 4
	}
	chunk, ok := state.TryString(1)
	if ok && chunk != "" {  
		name = state.OptString(2, "")
	} else {
		name = state.OptString(3, "=(load)")
		state.CheckType(1, lua.FuncType)
		state.Debug(true)
	}
	if err := state.LoadChunk(name, chunk, mode); err != nil {
		state.Push(err.Error())
		state.Push(nil)
		state.Insert(-2)  
		return 2          
	} else {
		if env != 0 {  
			state.PushIndex(env)                
			if state.SetUpValue(-2, 1) == "" {  
				state.Pop()  
			}
		}
		return 1
	}
}
func baseNext(state *lua.State) int {
	state.CheckType(1, lua.TableType)
	state.SetTop(2)  
	if state.Next(1) {
		return 2
	}
	state.Push(nil)
	return 1
}
func basePairs(state *lua.State) int {
	if state.CheckAny(1); state.GetMetaField(1, "__pairs") == lua.NoneType {  
		state.PushClosure(baseNext, 0)  
		state.PushIndex(1)              
		state.Push(nil)                 
	} else {
		state.PushIndex(1)  
		state.Call(1, 3)    
	}
	return 3
}
func basePCall(state *lua.State) int {
	if err := state.PCall(state.Top()-1, -1, 0); err != nil {
		state.Push(false)
		state.Push(err.Error())
		return 2
	}
	state.Push(true)
	state.Insert(1)
	return state.Top()
}
func basePrint(state *lua.State) int {
	var (
		n = state.Top()
		i = 1
	)
	state.GetGlobal("tostring")
	for ; i <= n; i++ {
		state.PushIndex(-1)
		state.PushIndex(i)
		state.Call(1, 1)
		str, ok := state.TryString(-1)
		if !ok {
			panic(fmt.Errorf("'tostring' must return a string to 'print'"))
		}
		if i > 1 {
			fmt.Print("\t")
		}
		fmt.Print(str)
		state.Pop()
	}
	fmt.Println()
	return 0
}