Skip to content

Issue with getting started by following neynar docs #28

@cazeth

Description

@cazeth

I was following the documentation to get started with the rust sdk here and it required some fiddling to make it work so I thought I would let you know.

Firstly, this line generates an error:

cargo add --git https://github.com/neynarxyz/rust-sdk api

error: the crate api@https://github.com/neynarxyz/rust-sdk could not be found at https://github.com/neynarxyz/rust-sdk

If I change the line to
cargo add --git https://github.com/neynarxyz/rust-sdk neynar_sdk

the crates compiles without any code.

There are also a few issues with the code that you suggest to use in main.rs.

The first is that it uses reqwest and tokio so I need to run cargo add reqwest and cargo add tokio --features macros,rt-multi-thread

The second issue is that your main function does not have a return type and does not compile.

async fn main() -> {

I changed this to async fn main -> () to have a return type.

After this it worked for me.

All the best,

caz.eth

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions