[docs](trx-plugin-example): update paths and references
Update dependency paths to new trx-backend and trx-frontend locations. Replace trx-bin references with trx-server/trx-client. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Stanislaw Grams <stanislawgrams@gmail.com>
This commit is contained in:
@@ -11,8 +11,8 @@ edition = "2021"
|
|||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
trx-backend = { path = "../../src/trx-backend" }
|
trx-backend = { path = "../../src/trx-server/trx-backend" }
|
||||||
trx-core = { path = "../../src/trx-core" }
|
trx-core = { path = "../../src/trx-core" }
|
||||||
trx-frontend = { path = "../../src/trx-frontend" }
|
trx-frontend = { path = "../../src/trx-client/trx-frontend" }
|
||||||
tokio = { workspace = true, features = ["full"] }
|
tokio = { workspace = true, features = ["full"] }
|
||||||
tracing = { workspace = true }
|
tracing = { workspace = true }
|
||||||
|
|||||||
@@ -16,4 +16,4 @@ mkdir -p plugins
|
|||||||
cp target/release/libtrx_plugin_example.* plugins/
|
cp target/release/libtrx_plugin_example.* plugins/
|
||||||
```
|
```
|
||||||
|
|
||||||
Run `trx-bin` with `TRX_PLUGIN_DIRS=./plugins` to discover the plugin.
|
Run `trx-server` or `trx-client` with `TRX_PLUGIN_DIRS=./plugins` to discover the plugin.
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ use trx_frontend::{register_frontend, FrontendSpawner};
|
|||||||
const BACKEND_NAME: &str = "example";
|
const BACKEND_NAME: &str = "example";
|
||||||
const FRONTEND_NAME: &str = "example-frontend";
|
const FRONTEND_NAME: &str = "example-frontend";
|
||||||
|
|
||||||
/// Entry point called by trx-bin when the plugin is loaded.
|
/// Entry point called by trx-server/trx-client when the plugin is loaded.
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern "C" fn trx_register() {
|
pub extern "C" fn trx_register() {
|
||||||
register_backend(BACKEND_NAME, example_backend_factory);
|
register_backend(BACKEND_NAME, example_backend_factory);
|
||||||
|
|||||||
Reference in New Issue
Block a user