Repository navigation
Releases: AimesSoft/Bern
Release list
Bern 0.1.2
Fixes for lists and notices on Windows, and Android's Back for pages that close on Escape.
Fixes
- Windows: a list that fills after it first showed now shows its rows at once. A
ForEachin a column of a scroll view that was empty when the page appeared, its items arriving a moment later, stayed blank until the window changed size. - Windows, Linux and the web: a
Toastshows once. It came back whenever state it reads changed for another reason, such as a playback position every second. It now shows again only for a newkeyor text. - Android: Back runs the
escapeshortcut. On a phone or tablet the system Back, its button or gesture, runs theShortcut(key: "escape")active last before it leaves the app, so a page or layer that closes on Escape closes on Back too.
Install
cargo binstall bern-cli@0.1.2Apps pin the same version: bern = "=0.1.2".
修正 Windows 上的列表与提示,以及 Android 上按 Esc 关闭的页面对返回键的响应。
修正
- Windows:首次显示后才填充的列表立即显示各行。 滚动视图中某一列里的
ForEach,页面出现时还是空的、稍后才收到内容时,会一直空白,直到窗口改变大小。 - Windows、Linux 与网页:
Toast只出现一次。 它读取的状态因别的原因变化时(例如每秒变化的播放进度)它会再次出现,现在只在key或文字变化时才再次出现。 - Android:返回键运行
escape快捷键。 手机与平板上,系统的返回(按钮或手势)会先运行最后生效的Shortcut(key: "escape"),没有时才离开应用:按 Esc 关闭的页面或图层,按返回也会关闭。
安装
cargo binstall bern-cli@0.1.2应用固定同一个版本:bern = "=0.1.2"。
Bern 0.1.1
Progress rings, saving pictures to the user's photos, and pages that move across an iPhone's window without leaving a strip behind.
What's new
Progress(style: ring)draws progress as an arc in the accent color: from the top, clockwise, with round ends,widthacross andstroke_widththick, and a dot at the top before anything has arrived. It takes no input, so it can lie over a button in aStackand ring the button's own symbol. On every platform.bern::platform::save_image(path)saves a PNG or JPEG where the system keeps the user's photos, for other apps to pick from. Turn it on with[app].photos = true: iOS then asks the user the first time, with the reason in each supported language; Android 10 and later need no permission.refusedmeans the user did not allow it.- Pages that move across an iPhone's window (
appear/disappearwith amovetransition, such as a player page rising from the bottom) now cover the window under its bars all the way: no strip is left at the bottom when one has risen, the page stops at the top instead of overshooting, and one that sinks is gone at once instead of lingering at the bottom edge.
Install
cargo binstall bern-cli@0.1.1Apps pin the same version: bern = "=0.1.1". The files below are the bern command for each computer, as in 0.1.0.
进度环、把图片存到相册,以及在 iPhone 上移过窗口时不再留下一条的页面。
新增
Progress(style: ring)把进度画成主题色的一段弧:从顶部顺时针,两头是圆的,直径width、粗stroke_width;还没开始时是顶部的一个点。它不接收输入,可以在Stack里压在按钮上,圈住按钮自己的符号。所有平台都支持。bern::platform::save_image(path)把一张 PNG 或 JPEG 存到系统保存用户照片的地方,供其他应用选用。用[app].photos = true打开:iOS 第一次会询问用户,原因按每种支持的语言写好;Android 10 及以上不需要权限。refused表示用户没有允许。- 在 iPhone 上移过窗口的页面(用
move过渡的appear/disappear,例如从底部升起的播放页)现在全程铺满窗口、伸到栏下:升起后底部不再露出一条,停在顶部不会冲过头,收起时立刻离开,不再在底边停留。
安装
cargo binstall bern-cli@0.1.1应用固定同一个版本:bern = "=0.1.1"。下面的文件是各种电脑上的 bern 命令,与 0.1.0 相同。
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。