Skip to content

Commit 7294a85

Browse files
authored
build: Reorganize the workspace (#266)
Moves the main `symbolic` library into a workspace member and reorganizes all examples as workspace members. The main readme is temporarily duplicated until the new version is published.
1 parent 7efcc02 commit 7294a85

File tree

248 files changed

+367
-1360
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

248 files changed

+367
-1360
lines changed

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
# Rust
55
target/
66
**/*.rs.bk
7-
# Only ignore the library's lockfile, not for the CABI
8-
/Cargo.lock
7+
Cargo.lock
98

109
# Python
1110
*.pyc

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[submodule "minidump/third_party/breakpad"]
2-
path = minidump/third_party/breakpad
2+
path = symbolic-minidump/third_party/breakpad
33
url = https://github.com/getsentry/breakpad
44
shallow = true
55
[submodule "minidump/third_party/lss"]
6-
path = minidump/third_party/lss
6+
path = symbolic-minidump/third_party/lss
77
url = https://github.com/getsentry/linux-syscall-support

Cargo.toml

Lines changed: 7 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,9 @@
1-
[package]
2-
name = "symbolic"
3-
version = "7.5.0"
4-
license = "MIT"
5-
authors = [
6-
"Armin Ronacher <[email protected]>",
7-
"Jan Michael Auer <[email protected]>",
8-
]
9-
documentation = "https://docs.rs/symbolic"
10-
homepage = "https://github.com/getsentry/symbolic"
11-
repository = "https://github.com/getsentry/symbolic"
12-
readme = "README.md"
13-
description = """
14-
A library to symbolicate and process stack traces from native applications,
15-
minidumps, Unreal Engine 4, minified JavaScripts or ProGuard optimized Android apps.
16-
"""
17-
edition = "2018"
18-
autoexamples = true
19-
20-
include = [
21-
"/src/**/*.rs",
22-
"/*.toml",
23-
"/.gitmodules",
24-
"/LICENSE",
25-
"/README.md",
26-
]
27-
28-
[package.metadata.docs.rs]
29-
all-features = true
30-
311
[workspace]
2+
members = [
3+
"symbolic*",
4+
"examples/*",
5+
]
326

33-
[features]
34-
default = ["debuginfo"]
35-
common-serde = ["symbolic-common/serde"]
36-
debuginfo = ["symbolic-debuginfo"]
37-
debuginfo-serde = ["debuginfo", "common-serde"]
38-
demangle = ["symbolic-demangle"]
39-
minidump = ["symbolic-minidump", "debuginfo"]
40-
minidump-serde = ["minidump", "debuginfo-serde", "symbolic-minidump/serde"]
41-
proguard = ["symbolic-proguard"]
42-
sourcemap = ["symbolic-sourcemap"]
43-
symcache = ["symbolic-symcache", "debuginfo"]
44-
unreal = ["symbolic-unreal"]
45-
unreal-serde = ["unreal", "common-serde", "symbolic-unreal/serde"]
46-
47-
[dependencies]
48-
symbolic-common = { version = "7.5.0", path = "common" }
49-
symbolic-debuginfo = { version = "7.5.0", path = "debuginfo", optional = true }
50-
symbolic-demangle = { version = "7.5.0", path = "demangle", optional = true }
51-
symbolic-minidump = { version = "7.5.0", path = "minidump", optional = true }
52-
symbolic-proguard = { version = "7.5.0", path = "proguard", optional = true }
53-
symbolic-sourcemap = { version = "7.5.0", path = "sourcemap", optional = true }
54-
symbolic-symcache = { version = "7.5.0", path = "symcache", optional = true }
55-
symbolic-unreal = { version = "7.5.0", path = "unreal", optional = true }
56-
57-
[dev-dependencies]
58-
clap = "2.33.0"
59-
failure = "0.1.7"
60-
walkdir = "2.3.1"
61-
62-
[[example]]
63-
name = "addr2line"
64-
required-features = ["demangle"]
65-
66-
[[example]]
67-
name = "dump_cfi"
68-
required-features = ["minidump"]
69-
70-
[[example]]
71-
name = "minidump_stackwalk"
72-
required-features = ["minidump", "symcache", "demangle"]
73-
74-
[[example]]
75-
name = "symcache_debug"
76-
required-features = ["symcache", "demangle"]
77-
78-
[[example]]
79-
name = "unreal_engine_crash"
80-
required-features = ["unreal"]
7+
[profile.release]
8+
debug = true
9+
lto = true

