Skip to content

Commit 66872d6

Browse files
authored
Merge pull request #16 from aimdb-dev/3-core-dberror-type-definition
3 core dberror type definition
2 parents 34e8e1d + 7425503 commit 66872d6

7 files changed

Lines changed: 740 additions & 16 deletions

File tree

CONTRIBUTING.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,16 @@ AimDB is an async, in-memory database designed for real-time data synchronizatio
4949
- `make doc` - Generate and open documentation
5050
- `make clean` - Clean build artifacts
5151

52+
### Security and License Auditing
53+
54+
AimDB uses `cargo deny` for dependency auditing:
55+
56+
```bash
57+
cargo deny check # Full audit (advisories, licenses, bans)
58+
cargo deny check licenses # License compliance only
59+
cargo deny check advisories # Security advisories only
60+
```
61+
5262
## Code Standards
5363

5464
### Rust Guidelines
@@ -170,7 +180,12 @@ cargo test test_name --all-features
170180
make test
171181
```
172182

173-
3. **Check documentation:**
183+
3. **Check license compliance:**
184+
```bash
185+
cargo deny check # Verify dependencies meet license requirements
186+
```
187+
188+
4. **Check documentation:**
174189
```bash
175190
make doc
176191
```
@@ -229,6 +244,38 @@ examples/quickstart/ # Demo application
229244
- **Discussions**: Use GitHub discussions for general questions
230245
- **Code Review**: All PRs require review before merging
231246

247+
## License Compliance
248+
249+
### Dependency Licensing
250+
251+
AimDB follows a permissive licensing strategy compatible with commercial use. The project accepts dependencies with these licenses:
252+
253+
- **Primary**: MIT, Apache-2.0 (preferred for new dependencies)
254+
- **Compatible**: BSD-2-Clause, BSD-3-Clause, ISC
255+
- **Unicode Data**: Unicode-3.0, Unicode-DFS-2016 (for Unicode processing crates)
256+
257+
### Adding Dependencies
258+
259+
Before adding new dependencies:
260+
261+
1. **Check the license** with `cargo deny check`
262+
2. **Ensure compatibility** with our allowed licenses in `deny.toml`
263+
3. **Avoid copyleft licenses** (GPL, LGPL, etc.) that could restrict commercial use
264+
4. **Document the rationale** for any new license additions in your PR
265+
266+
If you need to add a dependency with a new license:
267+
- Verify it's OSI-approved and business-friendly
268+
- Update `deny.toml` to include the new license
269+
- Explain the necessity in your PR description
270+
271+
### License Audit
272+
273+
Run license checks as part of development:
274+
```bash
275+
cargo deny check licenses # Check license compliance
276+
make check # Includes all development checks
277+
```
278+
232279
## Code of Conduct
233280

234281
Please be respectful and constructive in all interactions. We're building this project together and want everyone to feel welcome to contribute.

Cargo.lock

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

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ members = [
44
"aimdb-connectors",
55
"aimdb-adapters",
66
"tools/aimdb-cli",
7-
"examples"
7+
"examples",
88
]
99
resolver = "2"
1010

@@ -27,7 +27,7 @@ tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] }
2727
serde = { version = "1.0", features = ["derive"] }
2828

2929
# Error handling
30-
thiserror = "1.0"
30+
thiserror = "2.0.16"
3131

3232
# Basic observability
3333
tracing = "0.1"
@@ -43,4 +43,4 @@ tokio-test = "0.4"
4343

4444
[workspace.metadata.docs.rs]
4545
all-features = true
46-
rustdoc-args = ["--cfg", "docsrs"]
46+
rustdoc-args = ["--cfg", "docsrs"]

aimdb-core/Cargo.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,14 @@ edition.workspace = true
55
license.workspace = true
66
description = "Core database engine for AimDB - async in-memory storage with real-time synchronization"
77

8+
[features]
9+
default = ["std"]
10+
std = ["thiserror"]
11+
812
[dependencies]
13+
# Error handling - only for std environments
14+
thiserror = { workspace = true, optional = true }
15+
16+
[dev-dependencies]
17+
# For no_std testing
18+
heapless = "0.9.1"

0 commit comments

Comments
 (0)