Closed sn99 closed 1 year ago
No.
(You didn't argument for this change, so I won't argument in my refusal)
@Narsil My bad, the changes include:
winapi
to windows-sys
: winapi
is no longer maintained in favor of windows-rs
which is provided by Microsoft itself. It should provide more robustness against future windows upgrade and better compile and runtime guaranteescargo.toml
release arguments especially lto=true
help libs further down the line to have certain optimizations enabledI'll reopen, since it does seem winapi
is not well maintained.
I am on a windows system and the last test seems to fail even on my machine, even before I made any changes:
PS C:\Users\sn99\Downloads\rdev-main\rdev-main> cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.06s
Running unittests src\lib.rs (target\debug\deps\rdev-c607d680501d202a.exe)
running 2 tests
test tests::test_keyboard_state ... ok
test windows::keycodes::test::test_reversible ... ok
test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
Running tests\listen_and_simulate.rs (target\debug\deps\listen_and_simulate-7e3563f7acb512d4.exe)
running 1 test
test test_listen_and_simulate ... FAILED
failures:
---- test_listen_and_simulate stdout ----
thread 'test_listen_and_simulate' panicked at 'assertion failed: `(left == right)`
left: `MouseMove { x: 0.0, y: 1.0 }`,
right: `MouseMove { x: 0.0, y: 0.0 }`', tests\listen_and_simulate.rs:39:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test_listen_and_simulate
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.10s
error: test failed, to rerun pass `--test listen_and_simulate`
I think the suggested changes are pretty good, I will look into them again tomorrow, windows-rs
has 2 parts windows
and windows-sys
, the differences are mentioned here https://kennykerr.ca/rust-getting-started/windows-or-windows-sys.html, do you want me to choose windows
rather than windows-sys
?
I think the suggested changes are pretty good, I will look into them again tomorrow,
windows-rs
has 2 partswindows
andwindows-sys
, the differences are mentioned here https://kennykerr.ca/rust-getting-started/windows-or-windows-sys.html, do you want me to choosewindows
rather thanwindows-sys
?
I think as a starter let's keep to windows-sys
. It's closer to what is already there so it will be easier to spot the core differences.
I will make separate pulls
Changes include migrating to windows-sys and cargo release optimizations