$rustc simple.rs
error:
error[E0433]: failed to resolve: use of undeclared type or module gimli
--> simple.rs:40:10
|
40 | ) -> gimli::EndianSlice<'a, gimli::RunTimeEndian> =
| ^^^^^ use of undeclared type or module gimli
error[E0433]: failed to resolve: use of undeclared type or module gimli
--> simple.rs:40:33
|
40 | ) -> gimli::EndianSlice<'a, gimli::RunTimeEndian> =
| ^^^^^ use of undeclared type or module gimli
error[E0433]: failed to resolve: use of undeclared type or module gimli
--> simple.rs:41:20
|
41 | &|section| gimli::EndianSlice::new(&*section, endian);
| ^^^^^ use of undeclared type or module gimli
In particular, cargo run --example simple should run the simple.rs example from the directory with the gimli sources, if that's what you're trying to do.
If you are building the gimli package itself, you don't need to add any dependencies or edit any files. Just run cargo run --example simple in an unmodifed copy of the gimli repository.
If you want to create a new package that depends on gimli, you can use cargo new to create the package, then add the dependency to Cargo.toml and paste the example code into src/main.rs.