icanwalkonwater / libaria2-rs

Rust bindings to libaria2.
Apache License 2.0
11 stars 2 forks source link

libaria2-rs

Provides unsafe rust bindings for aria2.

Goals and non-goals

Roadmap

(unsafe) refers to libaria2-sys whereas (safe) refers to libaria2.

Testing

Since libaria2 make heavy use of static objets and don't seem to be able to be init and deinit multiple times in the same process, tests are run in a different process (1 process per test).

The special harness that forks and wait for the test result has some limitations:

Thanks to this harness, you can just cargo test like usual on unix but you'll need the workaround to inspect any failure.

Workaround

You can still run 1 test and disable the harness to have it run like a normal test.

For example:

NO_HARNESS=1 cargo test --test ffi session_create