ShellRS
ShellRS 是一款免费开源的 SSH 客户端,使用 Rust 编写:主机管理、终端、WinSCP 风格的 SFTP 与端口转发,全部在一个 GPU 渲染窗口中,支持 macOS、Windows 和 Linux。
AI 翻译
尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证HTTP/1.x parser for R6RS Scheme
翻译准备中
正在加载完整 README。
查看完整 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.