Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get examples running according to README #71

Merged
merged 5 commits into from
Oct 5, 2024

Conversation

matchai
Copy link
Contributor

@matchai matchai commented Aug 26, 2024

Hi there. Love the project!

In trying to run it locally, I saw the examples weren't building and running as described in the README.

Example Logs
plugy/examples/foo-plugin
❯ cargo build --target wasm32-unknown-unknown
   Compiling plugy v0.3.1 (/Users/matchai/dev/plugy)
   Compiling runner v0.3.1 (/Users/matchai/dev/plugy/examples/runner)
error[E0432]: unresolved import `plugy::runtime`
 --> examples/runner/src/lib.rs:2:12
  |
2 | use plugy::runtime::Plugin;
  |            ^^^^^^^ could not find `runtime` in `plugy`

error[E0432]: unresolved import `async_trait`
 --> examples/runner/src/lib.rs:1:5
  |
1 | use async_trait::async_trait;
  |     ^^^^^^^^^^^ use of undeclared crate or module `async_trait`

error[E0432]: unresolved import `xtra`
 --> examples/runner/src/lib.rs:4:5
  |
4 | use xtra::{Address, Handler};
  |     ^^^^ use of undeclared crate or module `xtra`

error[E0433]: failed to resolve: use of undeclared crate or module `xtra`
  --> examples/runner/src/lib.rs:22:19
   |
22 | #[derive(Default, xtra::Actor)]
   |                   ^^^^ use of undeclared crate or module `xtra`

error[E0433]: failed to resolve: use of undeclared crate or module `xtra`
  --> examples/runner/src/lib.rs:33:57
   |
33 | ...x: &mut xtra::Context<Self>) {
   |            ^^^^ use of undeclared crate or module `xtra`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `runner` (lib) due to 5 previous errors

The cause was missing dependencies in the wasm-32 build and an import from the runtime feature from within the plugin.

Here's a small PR getting things working as minimally as possible.

@geofmureithi geofmureithi merged commit 12e738d into geofmureithi:main Oct 5, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants