gascore/gas

Is the source code of https://gascore.github.io/ available anywhere?

odiferousmint opened this issue · 3 comments

Hey. Is the source code of https://gascore.github.io/ available anywhere (the examples or all of it)? That would be really helpful to get going!

A bit off-topic but: I am really new to developing for the Web. What would be the best way to use an already-existing JavaScript library from Go (and perhaps WebAssembly)? Is this possible with gas or even syscall/js?

Thank you for your answer in advance. :)

Sources of gascore.github.io aviable in gascore/example. Also it's provide instruction how to build it.

About off-topic: Gas is only UI library (witch can render in browser), it doesn't work with JS.
If you want to use JS library in your project you will create bindings (like this, but for web assembly) or use raw syscall/js with a ton of .Set() .Get() .Int() .Bool() .String()

Oh wow thank you so much! This is really helpful. I had no idea that such bindings exist (yep, that new to Web development :D), it definitely gives me a different perspective. Gonna close this!

I can't run the sample project from the documentation
https://gascore.notion.site/Introduction-0c11a59263ff417da150649ae17e6f40

root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/gaspro/example# go version
go version go1.18.1 linux/amd64

root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/gaspro/example# cd app/
root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/gaspro/example/app# go get
root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/gaspro/example/app# cd ..
root@miop-HP-Convertible-x360-11-ab1XX:/home/miop/belajar/gaspro/example# go run main.go --watch --dev
Builder: Compiling *.gox, *.gos
chmod: cannot access '/pkg/mod': No such file or directory
ERROR: exit status 1
panic: exit status 1

goroutine 1 [running]:
github.com/gascore/gasx.ErrorMsg({0xc00009c4a0, 0xd})
	/root/go/pkg/mod/github.com/gascore/gasx@v0.0.1/builder.go:68 +0xbc
github.com/gascore/gasx.Must({0x76a000?, 0xc0000ba300?})
	/root/go/pkg/mod/github.com/gascore/gasx@v0.0.1/builder.go:61 +0x33
github.com/gascore/gasx.RunCommand({0x6f2104?, 0x16?})
	/root/go/pkg/mod/github.com/gascore/gasx@v0.0.1/builder.go:76 +0xbe
main.compileFiles(0xc0000bc230?)
	/home/miop/belajar/gaspro/example/main.go:97 +0x3f
main.build({0x6e3b24, 0x4}, 0x2?)
	/home/miop/belajar/gaspro/example/main.go:85 +0x733
main.main()
	/home/miop/belajar/gaspro/example/main.go:26 +0x15e
exit status 2