Skip to content

Commit b84acd2

Browse files
committed
prep workspace for crates.io release
- add SPDX metadata, URLs, keywords, and per-crate READMEs so every package inherits publish-ready info and uses versioned path deps - switch gimli/aya deps to crates.io releases to satisfy publish rules - add Aya attach shim so loader builds against the released API and keep README assets accessible via absolute URLs
1 parent 2e52393 commit b84acd2

File tree

23 files changed

+303
-499
lines changed

23 files changed

+303
-499
lines changed

Cargo.lock

Lines changed: 45 additions & 400 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,18 @@ members = [
1313
]
1414

1515
[workspace.package]
16-
version = "0.1.0"
16+
version = "0.1.1"
1717
edition = "2021"
18+
rust-version = "1.88"
1819
authors = ["swananan <[email protected]>"]
19-
license = "GPL"
20+
license = "GPL-3.0-only"
21+
description = "GhostScope brings DWARF-aware eBPF tracing to user-space binaries with a printf-like experience."
22+
readme = "README.md"
23+
repository = "https://github.com/swananan/ghostscope"
24+
homepage = "https://github.com/swananan/ghostscope"
25+
documentation = "https://github.com/swananan/ghostscope#readme"
2026
keywords = ["ebpf", "gdb", "dwarf", "debugger"]
27+
categories = ["development-tools::debugging", "development-tools::profiling"]
2128

2229
[workspace.dependencies]
2330
log = "0.4.22"
@@ -38,11 +45,11 @@ toml = "0.8"
3845
dirs = "5.0"
3946
object = "0.36"
4047

41-
gimli = { git = "https://github.com/gimli-rs/gimli", rev = "0c2a60c00792b4d3c31344d8b5d5c6e8d98b5dd5" }
42-
aya = { git = "https://github.com/aya-rs/aya", rev = "9261554e3c6ca37e401ec23a287a1ddf9cb1f26d" }
43-
aya-obj = { git = "https://github.com/aya-rs/aya", rev = "9261554e3c6ca37e401ec23a287a1ddf9cb1f26d" }
44-
aya-ebpf-bindings = { git = "https://github.com/aya-rs/aya", rev = "9261554e3c6ca37e401ec23a287a1ddf9cb1f26d" }
45-
aya-build = { git = "https://github.com/aya-rs/aya", rev = "9261554e3c6ca37e401ec23a287a1ddf9cb1f26d" }
48+
gimli = "0.31.1"
49+
aya = "0.13.1"
50+
aya-obj = "0.2.1"
51+
aya-ebpf-bindings = "0.1.1"
52+
aya-build = "0.1.2"
4653

4754
# Test dependencies
4855
tempfile = "3.8"

README-zh.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
11
<div align="center">
2-
<img src="assets/logo.png" alt="GhostScope Logo" width="200"/>
2+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/logo.png" alt="GhostScope Logo" width="200"/>
33
<h1 style="margin-top: 0.2em;">GhostScope</h1>
44
<h3>⚡ 下一代 eBPF 用户态运行时追踪器</h3>
55
<p>
6-
<strong>Printf 调试的进化</strong> — 无需停止和修改应用即可实时追踪
6+
<strong>Printf 调试的进化</strong> — 无需停止或修改应用即可实时追踪。
77
</p>
88

9-
<!-- 徽章 -->
109
<p>
11-
<img src="https://img.shields.io/badge/版本-0.1.0-blue.svg" alt="Version"/>
12-
<img src="https://img.shields.io/badge/协议-GPL-green.svg" alt="License: GPL"/>
10+
<img src="https://img.shields.io/badge/版本-0.1.1-blue.svg" alt="版本"/>
11+
<img src="https://img.shields.io/badge/协议-GPL-green.svg" alt="协议"/>
1312
<img src="https://img.shields.io/badge/Linux-4.4+-orange.svg" alt="Linux 4.4+"/>
1413
<img src="https://img.shields.io/badge/Rust-1.88.0-red.svg" alt="Rust 1.88.0"/>
1514
</p>
16-
1715
</div>
1816

1917
<br />
@@ -39,7 +37,7 @@ GhostScope 将编译后的二进制文件转变为可观测系统。在函数入
3937
<br />
4038

4139
<div align="center">
42-
<img src="assets/demo.gif" alt="GhostScope Demo" width="100%"/>
40+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/demo.gif" alt="GhostScope Demo" width="100%"/>
4341
<p><sub><i>实时追踪运行中的 nginx worker 进程</i></sub></p>
4442
</div>
4543

