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源創計劃」,歡迎正在閱讀的你也加入,一塊兒分享。編程