mlua v0.4 released with Lua 5.4 support https://github.com/khvzak/mlua
MiniCouchDB: implementing a subset of CouchDB in Rust https://www.garrensmith.com/blogs/mini-couch-hack-week https://github.com/garrensmith/couch_hack_week
Benchrs: Apache Benchmark(ab) clone in rust https://crates.io/crates/benchrs
Benchrs 0.1.7
Arkaitz Jimenez <arkaitzj@gmail.com>
Does http benchmarks
USAGE:
benchrs [FLAGS] [OPTIONS] <url>
FLAGS:
-h, --help Prints help information
-k Enables keep alive
-V, --version Prints version information
-v Increases verbosity
OPTIONS:
-c <concurrency> Sets the concurrency level
-H <header>... Sets a custom header
-m <method> Request method: default GET
-p <postfile> File attach as request body
-n <request number> Sets the number of requests
ARGS:
<url> The url to hit
Getting started with Rust/WinRT https://kennykerr.ca/2020/06/05/getting-started-with-rust-winrt/
rustup which is a tool for installing Rust toolchains and common Rust related tooling.Ctrl+Shift+X打开扩展页安装下面的extensions:C:\>cargo new sample
Created binary (application) `sample` package
C:\>cd sample
C:\sample>code .
[dependencies]
winrt = "0.7.0"
C:\sample>cargo build
Updating crates.io index
Compiling proc-macro2 v1.0.18
Compiling unicode-xid v0.2.0
...
Compiling winrt_gen_macros v0.7.0
Compiling winrt_gen v0.7.0
Compiling winrt_macros v0.7.0
Compiling winrt v0.7.0
Compiling sample v0.1.0 (C:\sample)
Finished dev [unoptimized + debuginfo] target(s) in 19.65s
C:\sample>cargo run
Finished dev [unoptimized + debuginfo] target(s) in 0.06s
Running `target\debug\sample.exe`
Hello, world!
winrt::import!(
dependencies
os
types
windows::data::xml::dom::*
);
os表示需要运行的操作系统,也可以指定特定版本的Windows SDK。然后指定了官方文档中的一些类型windows::data::xml::dom 下面还有用了XmlDocument,具体的细节可以参考官方文档:fn main() -> winrt::Result<()> {
use windows::data::xml::dom::*;
let doc = XmlDocument::new()?;
doc.load_xml("<html>hello world</html>")?;
let root = doc.document_element()?;
assert!(root.node_name()? == "html");
assert!(root.inner_text()? == "hello world");
Ok(())
}
C:\sample>cargo run
Compiling sample v0.1.0 (C:\sample)
Finished dev [unoptimized + debuginfo] target(s) in 8.71s
Running `target\debug\sample.exe`
Windows API了。Animal Fight Chess Game written in rust. https://github.com/netcan/AnimalChess
git clone https://github.com/netcan/AnimalChess.git
cd AnimalChess
cargo run --release
原文作者:Rust语言中文社区;如有侵权,请联系管理员删除。