Seed(https://seed-rs.org/) 也是一個前端 Web 開發框架。這是用 Seed 寫的一個前端網站(https://seed-rs-realworld.netlify.com/),這裏是一些相關的資源(https://github.com/MartinKavik/awesome-seed-rs)。html
Repo前端
這裏列舉一些,不完整,會不斷增長git
https://apps.karthikkaranth.me/spherro/github
https://lukaslueg.github.io/macro_railroad_wasm_demo/緩存
https://sandspiel.club/ 落沙遊戲安全
這篇文章https://iandouglasscott.com/2019/07/26/rust-safe-and-unsafe-as-theorems-and-axioms/ 做者從另外一個視角來探討了 Rust 中的 unsafe 的概念,他建議,能夠將 Rust Unsafe 類比看做數學上的公理和定理。基於這個觀點,作出了詳細的剖析。詳情請看原文。app
很簡單的思路,若是發現溢出了,結果就置爲 1。必定程度上,可保證計算安全,不會因爲偶然的緣由,致使系統崩潰。框架
好比:dom
use scalc::SCell;
fn main() {
let a = SCell::<i32>::new(12) * SCell::<i32>::new(3);
assert_eq!(*a.get_data(), 36);
// `error_tag` will be `true` in the presence of overflow behavior(s)
let a = SCell::<i32>::new(std::i32::MAX) + SCell::<i32>::new(1);
assert_eq!(a.is_overflowed(), true);
assert_eq!(*a.get_data(), 1);
}
https://github.com/XCH-CEB/xch-project/tree/master/scalcide
好比會給出這樣一個報告。
Total: 3.81 GB
107 installed binaries: 916.89 MB
Registry: 163.43 MB
Registry index: 156.47 MB
5 crate archives: 6.96 MB
Registry: dl.cloudsmith.io 4.18 KB
Registry index: 3.21 KB
1 crate archives: 971 B
Registry: github.com 1.34 GB
Registry index: 98.51 MB
5522 crate archives: 812.62 MB
743 crate source checkouts: 426.25 MB
Registry: home 478 B
Registry index: 478 B
Registry: ship.rs 478 B
Registry index: 478 B
Git db: 1.40 GB
138 bare git repos: 1.37 GB
6 git repo checkouts: 23.53 MB
還有相關其它配套功能。使用下面命令安裝:
cargo install cargo-cache
演示地址在這裏:https://vberger.github.io/Bayes-O-Matic/
講解文章在這裏:https://vberger.github.io/Bayes-O-Matic/help.html
這是一個例子:
use kmeans::*;
fn main() {
let (sample_cnt, sample_dims, k, max_iter) = (20000, 200, 4, 100);
// Generate some random data
let mut samples = vec![0.0f64;sample_cnt * sample_dims];
samples.iter_mut().for_each(|v| *v = rand::random());
// Calculate kmeans, using kmean++ as initialization-method
let kmean = KMeans::new(samples, sample_cnt, sample_dims);
let result = kmean.kmeans(k, max_iter, KMeans::init_kmeanplusplus, &mut rand::thread_rng());
println!("Centroids: {:?}", result.centroids);
println!("Cluster-Assignments: {:?}", result.assignments);
println!("Error: {}", result.distsum);
}
https://github.com/seijikun/kmean-rs
https://phaazon.net/blog/introducing-awoo 這篇文章,從風格上,我以爲挺詭異,沒看懂,各位看觀有興趣來點評一下?