ShellRS
ShellRS is a free, open-source SSH client written in Rust: host management, terminals, WinSCP-style SFTP and port forwarding in one GPU-rendered window, for macOS, Windows and Linux.
An HTTP/1.x parser for Chez Scheme, checked against llhttp
Translation pending
Developer toolsScheme · CMakeGitHub @Kiyomi-Computation-SystemsOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
HTTP/1.x parser for R6RS Scheme
Translation pending
Loading the full README.
Read the full README ↗An HTTP/1.x parser for Chez Scheme: a byte-level state machine useful for web servers reading bytes off the wire. Its based on and checked against [[https://github.com/nodejs/llhttp][llhttp]] by replaying llhttp's recorded conformance traces and comparing them byte for byte, at every chunk size.
You could combine this with [[https://github.com/Kiyomi-Computation-Systems/chez-libuv][chez-libuv]] to build an HTTP/1.x server like [[https://github.com/Kiyomi-Computation-Systems/chez-http-server][chez-http-server]].
This library was generated with [[https://kiyomi-computation-systems.github.io/byte-machine/][byte-machine]] [[https://github.com/Kiyomi-Computation-Systems/byte-machine][(source)]] a Scheme state machine generator modeled after [[https://github.com/nodejs/llparse][llparse]].
📖 [[https://kiyomi-computation-systems.github.io/chez-httparse/][Read the docs]]
#+begin_quote ✨ AI Disclosure: LLMs are used extensively in the planning and development of this project. #+end_quote
#+begin_src scheme (import (generated httparse-message) (httparse modes) (byte-machine runtime))
(define parser (make-parser httparse-message-machine (list ;; A span callback gets bounds into YOUR bytevector. Nothing is copied ;; and nothing is retained -- take what you need before returning. (list 'on-method-data (lambda (p ctx bv from to) (remember-method bv from to) callback-continue)) (list 'on-header-field-data (lambda (p ctx bv from to) (remember-field bv from to) callback-continue))
;; ... the remaining callbacks. Every declared one must be bound: a
;; binding list with a hole is refused when the parser is made, not
;; quietly ignored.
)
#f ;; The mode, chosen before the first byte. Nothing in the bytes says ;; whether a request or a response is coming, and the embedder always ;; knows; the second row is llhttp's lenient bitset, and omitting it ;; parses strictly. (list (cons 'type (httparse-message-type-value 'request)) (cons 'lenient-flags (httparse-lenient-flags-value '())))))
(let ((r (parser-feed! parser chunk 0 (bytevector-length chunk)))) (case (parser-result-status r) ((need-input) 'feed-more) ((error) (parser-error-reason (parser-result-error r))) (else (parser-result-status r)))) #+end_src
The complete, runnable version is [[file:test/common/example-tests.sps][test/common/example-tests.sps]], which the test suite runs, so this example cannot drift from the library. [[file:docs/usage.md][docs/usage.md]] walks through it, and [[file:docs/reference.md][docs/reference.md]] lists every procedure.
The CMake-layer specifications also run with no Scheme installed, through the =no-scheme= preset. The optional live-llhttp differential needs Node, a C toolchain and a built llhttp checkout; see [[file:docs/building.md][docs/building.md]].
=make help= lists every target. The main ones:
| =make build= | configure and build the development preset | | =make dev= | build, then run the harness self-tests | | =make test= | build, then run the pull-request selection | | =make test-all= | build, then run the complete selection | | =make clean= | remove all build trees |
Each target wraps a checked-in CMake preset, so =cmake --preset dev= and =ctest --preset pr= work the same way without =make=, including on Windows. [[file:docs/building.md][docs/building.md]] covers the presets, the lanes and the opt-in checks.
The libraries are pure R6RS. Nothing under =src/= imports =(chezscheme)=: the grammars import =(rnrs)= and =(byte-machine graph)=, and the generated parsers import =(rnrs)= and =(byte-machine runtime)= only. The generator's own =src/= is the same. A port to another R6RS system is a tooling job, not a library one.
Chez-specific code is confined to build and test time:
Most of those imports have a direct equivalent elsewhere. =statistics= and =sstats-bytes= do not: allocation accounting has no portable spelling, so the allocation lane is Chez-only.
Expect two differences on another system. Library resolution differs (Racket wants =#lang r6rs=, Guile has its own search rules). And the generated parser is a large set of mutually recursive definitions that relies on proper tail calls, a shape Chez compiles well, so the figures in [[file:docs/performance.md][docs/performance.md]] would need re-measuring. Every Scheme lane takes a =BACKEND= argument (=cmake/HttparseSchemeLane.cmake=), which is where a second runtime would attach.
No port has been attempted; portability here is by construction, not by measurement.
Start with installing and usage; the rest is by task.
[[file:CONTRIBUTING.md][CONTRIBUTING.md]] says how to set up, which checks a pull request must pass, and the house rules.
Report a vulnerability privately; [[file:SECURITY.md][SECURITY.md]] says how.
© [[https://kiyomicomputation.systems/][Kiyomi Computation Systems LLC]]. BSD 3-Clause; see [[file:LICENSE][LICENSE]].
The parser is a port of llhttp's, and its grammars, method table and error reasons derive from llhttp (MIT, © 2018 Fedor Indutny). llhttp's conformance corpus is vendored under =test/vendor/llhttp/= as test data and is not part of the library. [[file:NOTICE][NOTICE]] has the attributions and llhttp's license text.