pipe
Version, currently main branch1 version
- main branchlatestJun 28, 2026
github.com/jgaskins/pipe
User-space pipe for the Crystal programming language
11 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
pipe:
github: jgaskins/pipe
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.18.2- License
- MIT
- Author
- Jamie Gaskins
Dependencies
This version declares no dependencies.
README
pipe
Pipe provides reader and writer IOs, similar to IO.pipe. The main difference is that IO.pipe uses kernel-level file descriptors, but Pipe::Reader and Pipe::Writer live entirely in user-space. This avoids consuming file descriptors on systems where they are limited and ends up being much lighter weight.
Installation
-
Add the dependency to your
shard.yml:dependencies: pipe: github: jgaskins/pipe -
Run
shards install
Usage
require "pipe"
reader, writer = Pipe.create
spawn do
# Avoid generating the entire JSON blob in RAM
JSON.build writer do |json|
json.array do
10_000_000.times do |i|
json.scalar i
end
end
end
ensure
writer.close
end
HTTP::Client.post "http://localhost:3000/data", body: reader
Contributing
- Fork it (https://github.com/jgaskins/pipe/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Jamie Gaskins - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Jun 28, 2026
- Crystal
>= 1.18.2- Indexed
- yes
Dependents
Repository
github.com/jgaskins/pipe
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 28, 2026
- Synced
- Sep 28, 2026
- Versions
- 1