Giter VIP home page Giter VIP logo

nuxui's Introduction

NuxUI is Golang GUI Framework for IOS, Android, macOS, Windows, Linux.

NuxUI is now in developing, the API maybe changed before first stable version.

Any suggestion or good idea post to discussions, let's us make it awesome

Documentation

Quick Start for desktop

git clone https://github.com/nuxui/samples.git
cd github.com/nuxui/samples/widgets
go mod tidy
go build . && ./widgets

Build for mobile

# get build tools
go install nuxui.org/nuxui/cmd/nux@latest

# into sample code
cd github.com/nuxui/samples/counter
go mod tidy

# ios
nux build -target=iossimulator -bundleid="app.id" -teamid="YOURTEAMID" .
xcrun simctl install booted ./counter.app

# android
nux build -target=android -ldflags="-s -w" . 
adb install -r counter.apk

Screenshot

nuxui's People

Contributors

nuxart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nuxui's Issues

Build Documentation is lacking

This looks pretty promising library. Looks like you directly itnegrate with the Swift and Android interfaces on Android and iOS?

Unfortunately you lack documentation for basic builds for both platforms. Can we add this to the README?

Happy to test this! 🤗

Transparent text when typing into an Editor widget on macOS

What version of Go are you using (go version)?

$ go version
go version go1.18.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/prologic/go/bin"
GOCACHE="/Users/prologic/Library/Caches/go-build"
GOENV="/Users/prologic/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/prologic/go/pkg/mod"
GONOPROXY="github.com/aucloud"
GONOSUMDB="github.com/aucloud"
GOOS="darwin"
GOPATH="/Users/prologic/go"
GOPRIVATE="github.com/aucloud"
GOPROXY="https://goproxy.mills.io/"
GOROOT="/usr/local/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/prologic/tmp/samples/widgets/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8h/c9gl4gms3fjb0kyf7nb42ybh0000gn/T/go-build4005998222=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ git clone https://github.com/nuxui/samples.git
$ cd samples/widgets
$ go mod tidy
$ go build .
$ ./widgets

Then:

  1. Type some text into the Editor widget at the bottom
  2. See it expand as you type
  3. Notice the text is invisible?

See attached screenshot.

What did you expect to see?

The text I typed!

What did you see instead?

Screen Shot 2022-08-03 at 02 37 25

Build error using nux build -target=ios on macOS

What version of Go are you using (go version)?

$ go version
go version go1.18.2 darwin/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/prologic/go/bin"
GOCACHE="/Users/prologic/Library/Caches/go-build"
GOENV="/Users/prologic/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/prologic/go/pkg/mod"
GONOPROXY="github.com/aucloud"
GONOSUMDB="github.com/aucloud"
GOOS="darwin"
GOPATH="/Users/prologic/go"
GOPRIVATE="github.com/aucloud"
GOPROXY="https://goproxy.mills.io/"
GOROOT="/usr/local/Cellar/go/1.18.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.18.2/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.2"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/prologic/tmp/samples/hello/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8h/c9gl4gms3fjb0kyf7nb42ybh0000gn/T/go-build4085119584=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ git clone https://github.com/nuxui/samples.git
$ cd samples/hello
$ go mod tidy
$ nux build -target=ios -bundleid="hello.nuxui" .
nux: go build -ldflags=-w -o=/var/folders/8h/c9gl4gms3fjb0kyf7nb42ybh0000gn/T/gomobile-work-4157362954/ios/arm64 nuxui.org/samples/hello failed: exit status 2
# nuxui.org/nuxui/nux/internal/darwin
../../../go/pkg/mod/nuxui.org/[email protected]/nux/internal/darwin/NSCursor.go:9:9: fatal error: 'Cocoa/Cocoa.h' file not found
#import <Cocoa/Cocoa.h>
        ^~~~~~~~~~~~~~~
1 error generated.

What did you expect to see?

No error. A successful build.

I expect nux build to know how to find the required C dependencies on my system.

