Skip to content

Commit 2acb7fb

Browse files
committed
Update GEMINI.md, rename to AGENTS.md
This change improves the AGENTS.md (previously GEMINI.md) file to provide better context for AI agents working on the dcsctp library. This ensures generated code adheres to the library's design principles and reduces the likelihood of agents suggesting incompatible patterns. It's reduced in size, and only containing the important instructions.
1 parent a9243f8 commit 2acb7fb

File tree

2 files changed

+38
-64
lines changed

2 files changed

+38
-64
lines changed

AGENTS.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# AGENTS.md
2+
3+
## Project Overview
4+
5+
`dcsctp` is a Rust implementation of the Stream Control Transmission Protocol
6+
(SCTP, [RFC 9260](https://www.rfc-editor.org/rfc/rfc9260.txt)) designed for
7+
WebRTC Data Channels ([RFC 8831](https://www.rfc-editor.org/rfc/rfc8831.txt)).
8+
It is a user-space library intended to be embedded in larger systems (like
9+
WebRTC implementations), not a standalone server or in an operating system
10+
kernel.
11+
12+
## Architecture
13+
14+
- **Core Design**: The library is **single-threaded** and **event-driven**.
15+
It does not perform I/O directly. The consumer drives the loop by feeding
16+
packets/timer events and handling outgoing commands.
17+
- **Entry Point**: The primary public interface is the `DcSctpSocket` trait
18+
(`src/api/mod.rs`). The implementation is `Socket` (`src/socket/mod.rs`).
19+
- **Internal**:
20+
- `src/socket/`: State machine, connection establishment/teardown.
21+
- `src/rx/`: Receiver logic (congestion control, reassembly).
22+
- `src/tx/`: Transmitter logic (congestion control, retransmission).
23+
- `src/timer/`: Timer abstractions (does not use system timers).
24+
- **C++ Bindings**: `src/ffi.rs` uses `cxx` to expose the Rust API to C++.
25+
Changes to `src/api/` must often be reflected in `src/ffi.rs`.
26+
27+
## Development Workflow
28+
29+
- **Build**: `cargo build`
30+
- **Test**: `cargo test` (Runs extensive unit and integration tests).
31+
- **Lint**: `cargo clippy --all-features --all-targets -- -D warnings`
32+
- **Format**: `cargo +nightly fmt --all -- --check`
33+
34+
## Contribution Rules
35+
36+
- **Changelog**: All functional changes must be documented in `CHANGELOG.md`
37+
under the *Unreleased* section (categories: Added, Changed, Deprecated,
38+
Removed, Fixed, Security).

GEMINI.md

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)