@@ -49,28 +47,28 @@ GhostScope 将编译后的二进制文件转变为可观测系统。在函数入
4947
<table>
5048
<tr>
5149
<td align="center" width="25%">
52-
<img src="assets/icons/performance.svg" width="60" alt="Performance"/>
50+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/performance.svg" width="60" alt="Performance"/>
5351
<br />
5452
<strong>零开销</strong>
5553
<br />
5654
<sub>仅需一次上下文切换 + eBPF 执行</sub>
5755
</td>
5856
<td align="center" width="25%">
59-
<img src="assets/icons/realtime.svg" width="60" alt="Real-time"/>
57+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/realtime.svg" width="60" alt="Real-time"/>
6058
<br />
6159
<strong>实时追踪</strong>
6260
<br />
6361
<sub>实时跟踪流</sub>
6462
</td>
6563
<td align="center" width="25%">
66-
<img src="assets/icons/dwarf.svg" width="60" alt="DWARF"/>
64+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/dwarf.svg" width="60" alt="DWARF"/>
6765
<br />
6866
<strong>DWARF 感知</strong>
6967
<br />
7068
<sub>完整调试信息支持</sub>
7169
</td>
7270
<td align="center" width="25%">
73-
<img src="assets/icons/rust.svg" width="60" alt="Rust"/>
71+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/rust.svg" width="60" alt="Rust"/>
7472
<br />
7573
<strong>Rust 构建</strong>
7674
<br />

README.md

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
11
<div align="center">
2-
<img src="assets/logo.png" alt="GhostScope Logo" width="200"/>
2+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/logo.png" alt="GhostScope Logo" width="200"/>
33
<h1 style="margin-top: 0.2em;">GhostScope</h1>
4-
<h3>⚡ Next-Generation eBPF Userspace Runtime Tracer</h3>
4+
<h3>⚡ Next-generation eBPF userspace runtime tracer</h3>
55
<p>
66
<strong>Printf debugging evolved</strong> — Real-time tracing without stopping your application.
77
</p>
88

9-
<!-- Badges -->
109
<p>
11-
<img src="https://img.shields.io/badge/version-0.1.0-blue.svg" alt="Version"/>
12-
<img src="https://img.shields.io/badge/license-GPL-green.svg" alt="License: GPL"/>
10+
<img src="https://img.shields.io/badge/version-0.1.1-blue.svg" alt="Version"/>
11+
<img src="https://img.shields.io/badge/license-GPL-green.svg" alt="License"/>
1312
<img src="https://img.shields.io/badge/Linux-4.4+-orange.svg" alt="Linux 4.4+"/>
1413
<img src="https://img.shields.io/badge/Rust-1.88.0-red.svg" alt="Rust 1.88.0"/>
1514
</p>
1615

17-
<!-- Language Switch -->
1816
<p>
1917
<a href="README-zh.md"><strong>中文文档</strong></a>
2018
</p>
21-
2219
</div>
2320

2421
<br />
@@ -44,7 +41,7 @@ The demo below shows GhostScope tracing an nginx worker process with debug infor
4441
<br />
4542

4643
<div align="center">
47-
<img src="assets/demo.gif" alt="GhostScope Demo" width="100%"/>
44+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/demo.gif" alt="GhostScope Demo" width="100%"/>
4845
<p><sub><i>Real-time tracing of a running nginx worker process</i></sub></p>
4946
</div>
5047

@@ -54,28 +51,28 @@ The demo below shows GhostScope tracing an nginx worker process with debug infor
5451
<table>
5552
<tr>
5653
<td align="center" width="25%">
57-
<img src="assets/icons/performance.svg" width="60" alt="Performance"/>
54+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/performance.svg" width="60" alt="Performance"/>
5855
<br />
5956
<strong>Zero Overhead</strong>
6057
<br />
6158
<sub>One context switch + eBPF execution</sub>
6259
</td>
6360
<td align="center" width="25%">
64-
<img src="assets/icons/realtime.svg" width="60" alt="Real-time"/>
61+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/realtime.svg" width="60" alt="Real-time"/>
6562
<br />
6663
<strong>Real-Time Tracing</strong>
6764
<br />
6865
<sub>Live trace streaming</sub>
6966
</td>
7067
<td align="center" width="25%">
71-
<img src="assets/icons/dwarf.svg" width="60" alt="DWARF"/>
68+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/dwarf.svg" width="60" alt="DWARF"/>
7269
<br />
7370
<strong>DWARF-Aware</strong>
7471
<br />
7572
<sub>Full debug info support</sub>
7673
</td>
7774
<td align="center" width="25%">
78-
<img src="assets/icons/rust.svg" width="60" alt="Rust"/>
75+
<img src="https://raw.githubusercontent.com/swananan/ghostscope/main/assets/icons/rust.svg" width="60" alt="Rust"/>
7976
<br />
8077
<strong>Built with Rust</strong>
8178
<br />

bins/dwarf-tool/Cargo.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@ version.workspace = true
44
edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
7+
rust-version.workspace = true
8+
readme = "README.md"
9+
repository.workspace = true
10+
homepage.workspace = true
11+
documentation.workspace = true
12+
keywords.workspace = true
13+
categories.workspace = true
14+
description = "Standalone helper binary for inspecting DWARF data with GhostScope parsers."
715

816
[[bin]]
917
name = "dwarf-tool"
1018
path = "src/main.rs"
1119