NB: I have the latest versions of XCode Command-line Tools as well as XCode and can build iOS apps (for example with Flutter) just fine.

What did you see instead?

$ nux build -target=ios -bundleid="hello.nuxui" .
nux: go build -ldflags=-w -o=/var/folders/8h/c9gl4gms3fjb0kyf7nb42ybh0000gn/T/gomobile-work-4157362954/ios/arm64 nuxui.org/samples/hello failed: exit status 2
# nuxui.org/nuxui/nux/internal/darwin
../../../go/pkg/mod/nuxui.org/[email protected]/nux/internal/darwin/NSCursor.go:9:9: fatal error: 'Cocoa/Cocoa.h' file not found
#import <Cocoa/Cocoa.h>
        ^~~~~~~~~~~~~~~
1 error generated.

Wrong Type on macOS

Tried to compile on macOS, this is the error message:

nuxui.org/nuxui/nux/internal/darwin
internal/darwin/NSEvent.go:112:68: invalid operation: (_Cfunc_nux_NSEvent_HasPreciseScrollingDeltas)(_Ctype_uintptr_t(me)) > 0 (mismatched types _Ctype__Bool and untyped int)
internal/darwin/NSEvent.go:132:52: invalid operation: (_Cfunc_nux_NSEvent_IsARepeat)(_Ctype_uintptr_t(me)) > 0 (mismatched types _Ctype__Bool and untyped int)
internal/darwin/NSPanel.go:110:7: cannot use 1 (untyped int constant) as _Ctype__Bool value in assignment
internal/darwin/NSPanel.go:118:7: cannot use 1 (untyped int constant) as _Ctype__Bool value in assignment
internal/darwin/NSPanel.go:126:7: cannot use 1 (untyped int constant) as _Ctype__Bool value in assignment
internal/darwin/NSPanel.go:142:7: cannot use 1 (untyped int constant) as _Ctype__Bool value in assignment

Keep up the good work!

Build error under MacOS Montery 12.6

What version of Go are you using (go version)?

$ go version
1.19.3

Does this issue reproduce with the latest release?

yes, 0.1.1

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/phongchen/Library/Caches/go-build"
GOENV="/Users/phongchen/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/myusername/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/myusername/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.19.3/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.19.3/libexec/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Volumes/code/study/go/nuxui/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -gno-record-gcc-switches -fno-common"

What did you do?

Build a hello example

What did you see instead?

% go build .
# nuxui.org/nuxui/nux/internal/darwin
/Users/phongchen/go/pkg/mod/nuxui.org/[email protected]/nux/internal/darwin/NSPanel.go:12:9: fatal error: 'UniformTypeIdentifiers/UniformTypeIdentifiers.h' file not found
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

App build failed with ``` undefined: paint & NewPaint ```

go version :

go1.18.1 darwin/arm64

nuxui version :

[email protected]

os & cpu arch

darwin/arm64

What did you do?

nux build -target=iossimulator -bundleid="app.id" -teamid="YOURTEAMID" .

What did you expect to see?

Build the app successfully

What did you see instead?

App build failed with this error:

go/pkg/mod/nuxui.org/[email protected]/nux/paint.go:33:12: undefined: paint
go/pkg/mod/nuxui.org/[email protected]/nux/image_svg.go:114:10: undefined: NewPaint

官网上的示例不对

What version of Go are you using (go version)?

$ go version

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

What did you expect to see?

What did you see instead?

fail on first step :(

go install nuxui.org/nuxui/cmd/nux@latest
go: downloading nuxui.org/nuxui v0.1.1
go: nuxui.org/nuxui/cmd/nux@latest: nuxui.org/[email protected]: verifying module: checksum mismatch
downloaded: h1:cv7winqwx8ZDqZ4HZ+xQT/L28ovfS4Dcyb5xrxwe93s=
sum.golang.org: h1:XIpfkjXJcnoc7W0zpDTqDtmMrzCbRpW3oPSVsEXxxU4=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.