Castor: 微型互联网浏览器 (Gemini, Gopher, Finger)
Castor: A Browser for the small internet (Gemini, Gopher, Finger) https://sr.ht/~julienxx/Castor/
-
openssl -
gtk+3 -
gdk-pixbuf -
pango -
atk -
cairo
-
运行 make
就能够编译Castor -
安装: sudo make install
-
运行Castorr而后输入 gemini://gemini.circumlunar.space
就能够开始在网上冲浪了!~
-
apt install build-essential rustc cargo libgtk-3-dev libgdk-pixbuf2.0-dev libssl-dev
-
make & make install
~/.config/castor/settings.toml
设置文件,支持用12进制,纯颜色甚至emojis!
[general]start_url = "gemini://gemini.circumlunar.space/capcom"
[colors]h1 = "red"h2 = "#FF6347"h3 = "green"list = "#C71585"text = "#FF1493"background = "#FFC0CB"
[characters]h1 = ">"h2 = "))"h3 = "}}}"list = "🌼"
[monospace]gemini=falsegopher=truefinger=true
抽象化了的WebAssembly便是平台
WebAssembly as a Platform for Abstraction https://users.rust-lang.org/t/wasm-as-a-platform-for-abstraction/35736 http://adventures.michaelfbryan.com/posts/wasm-as-a-platform-for-abstraction/?utm_source=users-forum&utm_medium=social&utm_campaign=wasm-platform-for-abstraction
WebAssembly as a Platform for Abstraction
.
Rust的循环; 从嵌套循环中中断退出
Loops in Rust; Breaking From Nested Loops https://qvault.io/2020/05/14/loops-in-rust-breaking-from-nested-loops/
fn main() { for x in 0..10 { println!("{}", x); }}
0123456789
for var in iterator { // do stuff}
for i := 0; i < 10; i++ { fmt.Println(i)}
for x in 0..10 { if x > 5 && x < 7 { continue } println!("{}", x);}
continue
都是跟全部语言同样,在这个例子中当
x>5
而且
x<7
的时候在循环中
continue
到下一个iteration中而不打印,这样结果是:
012345789
for x in 0..10 { if x > 5{ break } println!("{}", x);}打印结果:
012345
'outer: for x in 0..5 { for y in 0..5 { if y > 2{ break 'outer } println!("x: {}, y: {}", x, y); }}打印:
x: 0, y: 0x: 0, y: 1x: 0, y: 2
--
javascript
From 日报小组 BobQinjava
-
Rustcc论坛: 支持rss -
微信公众号:Rust语言中文社区
本文分享自微信公众号 - Rust语言中文社区(rust-china)。
若有侵权,请联系 support@oschina.cn 删除。
本文参与“OSC源创计划”,欢迎正在阅读的你也加入,一块儿分享。编程