Revery

原生的、高性能的、跨平台的桌面应用程序 -- 用 Reason来构建!「Native, high-performance, cross-platform desktop apps - built with Reason」

Github stars Tracking Chart

Revery

合理构建原生的、高性能的、跨平台的桌面应用程序。

注:Revery是一项正在进行中的工作,正在积极开发中!

要体验 Revery,请查看我们在 playground 上的 JavaScript + WebGL 构建。不过,要想获得最佳体验,你还是要尝试一下本地构建。

动机

今天,Electron 是构建桌面应用的最流行工具之一 -- 使用 HTML、JS、CSS 堆栈。然而,它在 RAM 和 CPU 方面都有很重的占用 -- 基本上是将整个浏览器打包到应用程序中。即使有这样的权衡,它也有很多好的方面--它是构建跨平台应用的最快速的方法,并且提供了很好的开发体验 -- 它在 VSCode、Discord 和 Slack 等流行应用中的应用就可以证明这一点。

Revery 有点像超快的原生代码 Electron -- 捆绑了类似 React/Redux 的库和快速的构建系统 -- 一切都准备好了!Revery 是用 reasonml 构建的,它是一个很好的开发工具。

Revery 是用 reasonml 构建的,reasonml 是在 OCaml 之上的一种类似 javascript 的语法,这意味着 JS 开发者可以使用这种语言。

您的应用程序可以通过 Reason/OCaml 工具链编译成本地代码 -- 即时启动,性能堪比本地 C 代码。Revery 具有平台加速、GPU 加速的渲染功能。编译器本身也很快!

Revery 是一个实验 -- 我们能否在不牺牲性能的前提下,提供良好的开发者体验,帮助团队提高工作效率?

设计决定

  • 一致的跨平台行为

Electron 的一个主要价值在于,你可以一次性为所有平台开发。作为开发者,你有很大的信心,你的应用在不同平台上的外观和工作方式都是一样的。Revery 也是一样的 -- 除了平台特定的行为外,如果你的应用在另一个平台上的外观或行为不同,那就是一个bug! 因此,Revery 就像 flutter 一样,它不使用原生小部件。这对我们来说意味着更多的工作,但也意味着我们有更多的跨平台的可预测功能!

注:如果你正在寻找一些确实利用原生 widget 的东西,请查看 briskml。另一个选择是针对 Qtcuite OCaml 绑定。

  • 高效能

性能应该是最重要的,而不是妥协--我们需要开发和建立有助于确保一流性能和启动时间的基准。

  • 类型安全的功能代码

我们可能会为了性能而使用一些肮脏的可突变对象 -- 但我们的高级 API 应该是纯功能的。你应该能够遵循 React 模型,将你的 UI 建模为应用状态->UI 的纯函数。

入门

查看 revery-quick-start,开始使用您自己的 reverery 应用并进行操作

试试我们的互动游戏场

阅读我们的 文档

贡献

我们希望得到你的帮助,欢迎PR拉请求和贡献。

一些入门的办法:

许可证

Revery 是在 MIT 许可 下提供的。

Revery 根据其自身的许可条款捆绑了几个依赖项 -- 请参考 ThirdPartyLicenses.txt

贡献者

感谢每一位为 Revery 做出 贡献 的人!

支持者

感谢所有的支持者!祈祷【成为支持者】。



Overview

Name With Ownerrevery-ui/revery
Primary LanguageReason
Program languageOCaml (Language Count: 8)
PlatformLinux, Mac, Windows, Windows Subsystem for Linux (WSL)
License:MIT License
Release Count0
Created At2018-09-19 16:09:22
Pushed At2022-02-13 22:31:10
Last Commit At2021-08-27 19:11:44
Stargazers Count8.1k
Watchers Count80
Fork Count196
Commits Count888
Has Issues Enabled
Issues Count265
Issue Open Count93
Pull Requests Count743
Pull Requests Open Count20
Pull Requests Close Count65
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

:construction: NOTE: Revery is a work-in-progress and in active development! :construction:

To get a taste of Revery, check out our JavaScript + WebGL build on the playground. For the best experience, though, you'll want to try a native build.

Motivation

Today, Electron is one of the most popular tools for building desktop apps - using an HTML, JS, CSS stack. However, it has a heavy footprint in terms of both RAM and CPU - essentially packing an entire browser into the app. Even with that tradeoff, it has a lot of great aspects - it's the quickest way to build a cross-platform app & it provides a great development experience - as can be testified by its usage in popular apps like VSCode, Discord, and Slack.

Revery is kind of like super-fast, native code Electron - with bundled React-like/Redux-like libraries and a fast build system - all ready to go!

Revery is built with reasonml, which is a javascript-like syntax on top of OCaml This means that the language is accessible to JS developers.

Your apps are compiled to native code with the Reason / OCaml toolchain - with instant startup and performance comparable to native C code. Revery features platform-accelerated, GPU-accelerated rendering. The compiler itself is fast, too!

Revery is an experiment - can we provide a great developer experience and help teams be productive, without making sacrifices on performance?

Design Decisions

  • Consistent cross-platform behavior

A major value prop of Electron is that you can build for all platforms at once. You have great confidence as a developer that your app will look and work the same across different platforms. Revery is the same - aside from platform-specific behavior, if your app looks or behaves differently on another platform, that's a bug! As a consequence, Revery is like flutter in that it does not use native widgets. This means more work for us, but also that we have more predictable functionality cross-platform!

NOTE: If you're looking for something that does leverage native widgets, check out briskml. Another alternative is the cuite OCaml binding for Qt.

  • High performance

Performance should be at the forefront, and not a compromise - we need to develop and build benchmarks that help ensure top-notch performance and start-up time.

  • Type-safe, functional code

We might have some dirty mutable objects for performance - but our high-level API should be purely functional. You should be able to follow the React model of modelling your UI as a pure function of application state -> UI.

Getting Started

Contributing

We'd love your help, and welcome PRs and contributions.

Some ideas for getting started:

License

Revery is provided under the MIT License.

Revery bundles several dependencies under their own license terms - please refer to ThirdPartyLicenses.txt.

Contributors

Thanks to everyone who has contributed to Revery!

Backers

Thank you to all our backers! ? [Become a backer]

Built with Revery

Special Thanks

revery would not be possible without a bunch of cool tech:

revery was inspired by some awesome projects:

Hot reload

We don't have a Hot Reload yet but it is on our roadmap. In the meantime, you can check branch feat/hot-reload to see the progression.

In the meantime @mbernat has done a script that allow to relaunch the APP when the binary changed.

To the top