Giter Site home page Giter Site logo

bamidev / browser-window Goto Github PK

View Code? Open in Web Editor NEW
39.0 1.0 6.0 2.44 MB

A simple, cross-platform, optionally async, optionally threadsafe, electron-like browser window framework for Rust.

License: MIT License

Rust 70.94% C 15.28% C++ 13.04% Shell 0.43% Batchfile 0.03% PowerShell 0.29%
rust async browser gui chromium-embedded-framework cef electron edge web webkitgtk

browser-window's Introduction

BrowserWindow

BrowserWindow is a simple Rust crate for utilizing a browser engine to create a graphical user interface. Just like Electron.js, you can use it to build a GUI with HTML, CSS & JS, or just to have some basic browser functionality at your disposal.

Introduction

BrowserWindow is designed to be easy to use, and work cross-platform. It utilizes the async/await syntax & it even has optional thread-safe handles. There are currently three different underlying browser frameworks that can be selected: CEF, WebkitGTK or Edge WebView2. Each framework has their pros and cons, but CEF will be the most feature complete because it has the best cross-platform support and the browser engine is regularely updated. However, if you only need some very basic functionality, the other frameworks are easier to set up.

You can look at some examples to get an idea how you can use the api.

Getting Started

The underlying browser framework does need some things to be set up on your system (although Edge WebView2 may out-of-the-box on newer Windows installations). But otherwise there is a guide to get you started with using BrowserWindow on your system.

License

This software is available as open source software under a MIT license, for maximum freedom and minimum restrictions.

Missing a feature?

At the moment, there is a decent set of basic functionality available, but if you need something that isn't there yet, please submit an issue for it.

browser-window's People

Contributors

bamidev avatar mohsen7s 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

Watchers

 avatar

browser-window's Issues

Add further window options (decorate, keep_above)

Thanks for the great crate!

Is there a way you could add further window options? I especially would need the option to remove window decorations (gtk_window_set_decorated) and the option to always keep the window on top (gtk_window_set_keep_above).

A dumb question: Can we add html tags and or change/set CSS dynamically from rust during runtime?

Browser-Window seems promising but before diving in it full time, I really want to know if it is possible to modify UI from rust side in runtime.

Also, I want to know that if a user clicks on a specific Button then is there any way to receive that event and recognize that specific Button click in rust side?

If YES! Then door is wide open for start using Browser-Window! Actually I am searching for functionality more or less like https://github.com/sciter-sdk/rust-sciter

win32 window implementation in Rust

Currently, there is a window implementation written for win32. It is used when using the browser framework Edge WebView2. It also used to be used in combination with CEF for Windows. But since the latter combination is pretty broken, it's really only used with Edge WebView2 now.
So it shouldn't be too invasive to move the win32 code into the rust side of things.

The benefit of this is that cross-compilation doesn't need the win32 header files to be available for the mingw compiler anymore. The other benefit would be that compilation for Edge WebView2 doesn't need to be done in a MSVC developer console necessarily.

Build Fail in Windows 10 msvc toolchain

Hi, Danny, when i run cargo build, i got following error message:

Compiling browser-window-c v0.0.10 (D:\Rust\browser-window\c)
error: failed to run custom build command for `browser-window-c v0.0.10 (D:\Rust\browser-window\c)`

Caused by:
  process didn't exit successfully: `D:\Rust\browser-window\target\debug\build\browser-window-c-59ba6528bd190887\build-script-build` (exit code: 101)
  --- stderr
  thread 'main' panicked at 'Seperate executable compiler failed with error code 2.', c\build.rs:298:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My PC OS is Windows 10 64bit, and CEF is cef_binary_96.0.16+g89c902b+chromium-96.0.4664.55_windows64.tar.bz2, Thanks.

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.