Files
oak-editor/crates/oak-plugin/examples/scan_probe.rs
T
Mike-Solar 244d5e860f
CI / Build & test (Windows) (push) Failing after 7s
workspace: kebab-case crates, app under crates/oak-app, shared versions
All crates take the oak-* kebab-case naming (oak-audio, oak-codec,
oak-common, oak-core, oak-ffmpeg-link, oak-node, oak-otio, oak-plugin,
oak-render, oak-storage, oak-task, oak-timeline, oak-undo), with the
lib identifiers rewritten (oakrender:: -> oak_render::, oakcore_rs:: ->
oak_core::, ...) across all 226 referencing files.

The GUI application moves from the workspace root into
crates/oak-app/: src/, build.rs (paths fixed for the new location) and
tests/ travel with it, the root Cargo.toml becomes workspace-only
([workspace] + workspace.package + profiles), and the app package
inherits the workspace version. The screenshots example becomes a
standalone crate examples/simple_player/ with its own Cargo.toml.

Every crate now inherits the single workspace version
(version.workspace = true), and the workflows' crate paths and the
build docs follow the renames.

Validated with a clean cargo check --workspace.
2026-08-22 16:58:37 +08:00

29 lines
1.1 KiB
Rust

//! Throwaway probe: scan the real system OFX directory and print what the
//! host actually discovers (diagnosing why the effect library is empty).
fn main() {
let host = oak_plugin::host::Host::global();
match host.cache.scan() {
Ok(()) => println!("scan: ok"),
Err(e) => println!("scan: FAILED: {e}"),
}
println!("plugins discovered: {}", host.cache.count());
// Direct probe: read the host-level props through the C suite table.
let suite = oak_plugin::suites::property::suite_v1();
unsafe {
let handle = &host.props as *const oak_plugin::property::PropertySet as *mut std::ffi::c_void;
let name = std::ffi::CString::new("OfxPropName").unwrap();
let mut out: *mut std::ffi::c_char = std::ptr::null_mut();
let stat = (suite.get_string)(handle, name.as_ptr(), 0, &mut out);
println!("direct propGetString(OfxPropName) -> {stat}");
if stat == 0 && !out.is_null() {
println!(" value: {:?}", std::ffi::CStr::from_ptr(out));
}
}
let registered = oak_plugin::node_factory::register_plugin_nodes();
println!("factory node types registered: {}", registered.len());
for id in &registered {
println!(" type_id={id}");
}
}