Skip to content

Commit 6faee34

Browse files
committed
feat: bootstrap asyncjsonstream crate
0 parents  commit 6faee34

File tree

14 files changed

+2216
-0
lines changed

14 files changed

+2216
-0
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
15+
- name: Install Rust
16+
uses: dtolnay/rust-toolchain@stable
17+
with:
18+
toolchain: stable
19+
components: rustfmt, clippy
20+
21+
- name: Cache cargo
22+
uses: Swatinem/rust-cache@v2
23+
24+
- name: Format
25+
run: cargo fmt --all -- --check
26+
27+
- name: Clippy
28+
run: cargo clippy --all-targets --all-features -- -D warnings
29+
30+
- name: Test
31+
run: cargo test --all-features
32+
33+
- name: Docs
34+
run: cargo doc --no-deps

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target
2+
Cargo.lock
3+
.idea/
4+
.DS_Store

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [0.1.0] - 2026-01-20
9+
10+
### Added
11+
- Initial async JSON stream reader ported from Extract.
12+
- Token-based streaming API for selective parsing.

CODE_OF_CONDUCT.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Code of Conduct
2+
3+
## Our pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our standards
16+
17+
Examples of behavior that contributes to a positive environment include:
18+
19+
- Demonstrating empathy and kindness toward other people
20+
- Being respectful of differing opinions, viewpoints, and experiences
21+
- Giving and gracefully accepting constructive feedback
22+
- Accepting responsibility and apologizing to those affected by our mistakes
23+
- Focusing on what is best for the community
24+
25+
Examples of unacceptable behavior include:
26+
27+
- The use of sexualized language or imagery, and sexual attention or advances
28+
- Trolling, insulting or derogatory comments, and personal or political attacks
29+
- Public or private harassment
30+
- Publishing others' private information, such as a physical or email address,
31+
without their explicit permission
32+
- Other conduct which could reasonably be considered inappropriate in a
33+
professional setting
34+
35+
## Enforcement responsibilities
36+
37+
Community leaders are responsible for clarifying and enforcing our standards of
38+
acceptable behavior and will take appropriate and fair corrective action in
39+
response to any behavior that they deem inappropriate, threatening, offensive,
40+
or harmful.
41+
42+
## Scope
43+
44+
This Code of Conduct applies within all community spaces and also applies when
45+
an individual is officially representing the community in public spaces.
46+
Examples of representing our community include using an official email address,
47+
posting via an official social media account, or acting as an appointed
48+
representative at an online or offline event.
49+
50+
## Enforcement
51+
52+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
53+
reported to the community leaders responsible for enforcement at
54+
security@singular.net. All complaints will be reviewed and investigated
55+
promptly and fairly.
56+
57+
## Enforcement guidelines
58+
59+
Community leaders will follow these Community Impact Guidelines in determining
60+
the consequences for any action they deem in violation of this Code of Conduct:
61+
62+
1. Correction
63+
Community Impact: Use of inappropriate language or other behavior deemed
64+
unprofessional or unwelcome in the community.
65+
Consequence: A private, written warning from community leaders, providing
66+
clarity around the nature of the violation and an explanation of why the
67+
behavior was inappropriate. A public apology may be requested.
68+
69+
2. Warning
70+
Community Impact: A violation through a single incident or series of
71+
actions.
72+
Consequence: A warning with consequences for continued behavior. No
73+
interaction with the people involved, including unsolicited interaction
74+
with those enforcing the Code of Conduct, for a specified period of time.
75+
76+
3. Temporary ban
77+
Community Impact: A serious violation of community standards, including
78+
sustained inappropriate behavior.
79+
Consequence: A temporary ban from any sort of interaction or public
80+
communication with the community for a specified period of time.
81+
82+
4. Permanent ban
83+
Community Impact: Demonstrating a pattern of violation of community
84+
standards, including sustained inappropriate behavior, harassment of an
85+
individual, or aggression toward or disparagement of classes of individuals.
86+
Consequence: A permanent ban from any sort of public interaction within the
87+
community.
88+
89+
## Attribution
90+
91+
This Code of Conduct is adapted from the Contributor Covenant, version 2.1,
92+
available at https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
93+
94+
Community Impact Guidelines were inspired by Mozilla's code of conduct
95+
enforcement ladder.

CONTRIBUTING.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Contributing
2+
3+
Thanks for contributing to asyncjsonstream.
4+
5+
## Development setup
6+
7+
- Install stable Rust and Cargo.
8+
- Clone the repository.
9+
10+
```bash
11+
cargo test
12+
cargo fmt --all
13+
cargo clippy --all-targets --all-features -- -D warnings
14+
```
15+
16+
## Pull requests
17+
18+
- Keep changes focused and well-scoped.
19+
- Add tests for bug fixes and new behavior.
20+
- Update docs and CHANGELOG when appropriate.
21+
- Ensure `cargo fmt` and `cargo clippy` are clean.
22+
23+
## Reporting issues
24+
25+
Please include:
26+
27+
- Rust version (`rustc -V`)
28+
- Platform (OS + CPU)
29+
- A minimal reproduction case
30+
- Expected vs actual behavior
31+
32+
## Code of conduct
33+
34+
This project follows the [Code of Conduct](CODE_OF_CONDUCT.md).

Cargo.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
[package]
2+
name = "asyncjsonstream"
3+
version = "0.1.0"
4+
edition = "2021"
5+
rust-version = "1.74"
6+
description = "Async JSON stream reader for selective parsing of large payloads"
7+
readme = "README.md"
8+
license = "MIT OR Apache-2.0"
9+
repository = "https://github.com/singular-labs/async-json-streamer"
10+
homepage = "https://github.com/singular-labs/async-json-streamer"
11+
documentation = "https://docs.rs/asyncjsonstream"
12+
keywords = ["json", "async", "streaming", "stream"]
13+
categories = ["asynchronous", "encoding"]
14+
15+
[dependencies]
16+
bytes = "1.4.0"
17+
serde_json = "1.0.96"
18+
thiserror = "2.0.11"
19+
tokio = { version = "1.34.0", features = ["fs", "io-util", "macros", "rt-multi-thread"] }
20+
21+
[dev-dependencies]
22+
assert_matches = "1.5.0"
23+
serde = { version = "1.0.199", features = ["derive"] }
24+
25+
[package.metadata.docs.rs]
26+
all-features = true

0 commit comments

Comments
 (0)