Makefile

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ check: style lint
88

99
clean:
1010
cargo clean
11-
cargo clean --manifest-path cabi/Cargo.toml
1211
rm -rf .venv
1312
.PHONY: clean
1413

@@ -36,7 +35,7 @@ test: test-rust test-python
3635
.PHONY: test
3736

3837
test-rust:
39-
cargo test --all --all-features
38+
cargo test --workspace --all-features
4039
.PHONY: test-rust
4140

4241
test-python: .venv/bin/python
@@ -52,8 +51,7 @@ style: style-rust style-python
5251

5352
style-rust:
5453
@rustup component add rustfmt --toolchain stable 2> /dev/null
55-
cargo +stable fmt -- --check
56-
cd cabi && cargo +stable fmt -- --check
54+
cargo +stable fmt --all -- --check
5755
.PHONY: style-rust
5856

5957
style-python: .venv/bin/python
@@ -67,7 +65,7 @@ lint: lint-rust lint-python
6765

6866
lint-rust:
6967
@rustup component add clippy --toolchain stable 2> /dev/null
70-
cargo +stable clippy --all-features --all --tests --examples -- -D clippy::all
68+
cargo +stable clippy --all-features --workspace --tests --examples -- -D clippy::all
7169
.PHONY: lint-rust
7270

7371
lint-python: .venv/bin/python
@@ -82,8 +80,7 @@ format: format-rust format-python
8280

8381
format-rust:
8482
@rustup component add rustfmt --toolchain stable 2> /dev/null
85-
cargo +stable fmt
86-
cd cabi && cargo +stable fmt
83+
cargo +stable fmt --all
8784
.PHONY: format-rust
8885

8986
format-python: .venv/bin/python

README.md

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -40,31 +40,7 @@ Symbolic provides the following functionality:
4040

4141
## Rust Usage
4242

43-
Add `symbolic` as a dependency to your `Cargo.toml`. You will most likely want to activate some of
44-
the features:
45-
46-
- **`debuginfo`** (default): Contains support for various object file formats and debugging
47-
information. Currently, this comprises MachO and ELF (with DWARF debugging), PE and PDB, as well
48-
as Breakpad symbols.
49-
- **`demangle`**: Demangling for Rust, C++, Swift and Objective C symbols. This feature requires a
50-
C++14 compiler on the PATH.
51-
- **`minidump`**: Rust bindings for the Breakpad Minidump processor. Additionally, this includes
52-
facilities to extract stack unwinding information (sometimes called CFI) from object files. This
53-
feature requires a C++11 compiler on the PATH.
54-
- **`proguard`**: Processing of Proguard mapping files to look up mangled Java function paths.
55-
- **`sourcemap`**: Processing and expansion of JavaScript source maps, as well as lookups for
56-
minified function names.
57-
- **`symcache`**: An optimized, platform-independent storage for common debugging information. This
58-
allows blazing fast symbolication of instruction addresses to function names and file locations.
59-
- **`unreal`**: Processing of Unreal Engine 4 crash reports.
60-
61-
There are also alternate versions for some of the above features that additionally add
62-
implementations for `serde::{Deserialize, Serialize}` on suitable types:
63-
64-
- **`common-serde`**
65-
- **`debuginfo-serde`**
66-
- **`minidump-serde`**
67-
- **`unreal-serde`**
43+
The Rust crates are published to [Crates.io](https://crates.io/crates/symbolic) and documentation is available on [docs.rs](https://docs.rs/symbolic/latest/symbolic/).
6844

6945
## Python Usage
7046

0 commit comments

Comments
 (0)