Git Product home page Git Product logo

thrust's Introduction

Logo Thrust

Chromium-based cross-platform / cross-language application framework

Thrust is require/import-able, it lets you distribute NodeJS, Go or Python GUI apps directly through their native package managers.

Thrust is based on Chromium's Content Module and is supported on Linux, MacOSX and Windows:

Cross-Platform Screenshots Screenshot of Thrust Getting Started example running on each major platform.

Thrust will be powering the next versions of Breach

To better understand what Thrust can do, check out JankyBrowser by @morganrallen, the cross-platform browser that fits in a gist:

npm install -g \
  https://gist.github.com/morganrallen/f07f59802884bcdcad4a/download

Table of Contents


Language bindings

Thrust's binary distribution exposes its API on the standard IO and language specific library packages automatically download the binary distribution at installation. Thrust is based on Chromium's content module and uses web-pages as its GUI.

All these Getting Started example work as is on each major platform (MacOSX, Windows, Linux)

NodeJS

Getting Started

First install with npm install node-thrust

require('node-thrust')(function(err, api) { 
  api.window({ root_url: 'https://breach.cc' }).show();
});
Library

Go

Getting Started

First download with go get -u github.com/miketheprogrammer/go-thrust/

package main

import (
	"github.com/miketheprogrammer/go-thrust/dispatcher"
	"github.com/miketheprogrammer/go-thrust/spawn"
	"github.com/miketheprogrammer/go-thrust/window"
)

func main() {
	spawn.Run()
	thrustWindow := window.NewWindow("http://breach.cc/", nil)
	thrustWindow.Show()
	thrustWindow.Maximize()
	thrustWindow.Focus()
	dispatcher.RunLoop()
}
Library

Python

Getting Started

First install with pip3 install pythrust [--user] (requires Python3)

import asyncio, pythrust

loop = asyncio.get_event_loop()
api = pythrust.API(loop)

asyncio.async(api.spawn())
asyncio.async(api.window({ 'root_url': 'http://breach.cc' }).show())

loop.run_forever()
Library

API Reference

The API reference as well as links to specific language bindings documentations are availble in the docs/ directory.


Architecture

[Thrust Architecture]

          (Platform)           [stdio]      (Your Implementation)
                                                                          
                                  #
               +--------------+   #       +-----------------------+  | 
               | Cocoa / Aura |   #   +---|    win3: (HTML/JS)    |  |
               +-------+------+   #   |  +-----------------------++  |
                       |          #   +--|    win2: (HTML/JS)    |   | cli
+------------+ +-------+------+   #   | +-----------------------++   |
|            +-+ thrust (C++) +-------+-+    win1: (HTML/JS)    |    |
| ContentAPI | +-------+------+   #     +-----------------------+    |
|            |         |          #                | (TCP/FS)      
| (Blink/v8) | +-------+------+   #     +-----------------------+    |
|            | + JSON RPC srv +---------+ Client App (any Lang) |    | srv
+------------+ +--------------+   #     +-----------------------+    |
                                  #

Community

Request for API
List of Thrust Users
Thrust7.5k Contest
  • 7.5k max Browser implementation based on Thrust. Coming soon. Ping [email protected] if interested! (Credits to @morganrallen for the awesome idea)
Getting Involved

Features & Roadmap

  • window creation create, show, close resize, minimize, maximize, ...
  • node.js, go node.js and go bindings libraries
  • window events close, blur, focus, unresponsive, crashed
  • cross-platform equivalent support on MacOSX, Windows and Linux
  • sessions off the record, custom storage path, custom cookie store
  • kiosk kiosk mode
  • application menu global application menu (MacOSX, X11/Unity)
  • webview webview tag (secure navigation, tabs management)
  • frameless frameless window and draggable regions
  • python python bindings library
  • tray icon tray icon native integration
  • remote thrust specific IPC mechanism for client/server communication
  • protocol specific protocol registration (file://, ...)
  • proxy enable traffic proxying (Tor, header injection, ...)

Building Thrust from Sources

You will generally don't need to build thrust yourself. A binary version of thrust should be automatically fetched by the library you're reyling on at installation.

To build thrust, you'll need to have python 2.7.x and git installed. You can then boostrap the project with:

./scripts/boostrap.py                                

Build both the Release and Debug targets with the following commands:

./scripts/update.py
./scripts/build.py

Note that bootstrap.py may take some time as it checks out brightray and downloads libchromiumcontent for your platform.

thrust's People

Contributors

nearsyh avatar morganrallen avatar dmitshur avatar markdalgleish avatar rosenfeld avatar eklavya avatar elimisteve avatar

Watchers

James Cloos avatar Andrew Kidoo avatar

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.