rust3ds / ctru-rs

Rust wrapper for libctru
https://rust3ds.github.io/ctru-rs/
Other
120 stars 18 forks source link

Unknown feature `horizon_thread_ext` and related thread errors #82

Closed starptr closed 1 year ago

starptr commented 1 year ago

Ran cargo 3ds run --address 192.168.1.2 --example thread-basic --features="std-threads" and there are 4 errors:

No pre-build std found, using build-std
   Compiling ctru-rs v0.7.1 (/home/ctru-rs/ctru-rs)
error[E0432]: unresolved import `std::os::horizon::thread`
 --> ctru-rs/examples/thread-basic.rs:5:23
  |
5 | use std::os::horizon::thread::BuilderExt;
  |                       ^^^^^^ could not find `thread` in `horizon`

error[E0433]: failed to resolve: could not find `thread` in `horizon`
  --> ctru-rs/examples/thread-basic.rs:16:34
   |
16 |     let prio = std::os::horizon::thread::current_priority();
   |                                  ^^^^^^ could not find `thread` in `horizon`

error[E0635]: unknown feature `horizon_thread_ext`
 --> ctru-rs/examples/thread-basic.rs:1:12
  |
1 | #![feature(horizon_thread_ext)]
  |            ^^^^^^^^^^^^^^^^^^

error[E0599]: no method named `priority` found for struct `Builder` in the current scope
  --> ctru-rs/examples/thread-basic.rs:21:14
   |
21 |             .priority(prio - 1)
   |              ^^^^^^^^ method not found in `Builder`

Any ideas why? Pointers appreciated :)

Meziu commented 1 year ago

We are still working towards merging threading support in the Rust’s ecosystem, but there are some issues we must first resolve with the API team. As such, the feature you wanted to use isn’t available yet, but you can test it out regardless by using this branch: https://github.com/AzureMarker/rust-horizon/tree/feature/horizon-threads

I suggest not trying any long-term projects with this API in mind since it could very easily change.