Documentation ¶
Index ¶
Constants ¶
View Source
const (
TemplatePlaceholder = "//__TEMPLATE_INSERT_IMPORTS__"
)
Variables ¶
This section is empty.
Functions ¶
func BindgenCmd ¶
func CreateJSBindings ¶
func CreateJSBindings(spec BindgenSpec) (code string, err error)
Types ¶
type BindgenFlags ¶
type BindgenFlags struct { BuildOpts toolchain.Options WASM string `cli:"wasm,#path to the wasm blob, required to select module import for bindings"` Output string `cli:"o|output,#set file path to write the generated output, if not set, write generated bindings to stdout"` ES string `cli:"es,def=5,comp=5,comp=6,#set ES language when transpiling typescript"` ModuleName string `cli:"module-name,def=bindings,#set module name for generated bindings"` ModuleSystem string `` /* 154-byte string literal not displayed */ Minify bool `cli:"minify,#write minified code and source map along with the bindgen output file"` CustomTemplate string `cli:"T|template,#set path to a custom bindgen template file"` Platform toolchain.Platform `cli:"p|platform,def=js/wasm,#set os/arch pair used when building the wasm"` Tags []string `cli:"t|tag,#set go build tags used when building the wasm"` }
func GetBindgenFlags ¶ added in v0.2.0
func GetBindgenFlags() *BindgenFlags
type BindgenSpec ¶ added in v0.2.1
type SimpleWasmImportFilter ¶
type SimpleWasmImportFilter map[WasmImportKey]bool
func CreateSimpleFilterFromWasm ¶
func CreateSimpleFilterFromWasm(blob []byte) (filter SimpleWasmImportFilter, err error)
func (SimpleWasmImportFilter) Keep ¶
func (m SimpleWasmImportFilter) Keep(module, field string) bool
type WasmImportFilter ¶
type WasmImportKey ¶
Click to show internal directories.
Click to hide internal directories.