漂流
漂流
我觉得精简还是不够,不应该有长度的限制,应该直接传指针才对,如下: ```rust // 链接名为libsorting的静态库 #[link(name = "sorting", kind = "static")] extern { // 绑定CPP中的interop_sort函数 // 注意参数类型要和CPP中的类型相对应 fn interop_sort(arr: *const i32, n: u32); } // 对interop_sort函数的安全抽象 pub fn sort_from_cpp(arr: &[i32]) {...
If you feel that all the current examples are not enough, you can move to see this [project](https://github.com/driftluo/myblog), I think all the available functions have been used, and have been...
At that time, it was considered that the unit nanosecond is far less than seconds in frequency, and this is only a default item. If other units are required, you...
Emmm ... it is a good idea to export this library to C lib and then wrap it for work in Python, I will try to do it but the...
There is a library to [Rust binding to Python](https://github.com/PyO3/pyo3), but currently only supports nightly, I don't very want to use it. Probably still use ffi export to do, but this...
already yank
you can use `#[tokio::main(flavor = "multi_thread", worker_threads = 10)]` to specify [tokio](https://docs.rs/tokio/1.21.2/tokio/attr.main.html#multi-threaded-runtime) runtime worker thread or, you can use tokio + hyper to Build your own runtime configuration like this...
> The worker_threads option configures the number of worker threads, and defaults to the number of cpus on the system. If you want to change it during runtime, that is...
This question is also in [Pending](https://docs.rs/futures/0.3.16/futures/future/struct.Pending.html), which impl FusedFuture with always true. [select!](https://docs.rs/futures/0.3.16/futures/macro.select.html) will ignore it by Fuse::terminated() == true. https://github.com/rust-lang/futures-rs/blob/c0e936802828c37f8f961f91ed2c70c513878042/futures-macro/src/select.rs#L206 https://github.com/rust-lang/futures-rs/blob/c0e936802828c37f8f961f91ed2c70c513878042/futures-macro/src/select.rs#L314 https://github.com/rust-lang/futures-rs/blob/c0e936802828c37f8f961f91ed2c70c513878042/futures-macro/src/select.rs#L319 This problem can cause strange behavior: ```rust...
Sorry, 1.5w characters means 15 thousand characters > Chinese “万” => "wan" => w