Skip to content

Commit c4e3ab0

Browse files
committed
Add some docs about the C API
1 parent 1ccd9b4 commit c4e3ab0

File tree

1 file changed

+27
-1
lines changed

1 file changed

+27
-1
lines changed

README.md

+27-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,35 @@
11
# rustc-demangle
22

3-
Symbol demangling for Rust
3+
Demangling for Rust symbols, written in Rust.
44

55
[Documentation](https://docs.rs/rustc-demangle)
66

7+
## Usage
8+
9+
You can add this as a dependency via your `Cargo.toml`
10+
11+
```toml
12+
[dependencies]
13+
rustc-demangle = "0.1"
14+
```
15+
16+
and then be sure to check out the [crate
17+
documentation](https://docs.rs/rustc-demangle) for usage.
18+
19+
## Usage from non-Rust languages
20+
21+
You can also use this crate from other languages via the C API wrapper in the
22+
`crates/capi` directory. This can be build with:
23+
24+
```sh
25+
$ cargo build -p rustc-demangle-capi --release
26+
```
27+
28+
You'll then find `target/release/librustc_demangle.a` and
29+
`target/release/librustc_demangle.so` (or a different name depending on your
30+
platform). These objects implement the interface specified in
31+
`crates/capi/include/rustc_demangle.h`.
32+
733
# License
834

935
This project is licensed under either of

0 commit comments

Comments
 (0)