1220
[dependencies]
13-
ghostscope-dwarf = { path = "../../ghostscope-dwarf" }
14-
ghostscope-process = { path = "../../ghostscope-process" }
21+
ghostscope-dwarf = { version = "0.1.1", path = "../../ghostscope-dwarf" }
22+
ghostscope-process = { version = "0.1.1", path = "../../ghostscope-process" }
1523

1624
# Command line parsing
1725
clap.workspace = true

bins/dwarf-tool/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# dwarf-tool
2+
3+
`dwarf-tool` is a standalone binary that ships with GhostScope for inspecting DWARF information and validating the `ghostscope-dwarf` parser stack. It is useful when debugging symbol resolution without running the full tracing pipeline.
4+
5+
Usage examples and context can be found in the main documentation: <https://github.com/swananan/ghostscope#readme>.

ghostscope-compiler/Cargo.toml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
[package]
22
name = "ghostscope-compiler"
3-
version = "0.1.0"
4-
edition = "2021"
3+
version.workspace = true
4+
edition.workspace = true
5+
rust-version.workspace = true
6+
license.workspace = true
7+
authors.workspace = true
8+
readme = "README.md"
9+
repository.workspace = true
10+
homepage.workspace = true
11+
documentation.workspace = true
12+
keywords.workspace = true
13+
categories.workspace = true
14+
description = "Compiles GhostScope trace definitions into DWARF-aware eBPF programs ready for injection."
515

616
[dependencies]
717
inkwell = { version = "0.6.0", features = ["llvm18-1", "target-bpf"] }
@@ -12,7 +22,7 @@ tracing-log = { workspace = true }
1222
thiserror = { workspace = true }
1323
tracing-subscriber = { workspace = true }
1424
aya-ebpf-bindings = { workspace = true }
15-
ghostscope-dwarf = { path = "../ghostscope-dwarf" }
16-
ghostscope-protocol = { path = "../ghostscope-protocol" }
17-
ghostscope-platform = { path = "../ghostscope-platform" }
18-
ghostscope-process = { path = "../ghostscope-process" }
25+
ghostscope-dwarf = { version = "0.1.1", path = "../ghostscope-dwarf" }
26+
ghostscope-protocol = { version = "0.1.1", path = "../ghostscope-protocol" }
27+
ghostscope-platform = { version = "0.1.1", path = "../ghostscope-platform" }
28+
ghostscope-process = { version = "0.1.1", path = "../ghostscope-process" }

ghostscope-compiler/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ghostscope-compiler
2+
3+
`ghostscope-compiler` turns GhostScope trace definitions into DWARF-aware eBPF programs. It parses the DSL, performs DWARF resolution, and emits IR that targets LLVM's BPF backend.
4+
5+
## Build Requirements
6+
- LLVM 18.x with `llvm-config` available on `PATH` (or set `LLVM_CONFIG_PATH`)
7+
- The `inkwell` crate's `llvm18-1` feature expects a shared build; consult your package manager or build from source with `-DLLVM_ENABLE_PROJECTS=clang;lld`
8+
9+
If LLVM lives in a non-standard directory, export `LLVM_SYS_180_PREFIX` or `LLVM_CONFIG_PATH` before invoking Cargo. The top-level documentation explains the full workflow: <https://github.com/swananan/ghostscope#readme>.

ghostscope-dwarf/Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ edition.workspace = true
55
authors.workspace = true
66
license.workspace = true
77
keywords.workspace = true
8+
rust-version.workspace = true
9+
readme = "README.md"
10+
repository.workspace = true
11+
homepage.workspace = true
12+
documentation.workspace = true
13+
categories.workspace = true
14+
description = "DWARF parser and symbolizer used by GhostScope to resolve variables and types at runtime."
815

916
[dependencies]
1017
gimli.workspace = true
@@ -13,9 +20,9 @@ memmap2 = "0.9"
1320
anyhow.workspace = true
1421
tracing.workspace = true
1522
thiserror.workspace = true
16-
ghostscope-platform = { path = "../ghostscope-platform" }
17-
ghostscope-protocol = { path = "../ghostscope-protocol" }
18-
ghostscope-process = { path = "../ghostscope-process" }
23+
ghostscope-platform = { version = "0.1.1", path = "../ghostscope-platform" }
24+
ghostscope-protocol = { version = "0.1.1", path = "../ghostscope-protocol" }
25+
ghostscope-process = { version = "0.1.1", path = "../ghostscope-process" }
1926
rustc-demangle = "0.1"
2027
cpp_demangle = "0.4"
2128
rayon = "1.10"

ghostscope-dwarf/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# ghostscope-dwarf
2+
3+
`ghostscope-dwarf` parses DWARF data from ELF binaries so GhostScope can resolve variables, types, and addresses at runtime. It wraps `gimli`, `object`, `memmap2`, and symbol demanglers, and exposes async-friendly helpers for the rest of the workspace.
4+
5+
Consumers typically do not use this crate directly; it is re-exported via higher-level components. See the main GhostScope docs for usage examples: <https://github.com/swananan/ghostscope#readme>.

0 commit comments

Comments
 (0)