Embed chrome in a golang application

5,029 views
Skip to first unread message

Oleku Konko

unread,
Aug 9, 2013, 6:44:45 AM8/9/13
to golan...@googlegroups.com
Is there anyway one can embed chrome in a golang  application?

Why ? 

- We have existing application what works well on chrome using websockets  and there is no need reinventing the wheel but the clients most likely have  Internet Explorer Installed 
 
- Instead of writing windows GUI .. that same GUI can simply be done with existing HTML , CSS , Image and Javscript 

  
Any Ideas ?




 

Gustavo Niemeyer

unread,
Aug 9, 2013, 7:20:55 AM8/9/13
to Oleku Konko, golan...@googlegroups.com
You can tell them your application depends on Chrome being installed
and fire an external process from your Go app pointing the browser to
localhost.
gustavo @ http://niemeyer.net

bronze man

unread,
Aug 9, 2013, 7:29:33 AM8/9/13
to golan...@googlegroups.com
You can use CEF with c or c++
Maybe someone can port cef to golang

notedit

unread,
Aug 9, 2013, 7:32:16 AM8/9/13
to bronze man, golang-nuts


2013/8/9 bronze man <bronz...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

André Moraes

unread,
Aug 9, 2013, 7:32:56 AM8/9/13
to Oleku Konko, golan...@googlegroups.com
How I do it:

create a simple html page using node-webkit (this project combines
chromiun source code with nodejs)
After that html page is loaded, I use nodejs stdlibrary to fire my go
application and create a websocket to do I/O.
Everything else is done inside Go.
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
André Moraes
http://amoraes.info

Oleku Konko

unread,
Aug 9, 2013, 7:39:44 AM8/9/13
to golan...@googlegroups.com, Oleku Konko

Crazy bank policy  .. They must use windows product 

Oleku Konko

unread,
Aug 9, 2013, 7:42:09 AM8/9/13
to golan...@googlegroups.com, Oleku Konko

Nice ... are you able to customize the size and look of the window ? 

André Moraes

unread,
Aug 9, 2013, 7:52:15 AM8/9/13
to Oleku Konko, golan...@googlegroups.com
On Fri, Aug 9, 2013 at 8:42 AM, Oleku Konko <oleku...@gmail.com> wrote:
>
> Nice ... are you able to customize the size and look of the window ?

AFAIK, node-webkit have versions for windows/macos/linux.

The look and feel of the window is native, you can't tell the
diference between a node-webkit window and a win32 window.

I think you could be able to set the size of the window without any
problems, but you should check node-webkit docs to be sure.

The renderer is the same, so, if you can use chrome you should be able
to use node-webkit.

Robert Melton

unread,
Aug 9, 2013, 8:14:26 AM8/9/13
to bronze man, golang-nuts
On Fri, Aug 9, 2013 at 7:29 AM, bronze man <bronz...@gmail.com> wrote:
> You can use CEF with c or c++
> Maybe someone can port cef to golang

Not sure that would be required, you can just tweak the CEF example
application in minor ways to run the go executable -- have them
communicate however you want (zeromq, websockets). As long as you can
build an installer to put them in the same place, should be golden.

--
Robert Melton

bronze man

unread,
Aug 9, 2013, 9:11:57 AM8/9/13
to golan...@googlegroups.com, bronze man
But I do not how to write c++ in msvc... I just use some command line on that cef example application set the init url of cef to my website, set cache directorys.....

Archos

unread,
Aug 9, 2013, 9:32:59 AM8/9/13
to golan...@googlegroups.com

Archos

unread,
Aug 9, 2013, 9:41:55 AM8/9/13
to golan...@googlegroups.com
I was using a similar way to run Go applications in whatever browser although I discontinued due to that I'm more interested in use it (some day) under a stack based in Rust (with libraries of Servo to processing and rendering HTML/CSS).

David DENG

unread,
Aug 9, 2013, 11:22:07 AM8/9/13
to golan...@googlegroups.com, bronze man
http://go-search.org/search?q=webkit

There are some go framework working with webkit as well.

David

Oleku Konko

unread,
Aug 9, 2013, 12:33:56 PM8/9/13
to golan...@googlegroups.com
Interesting ... have not used Dart in development before .... 

Oleku Konko

unread,
Aug 9, 2013, 12:35:06 PM8/9/13
to golan...@googlegroups.com, bronze man
Good resource ... seen some few useful ones 

Niklas Voss

unread,
Aug 9, 2013, 2:18:59 PM8/9/13
to golan...@googlegroups.com
There is a discontinued project using swig to use CEF with go:

Guillermo Estrada

unread,
Aug 13, 2013, 9:46:55 PM8/13/13
to golan...@googlegroups.com, Oleku Konko
Hey Andre, do you have an example of this working? I'm very interested in being able to deploy Go apps with node-webkit frontend, also... is there a way to run the go app so that you dont have a console? Just the node-webkit chrome window?

lonn...@gmail.com

unread,
Aug 14, 2013, 12:02:35 PM8/14/13
to golan...@googlegroups.com, Oleku Konko
Here is some fairly ugly code that I've used to test golang & node-webkit:
https://github.com/lonnc/golang-nw

In my case I've been trying to get all content from go and leave node with the absolute bear minimum to do - so no websocket connections to worry about just redirects to go served pages.

Guillermo Estrada

unread,
Aug 17, 2013, 3:09:34 PM8/17/13
to golan...@googlegroups.com, Oleku Konko, lonn...@gmail.com
really liked that solution, Ill be working with this kind of setup, if this is improved, there might be a way to make it a GUI toolkit for golang, probably by bootstraping the building tool into a framework that includes node-webkit and so... dunno just brainstorming a bit.

Thnx for sharing :D
Reply all
Reply to author
Forward
0 new messages