github.com/moontrade/wavm-go@v0.3.2-0.20220316110326-d229dd66ad65/wavm.go (about) 1 package wavm 2 3 /* 4 //#cgo linux,amd64 CXXFLAGS: -std=c++17 5 //#cgo linux,amd64 LDFLAGS: -lstdc++ 6 //#cgo linux,arm64 CXXFLAGS: -std=c++17 7 //#cgo linux,arm64 LDFLAGS: -lstdc++ 8 //#cgo darwin,amd64 CXXFLAGS: -std=c++17 9 //#cgo darwin,arm64 LDFLAGS: -lstdc++ 10 //#cgo darwin,arm64 CXXFLAGS: -std=c++17 11 //#cgo darwin,arm64 LDFLAGS: -lstdc++ 12 #cgo linux,amd64 LDFLAGS: -Wl,-rpath,./ -L./ -Wl,-rpath,${SRCDIR}/packaged/lib/linux_amd64 -L${SRCDIR}/packaged/lib/linux_amd64 13 #cgo linux,amd64 LDFLAGS: -lWAVM -lz 14 #cgo linux,arm64 LDFLAGS: -Wl,-rpath,./ -L./ -Wl,-rpath,${SRCDIR}/packaged/lib/linux_amd64 -L${SRCDIR}/packaged/lib/linux_arm64 15 #cgo linux,arm64 LDFLAGS: -lWAVM -lz 16 #cgo darwin,amd64 LDFLAGS: -Wl,-rpath,./ -L./ -L${SRCDIR}/packaged/lib/darwin_amd64 17 #cgo darwin,arm64 LDFLAGS: -lWAVM -lz 18 #cgo darwin,arm64 LDFLAGS: -Wl,-rpath,./ -L./ -Wl,-rpath,${SRCDIR}/packaged/lib/darwin_arm64 -L${SRCDIR}/packaged/lib/darwin_arm64 19 //#cgo darwin,arm64 LDFLAGS: -Wl,-rpath,./ -L./ -L${SRCDIR}/packaged/lib/darwin_arm64 20 #cgo darwin,arm64 LDFLAGS: -lWAVM -lz 21 #include <stdlib.h> 22 #include "wavm-c.h" 23 */ 24 import "C" 25 import ( 26 "math" 27 28 _ "github.com/moontrade/wavm-go/packaged" 29 ) 30 31 func init() { 32 33 } 34 35 var ( 36 EMPTY = C.CString("") 37 ) 38 39 const ( 40 WASMMemoryPageSize = 0x10000 41 WASMMemoryPagesMax = math.MaxUint32 42 WASMTableSizeMax = math.MaxUint32 43 LimitsMaxDefault uint32 = 0xffffffff 44 )