Skip to content

how to make example work? #1

@ultrasaurus

Description

@ultrasaurus

I'd like to understand how to put crate at the root. I did an experiment (see branch crate-root, but I couldn't figure out syntax for including the lib. Probably something really basic I'm missing here...

cargo run --example stdin

output

   Compiling add v0.1.0 (/Users/sallen/src/rust/clib)
error[E0432]: unresolved import `add`
 --> examples/stdin.rs:1:5
  |
1 | use add::add;
  |     ^^^ use of undeclared type or module `add`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0432`.
error: could not compile `add`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions