diff --git a/v3/examples/binding/README.md b/v3/examples/binding/README.md new file mode 100644 index 000000000..b16c00194 --- /dev/null +++ b/v3/examples/binding/README.md @@ -0,0 +1,11 @@ +# Bindings Example + +This example demonstrates how to generate bindings for your application. + +To generate bindings, run `wails3 generate bindings` in this directory. + +See more options by running `wails3 generate bindings --help`. + +## Notes + - The bindings generator is still a work in progress and is subject to change. + - The generated code uses `wails.CallByID` by default. This is the most secure and quickest way to call a function. In a future release, we will look at generating `wails.CallByName` too. \ No newline at end of file diff --git a/v3/examples/binding/bindings_main.js b/v3/examples/binding/bindings_main.js index f1e00da80..f69aa7e9b 100644 --- a/v3/examples/binding/bindings_main.js +++ b/v3/examples/binding/bindings_main.js @@ -7,7 +7,7 @@ import {main} from './models'; window.go = window.go || {}; window.go.main = { GreetService: { - + /** * GreetService.Greet * Greet greets a person @@ -15,7 +15,7 @@ window.go.main = { * @returns {Promise} **/ Greet: function(name) { wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0)); }, - + /** * GreetService.GreetPerson * GreetPerson greets a person diff --git a/v3/examples/binding/go.mod b/v3/examples/binding/go.mod index 640c41bac..ee1a5687b 100644 --- a/v3/examples/binding/go.mod +++ b/v3/examples/binding/go.mod @@ -41,7 +41,7 @@ require ( golang.org/x/crypto v0.9.0 // indirect golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect golang.org/x/net v0.10.0 // indirect - golang.org/x/sys v0.12.0 // indirect + golang.org/x/sys v0.13.0 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect ) diff --git a/v3/examples/binding/go.sum b/v3/examples/binding/go.sum index 9590032ac..443179609 100644 --- a/v3/examples/binding/go.sum +++ b/v3/examples/binding/go.sum @@ -131,12 +131,11 @@ golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM= -golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= +golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.11.0 h1:F9tnn/DA/Im8nCwm+fX+1/eBwi4qFjRT++MhtVC4ZX0= -golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= +golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= +golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.9.0 h1:2sjJmO8cDvYveuX97RDLsxlyUxLl+GHoLxBiRdHllBE= diff --git a/v3/examples/binding/main.go b/v3/examples/binding/main.go index 53eaf2de6..d1abe9057 100644 --- a/v3/examples/binding/main.go +++ b/v3/examples/binding/main.go @@ -16,9 +16,7 @@ func main() { Bind: []any{ &GreetService{}, }, - Assets: application.AssetOptions{ - FS: assets, - }, + Assets: application.AlphaAssets, Mac: application.MacOptions{ ApplicationShouldTerminateAfterLastWindowClosed: true, },