pu369com

09 2021 档案

rust error: linking with `link.exe` failed: exit code: 1181(未解决)
摘要:win10 +nightly 之前写rust代码一直没问题。 由于需要用https://crates.io/crates/iconv库,结果出现了: rust error: linking with `link.exe` failed: exit code: 1181(省略... ...) = no 阅读全文

posted @ 2021-09-15 16:53 pu369com 阅读(4012) 评论(0) 推荐(0) 编辑

Building a Concurrent Web Server with Async Rust
摘要:src/main.rs use std::fs; use std::io::prelude::*; use std::net::TcpListener; use std::net::TcpStream; fn main() { // Listen for incoming TCP connectio 阅读全文

posted @ 2021-09-13 16:45 pu369com 阅读(43) 评论(0) 推荐(0) 编辑

Asynchronous Programming in Rust
摘要:根据 Asynchronous Programming in Rust (https://rust-lang.github.io/async-book/01_getting_started/04_async_await_primer.html) 整理的代码: use futures::executo 阅读全文

posted @ 2021-09-13 15:11 pu369com 阅读(90) 评论(0) 推荐(0) 编辑

rust thread '<main>' has overflowed its stack in Rust
摘要:在子线程中,写成这样就不提示溢出了 use std::thread; use std::time::Duration; fn main() { let handle = thread::Builder::new().stack_size(2 * 1024 * 1024 * 1024 ).spawn( 阅读全文

posted @ 2021-09-10 16:29 pu369com 阅读(434) 评论(0) 推荐(0) 编辑

Cargo 工作空间
摘要:参考:https://www.cntofu.com/book/192/src/ch14-03-cargo-workspaces.md 要点: 1、在目录名为add的根目录(或者叫workspaces)下的Cargo.toml,称为顶级Cargo.toml 其中[workspace]字段指明了工作空间 阅读全文

posted @ 2021-09-09 17:17 pu369com 阅读(129) 评论(0) 推荐(0) 编辑

rust windows-rs 调用GetLogicalDriveStringsW显示硬盘目录
摘要:win10系统 Cargo.toml [dependencies] windows = "0.19" encoding = "0.2" [build-dependencies] windows = "0.19" main.rs mod bindings { windows::include_bind 阅读全文

posted @ 2021-09-09 11:21 pu369com 阅读(630) 评论(0) 推荐(0) 编辑

rust win32api EnumWindows
摘要:1 Cargo.toml [package] name = "hellowinapi" version = "0.1.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/carg 阅读全文

posted @ 2021-09-07 17:59 pu369com 阅读(569) 评论(0) 推荐(0) 编辑

RUST编写和调用DLL
摘要:1 执行 cargo new hellolib --lib 创建库项目 修改 cargo.toml [lib] name = "myfirst_rust_dll" #生成dll的文件名 crate-type = ["dylib"] lib.rs #[no_mangle] pub extern fn 阅读全文

posted @ 2021-09-07 16:30 pu369com 阅读(8648) 评论(0) 推荐(0) 编辑

rust 高阶函数 (high order function)
摘要:手机抄代码都费劲,一是用firefox登不上博客园,因为光标定位在密码框中时弹不出手机键盘,换uc好了。二是比如输入大括号时,手机总自做聪明地错误添加或删除成对的括号(这个可以修改输入法设置)。要感谢rust playground和uc,让我们在手机上也能调试代码。 所谓高阶函数,就是函数中可以传入 阅读全文

posted @ 2021-09-04 23:49 pu369com 阅读(260) 评论(0) 推荐(0) 编辑

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示