heavy-duty / znap

Performance-first Rust Framework to build APIs compatible with the Solana Actions Spec.
Apache License 2.0
63 stars 1 forks source link

Using path for dependencies breaks the generated executable #75

Closed danmt closed 3 months ago

danmt commented 3 months ago

Right now all CLI commands rely on copying the user's collection into the .znap folder, including additional dependencies and generating the binary files that will be used for serve and deploy. When path is used by a dependency, it breaks because it tries to refer to a path that cannot be reached from there.

Some of the options are:

Given that we want an examples folder to hold multiple entries and be able to use the same flow as end users, the first option seems to be the way to go.

To visualize the problem you can clone the repository, cd into examples/send-donation and run znap serve my-actions. Since it uses path for znap it will throw due to a reference to an invalid path. All examples will reference znap via relative path, it would be ideal if this just worked.