{"id":16021733,"url":"https://github.com/davidanthoff/electron.jl","last_synced_at":"2025-09-14T13:05:58.785Z","repository":{"id":41057380,"uuid":"121047448","full_name":"davidanthoff/Electron.jl","owner":"davidanthoff","description":"Julia wrapper for Electron","archived":false,"fork":false,"pushed_at":"2024-10-24T03:31:27.000Z","size":828,"stargazers_count":86,"open_issues_count":12,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-24T19:56:35.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidanthoff.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-10T19:36:04.000Z","updated_at":"2024-10-24T03:30:04.000Z","dependencies_parsed_at":"2024-10-24T06:22:54.388Z","dependency_job_id":"54c78368-8875-4c38-9fef-f7f03ee06826","html_url":"https://github.com/davidanthoff/Electron.jl","commit_stats":{"total_commits":214,"total_committers":9,"mean_commits":23.77777777777778,"dds":"0.28037383177570097","last_synced_commit":"dd5f7b345c3c7df38d5edfba7e842941c77a3b4b"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidanthoff%2FElectron.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidanthoff%2FElectron.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidanthoff%2FElectron.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidanthoff%2FElectron.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidanthoff","download_url":"https://codeload.github.com/davidanthoff/Electron.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284918,"owners_count":20913691,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-08T18:05:29.775Z","updated_at":"2025-04-05T03:43:29.102Z","avatar_url":"https://github.com/davidanthoff.png","language":"Julia","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Electron\n\n[![Project Status: Active - The project has reached a stable, usable state and is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)\n[![Build Status](https://travis-ci.org/davidanthoff/Electron.jl.svg?branch=master)](https://travis-ci.org/davidanthoff/Electron.jl)\n[![Build status](https://ci.appveyor.com/api/projects/status/isid8hq7hq1vwmfn/branch/master?svg=true)](https://ci.appveyor.com/project/davidanthoff/electron-jl/branch/master)\n[![codecov](https://codecov.io/gh/davidanthoff/Electron.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/davidanthoff/Electron.jl)\n\n## Overview\n\n[Electron.jl](https://github.com/davidanthoff/Electron.jl) wraps the cross-platform desktop application framework [Electron](https://electronjs.org/). You can use it to build GUI applications in julia.\n\n## Alternatives\n\n[Blink.jl](https://github.com/JunoLab/Blink.jl) provides similar functionality (and was a major inspiration for this package!). The main difference between the two packages is that [Electron.jl](https://github.com/davidanthoff/Electron.jl) opts for a more minimalistic feature set than [Blink.jl](https://github.com/JunoLab/Blink.jl). Here are some key differences between the two packages:\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) does not have any web server functionality.\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) has no functionality to translate julia code to JavaScript.\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) uses named pipes for the communication between julia and the electron process (no more firewall warnings!).\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) doesn't integrate with the Juno stack of packages, [Blink.jl](https://github.com/JunoLab/Blink.jl) does in some way (that I don't understand).\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) has a high test coverage.\n* [Electron.jl](https://github.com/davidanthoff/Electron.jl) always installs a private copy of Electron during the build phase.\n\n## Installation\n\nYou can install the package with:\n\n````julia\nPkg.add(\"Electron\")\n````\n\n## Getting started\n\n[Electron.jl](https://github.com/davidanthoff/Electron.jl) introduces two fundamental types: ``Application`` represents a running electron application, ``Window`` is a visible UI window. A julia process can have arbitrarily many applications running at the same time, each represented by its own ``Application`` instance. If you don't want to deal with ``Application``s you can also just ignore them, in that case [Electron.jl](https://github.com/davidanthoff/Electron.jl) will create a default application for you automatically.\n\nTo create a new application, simply call the corresponding constructor:\n\n````julia\nusing Electron\n\napp = Application()\n````\n\nThis will start a new Electron process that is ready to open windows or run JavaScript code.\n\nTo create a new window in an existing application, use the ``Window`` constructor:\n\n````julia\nusing Electron, URIs\n\napp = Application()\n\nwin = Window(app, URI(\"file://main.html\"))\n````\n\nNote that you need to pass a URI that points to an HTML file to the ``Window`` constructor. This HTML file will be displayed in the new window.\n\nYou can update pre-existing ``Window`` using function ``load``:\n\n````julia\nload(win, URI(\"http://julialang.org\"))\nload(win, \"\"\"\n\u003cimg src=\"https://raw.githubusercontent.com/JuliaGraphics/julia-logo-graphics/master/images/julia-logo-325-by-225.png\"\u003e\n\"\"\")\n````\n\nYou can also call the ``Window`` constructor without passing an ``Application``, in that case [Electron.jl](https://github.com/davidanthoff/Electron.jl) creates a default application for you:\n\n````julia\nusing Electron, URIs\n\nwin = Window(URI(\"file://main.html\"))\n````\n\nYou can run JavaScript code both in the main or the render thread of a specific window. To run some JavaScript in the main thread, call the ``run`` function and pass an ``Application`` instance as the first argument:\n\n````julia\nusing Electron\n\napp = Application()\n\nresult = run(app, \"Math.log(10)\")\n````\n\nThe second argument of the ``run`` function is JavaScript code that will simply be executed as is in Electron.\n\nYou can also run JavaScript in the render thread of any open window by passing the corresponding ``Window`` instance as the first argument to ``run``:\n\n````julia\nusing Electron, URIs\n\nwin = Window(URI(\"file://main.html\"))\n\nresult = run(win, \"Math.log(10)\")\n````\n\nYou can send messages from a render thread back to julia by calling the javascript function ``sendMessageToJulia``. On the julia side, every window has a ``Channel`` for these messages. You can access the channel for a given window with the ``msgchannel`` function, and then use the standard julia API to take messages out of this channel:\n\n````julia\nusing Electron\n\nwin = Window()\n\nresult = run(win, \"sendMessageToJulia('foo')\")\n\nch = msgchannel(win)\n\nmsg = take!(ch)\n\nprintln(msg)\n````\n\n## Examples\n\nThe following packages currently use Electron.jl:\n\n* https://github.com/davidanthoff/DataVoyager.jl\n* https://github.com/davidanthoff/ElectronDisplay.jl\n\nPlease add any other packages that depend on Electron.jl to this list via\na pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanthoff%2Felectron.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidanthoff%2Felectron.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidanthoff%2Felectron.jl/lists"}