Repository navigation
Bern 0.1.0
The first release of Bern. Write an app's logic and interface once in Rust, and Bern builds it as a native app for macOS, Windows, Linux, iOS and Android, and for the web.
Install
cargo binstall bern-clicargo-binstall downloads the bern built for your computer from this release. You can also download it below, unpack it and put bern on your PATH, or compile it with cargo install bern-cli.
| Your computer | File |
|---|---|
| Mac with Apple silicon | bern-aarch64-apple-darwin.tar.gz |
| Mac with an Intel chip | bern-x86_64-apple-darwin.tar.gz |
| Windows | bern-x86_64-pc-windows-msvc.zip |
| Windows on Arm | bern-aarch64-pc-windows-msvc.zip |
| Linux | bern-x86_64-unknown-linux-gnu.tar.gz |
| Linux on Arm | bern-aarch64-unknown-linux-gnu.tar.gz |
The Linux builds run on distributions with glibc 2.35 or later (Ubuntu 22.04, Debian 12 and newer) and use the system's libdbus. On a Mac, a bern downloaded with a browser is not signed: run xattr -d com.apple.quarantine bern once before using it.
Make an app
bern new my_app
cd my_app
bern runThe new app is a window with a counter. bern run builds it for this computer and starts it; bern doctor lists what this computer still needs for each platform. See the README for more.
Bern 的第一个版本。用 Rust 写一次应用的逻辑和界面,Bern 把它构建成 macOS、Windows、Linux、iOS、Android 上的原生应用,以及网页应用。
安装
cargo binstall bern-clicargo-binstall 会从这个版本下载适合你电脑的 bern。也可以在下面下载对应的文件,解压后把 bern 放进 PATH;或者用 cargo install bern-cli 自己编译。
| 你的电脑 | 文件 |
|---|---|
| Apple 芯片的 Mac | bern-aarch64-apple-darwin.tar.gz |
| Intel 芯片的 Mac | bern-x86_64-apple-darwin.tar.gz |
| Windows | bern-x86_64-pc-windows-msvc.zip |
| ARM 芯片的 Windows | bern-aarch64-pc-windows-msvc.zip |
| Linux | bern-x86_64-unknown-linux-gnu.tar.gz |
| ARM 芯片的 Linux | bern-aarch64-unknown-linux-gnu.tar.gz |
Linux 版需要 glibc 2.35 及以上(Ubuntu 22.04、Debian 12 及更新的发行版),并使用系统自带的 libdbus。在 Mac 上用浏览器下载的 bern 没有签名,第一次使用前运行一次 xattr -d com.apple.quarantine bern。
创建应用
bern new my_app
cd my_app
bern run新应用是一个带计数器的窗口。bern run 为这台电脑构建并启动它;bern doctor 列出这台电脑构建各个平台还缺什么。更多内容见 README。