BindGo
Getting started
First, add bindgo
as a dev dependency in your pubspec.yaml file. It belongs in dev_dependencies because it is a command line tool.
dev_dependencies:
bindgo: any
Usage
- Adding your config to field
bindgo
in pubspec.yaml
e.g. :
bindgo:
name: test # Dynamic library output name
main: ./test # The directory where the main package of golang code is located
platforms:
windows:
arch:
- 'amd64'
android:
arch:
- 'arm64'
cc: 'C:NDK\toolchains\llvm\prebuilt\windows-x86_64\bin\aarch64-linux-android27-clang.cmd'
- Run the following command in the terminal
flutter pub run bindgo:run
Additional information
View the operating systems and architectures supported by the current version of golang:
go tool dist list
It will output:
e.g. :