Skip to content

Commit

Permalink
Update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
romainthomas committed Jul 21, 2024
1 parent a366089 commit 9f7230e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 12 deletions.
33 changes: 33 additions & 0 deletions api/rust/cargo/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
# LIEF Rust Bindings

These are the offical rust bindings for LIEF.

![LIEF Architecture](https://raw.githubusercontent.com/lief-project/LIEF/main/.github/images/architecture.png)

## Getting Started

```toml
[dependencies]
lief = = "0.15.0"
```

The bindings require Rust edition 2021 and `rustc >= 1.74.0`

```rust
use lief;

if let Some(lief::Binary::ELF(elf)) = lief::Binary::from(&mut file) {
println!("Dependencies:");
for entry in elf.dynamic_entries() {
if let dynamic::Entries::Library(lib) = entry {
println!(" - {}", lib.name());
}
}
println!("Versions:");
for version in elf.symbols_version_requirement() {
println!(" From {}", version.name());
for aux in version.auxiliary_symbols() {
println!(" - {}", aux.name());
}
}
}
```
17 changes: 11 additions & 6 deletions api/rust/cargo/lief/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
[package]
name = "lief"
description = "Official Rust bindings for LIEF"
edition = "2021"
version.workspace = true
authors.workspace = true
license.workspace = true
name = "lief"
description = "Official Rust bindings for LIEF"
edition = "2021"
version.workspace = true
authors.workspace = true
license.workspace = true
readme.workspace = true
homepage.workspace = true
keywords.workspace = true
repository.workspace = true
categories.workspace = true

[lib]
doctest = false
Expand Down
6 changes: 0 additions & 6 deletions doc/sphinx/api/rust/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
:fa:`brands fa-rust` Rust
======================================

.. warning::

LIEF Rust bindings are still in a beta version and not published yet on crate.io.
Thus, you should specify LIEF as a dependency of your project using
``git`` or ``path`` while the binding are not officially released.

.. code-block:: toml
[package]
Expand Down

0 comments on commit 9f7230e

Please sign in to comment.