fidius-test 0.2.0

Testing helpers for Fidius plugin authors and hosts
docs.rs failed to build fidius-test-0.2.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

Testing helpers for Fidius plugin authors and hosts.

This crate provides the infrastructure the Fidius codebase uses internally for its own tests, now exposed so downstream users don't have to reinvent the wheel. Add it under [dev-dependencies] and you get:

  • [dylib_fixture] — build a plugin crate's cdylib via cargo build, cached across tests in the same process. Optional signing via [DylibFixtureBuilder::signed_with].
  • [signing::fixture_keypair] — deterministic Ed25519 keypair for tests.
  • [signing::sign_dylib] — produce a .sig file next to a dylib.

Example

use fidius_test::dylib_fixture;
use fidius_host::PluginHost;

#[test]
fn loads_plugin() {
    let fixture = dylib_fixture("./path/to/my-plugin").build();
    let host = PluginHost::builder()
        .search_path(fixture.dir())
        .build()
        .unwrap();
    let plugins = host.discover().unwrap();
    assert!(!plugins.is_empty());
}