Skip to content

Stubserver re-write in Rust #679

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 160 commits into
base: 6.x
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
ade70ea
init
thelonelyvulpes Aug 13, 2024
4faf645
Parse client, server, auto lines
robsdedude Aug 13, 2024
f98c2a4
fmt, make tests pass
thelonelyvulpes Aug 13, 2024
2d6cc7a
rename
thelonelyvulpes Aug 13, 2024
3a42faa
rename package
thelonelyvulpes Aug 13, 2024
897b056
wip
thelonelyvulpes Aug 14, 2024
17fb47e
auto needs fixing
thelonelyvulpes Aug 14, 2024
8c6f9e8
Scanner: add comments + fix tests
robsdedude Aug 14, 2024
9bdefbc
combinator
thelonelyvulpes Aug 14, 2024
3ef5b64
test
thelonelyvulpes Aug 15, 2024
051a014
Merge pull request #1 from thelonelyvulpes/density
robsdedude Aug 15, 2024
b035baf
Make end/rest_of_line also consume the CR/LF
robsdedude Aug 15, 2024
f0cfe88
Fix lints
robsdedude Aug 15, 2024
b141bb9
Fix untagged line too eager
robsdedude Aug 15, 2024
ab05b56
Reorder code in scanner.rs
robsdedude Aug 15, 2024
c7f155a
Improve implicit line parsing
robsdedude Aug 15, 2024
373f875
Scanner: add simple block support
robsdedude Aug 15, 2024
2f9063e
add support for BOLT 3 bangline
thelonelyvulpes Aug 30, 2024
a9bca36
correct spelling of rusty
thelonelyvulpes Sep 2, 2024
87f90be
clear main for just running
thelonelyvulpes Sep 3, 2024
55381d9
borked
thelonelyvulpes Sep 3, 2024
870fd20
Fix compilation errors
robsdedude Sep 3, 2024
b774f0e
Scanner: add support more blocks
robsdedude Sep 3, 2024
55c881a
Fix implicit lines being too greedy
robsdedude Sep 3, 2024
0f5c543
Scanner: hoist unnecessary nestings
robsdedude Sep 3, 2024
0b94284
it's alive!
thelonelyvulpes Sep 3, 2024
eb6ae2e
added more todos
thelonelyvulpes Sep 4, 2024
6d21aa5
parsing skeleton laid out
thelonelyvulpes Sep 5, 2024
706cfdc
start bangline parsing
thelonelyvulpes Sep 5, 2024
bc329d8
Introduce span/line context to scanner
thelonelyvulpes Sep 6, 2024
cddcce8
Fix multiblock scanner and accept more message names
robsdedude Sep 7, 2024
709cc89
Improve error messages + fix multi block scanning accepting simple bl…
robsdedude Sep 7, 2024
a666710
Implement some more block validation in parser
robsdedude Sep 7, 2024
ce1d949
consistency
thelonelyvulpes Sep 9, 2024
1f199bf
move runtime starting and config to server
thelonelyvulpes Sep 9, 2024
05c86c9
start to set up tcp server and tcp actor
thelonelyvulpes Sep 10, 2024
fdaa1a9
suggestions
thelonelyvulpes Sep 25, 2024
5d2266c
handshake
thelonelyvulpes Sep 25, 2024
5ea0109
Wireup basic block handler, save for python
thelonelyvulpes Sep 30, 2024
f71b73e
Refactor message peeking in NetActor
robsdedude Oct 1, 2024
3649629
note
thelonelyvulpes Oct 2, 2024
c625296
simulate and base test
thelonelyvulpes Oct 3, 2024
fd896ca
add simple message dechunker
thelonelyvulpes Oct 3, 2024
73402ea
net_actor rough ready
thelonelyvulpes Oct 4, 2024
4559f0e
refactor sender to return slice
thelonelyvulpes Oct 4, 2024
b1b287c
Merge pull request #2 from thelonelyvulpes/actor_server
thelonelyvulpes Oct 6, 2024
c5e178f
Fix for 3.5
thelonelyvulpes Oct 6, 2024
21ad698
little refactor
thelonelyvulpes Oct 6, 2024
3f74900
add handshake bytes
thelonelyvulpes Oct 6, 2024
d4d4544
fmt
thelonelyvulpes Oct 6, 2024
3d139d9
wire in bolt version
thelonelyvulpes Oct 7, 2024
3eb8d60
Merge branch 'future'
thelonelyvulpes Oct 7, 2024
fa09ff9
fix test
thelonelyvulpes Oct 7, 2024
143bf3a
add a basic packstream parser
thelonelyvulpes Nov 18, 2024
1ffc255
Read bolt message
robsdedude Nov 18, 2024
d3f1f1e
added some notes, refamililiarising
thelonelyvulpes Dec 13, 2024
b5e2a9a
start work on message validator
thelonelyvulpes Jan 17, 2025
90ecb66
WiP: message field verification
robsdedude Jan 24, 2025
947f6ae
Implement string & exact order array matchers
robsdedude Feb 14, 2025
a8e4ffb
Set up root validation function for maps
thelonelyvulpes Feb 21, 2025
6c36e47
Small refactoring & added todo! for necessary fix
robsdedude Feb 21, 2025
a64e181
fix some gnarly string manipulation, then break it, regex is wip
thelonelyvulpes Feb 28, 2025
fae5672
User IndexMap instead of HashMap for values (easier debugging)
robsdedude Mar 3, 2025
b5bc307
Ordered list matching
robsdedude Mar 3, 2025
2594c8b
WIP: Jolt verifier
robsdedude Mar 4, 2025
dfcfcd9
Fix lints
robsdedude Mar 4, 2025
32ae624
Implement condense_actor_blocks
robsdedude Mar 4, 2025
cf1d0c0
Implement parallel blocks
robsdedude Mar 5, 2025
5099f3c
Complete Jolt support in parser
robsdedude Mar 7, 2025
ca596f4
Refactor Temporal Jolt parsing
robsdedude Mar 7, 2025
7a76d6c
Add context to parsing errors
robsdedude Mar 7, 2025
6f20abc
Expand bolt version implementation
robsdedude Mar 7, 2025
243d525
Implement ScriptLine::original_line
robsdedude Mar 7, 2025
ae5248b
Fix ParsedMapKey::parse
robsdedude Mar 7, 2025
d8e4257
Bump anyhow
robsdedude Mar 7, 2025
7b138a5
Fix jolt and wildcard matchers
robsdedude Mar 7, 2025
97b9dfc
WIP: sender
robsdedude Mar 7, 2025
bb90918
Message serialization
robsdedude Mar 13, 2025
2ed7549
[IT'S ALIIIIVE!!!] Chunking written messages + logging + fixes
robsdedude Mar 14, 2025
756287a
BoltMessage: compute proper message name
robsdedude Mar 14, 2025
2b4111e
Bump dependencies
robsdedude Mar 14, 2025
3a94735
Clean up values mod
robsdedude Mar 14, 2025
13d94a2
Bolt message parsing and JOLT formatting
robsdedude Mar 17, 2025
d315a81
Update to-dos + rename function
robsdedude Mar 17, 2025
44b988a
Improve parsing error contextualization
robsdedude Mar 17, 2025
41ca560
Fix state management when skipping in BlockList
robsdedude Mar 17, 2025
bd1695d
Improve script mismatch error message
robsdedude Mar 17, 2025
0f8ff0d
Fix crash on script end + pretty script error formatting
robsdedude Mar 17, 2025
05f174d
Improve script mismatch and read error messages
robsdedude Mar 18, 2025
3469fe1
More and prettier logging
robsdedude Mar 18, 2025
0deaee6
Add todos
robsdedude Mar 18, 2025
9d88cd7
Improve CLI help message
robsdedude Mar 18, 2025
f7d93f1
Improve program exit
robsdedude Mar 19, 2025
3d1db81
Scanning and parsing for more bang lines
robsdedude Mar 20, 2025
9ca55ac
Bolt manifest V1 handshake
robsdedude Mar 21, 2025
45b50c3
Re-order imports
robsdedude Mar 21, 2025
f0de426
Drop local nom-span fork
robsdedude Mar 21, 2025
9e83f60
Contextualize scanner errors
robsdedude Mar 21, 2025
1c28bde
Implement handshake delay
robsdedude Mar 21, 2025
201b80c
Implement handshake bang line overrides
robsdedude Mar 21, 2025
14c6c7f
Logging: include connection ports
robsdedude Mar 25, 2025
48debf7
Update todo list in README
robsdedude Mar 25, 2025
91965bb
Allow comments in bang header
robsdedude Mar 25, 2025
3cec4fe
Remove dead code, enable lint, fix bugs found by lint
robsdedude Mar 25, 2025
9e97b52
Extending logging
robsdedude Mar 25, 2025
c0148fb
Update to-dos
robsdedude Mar 25, 2025
cfcdc00
First draft of adding python lines.
thelonelyvulpes Mar 28, 2025
b6b9735
Implement server action lines
robsdedude Apr 15, 2025
856657b
Allow empty comments
robsdedude Apr 16, 2025
0d4c7a9
Improve logging
robsdedude Apr 16, 2025
f9d19ab
Code clean-up
robsdedude Apr 16, 2025
dc3a119
Fix determinism check rejecting fine scripts
robsdedude Apr 16, 2025
ce91e97
Implement auto bang lines
robsdedude Apr 16, 2025
2694f9f
Bump dependencies
robsdedude Apr 16, 2025
4a44904
Merge branch 'main' into implement-python
thelonelyvulpes Apr 17, 2025
c64d54a
add scanning for if elif, else, add std err for python
thelonelyvulpes Apr 17, 2025
8babdb1
scanning and parsing changes
thelonelyvulpes Apr 25, 2025
0a95fff
WiP parsing conditional blocks
robsdedude Apr 30, 2025
961d1bd
Executing conditional blocks
robsdedude May 6, 2025
b08d492
Clean up commented out code
robsdedude May 6, 2025
6cb4b01
Update to do list
robsdedude May 6, 2025
d69185d
Fix PackStream tiny int decoding
robsdedude May 6, 2025
7cc9362
Add bugs to to do list
robsdedude May 7, 2025
f65f36e
Fix <EXIT> to only close connection; add <SHTUDOWN> to exit process
robsdedude May 7, 2025
7acf9c4
Fix dynamic auto responses
robsdedude May 20, 2025
bb375c4
Merge branch 'implement-python' into main
robsdedude May 23, 2025
3bd1fb2
Fix net actor concurrent/parallel implementation
robsdedude May 23, 2025
6203213
Fix handshake logging
robsdedude May 23, 2025
19dbad9
Fix conditional resolution (relying on idempotency)
robsdedude May 23, 2025
288dacc
Fix Jolt path parsing
robsdedude May 23, 2025
566b151
Fix typo
robsdedude May 30, 2025
32f641f
Fix deferred error reporting for ALLOW RESTART
robsdedude May 30, 2025
3650e5d
Log "<BROKEN>" on IO errors
robsdedude May 30, 2025
e2ac149
Fix repeat block not fully resetting if ending with server line
robsdedude May 30, 2025
87a5199
Remove dbg! calls
robsdedude Jun 3, 2025
06ef543
Fix spatial type bolt serialization
robsdedude Jun 3, 2025
97a8260
Improve log formatting
robsdedude Jun 27, 2025
ee599f2
Todos += bolt 6 & vector types
robsdedude Jun 27, 2025
49399e9
WIP
robsdedude May 23, 2025
ae7f07d
Mark failing tests
robsdedude May 23, 2025
78badfc
basic wiring
thelonelyvulpes Jun 27, 2025
8e14bb1
Correct Acquisition Timeout Unification Tests (#678)
MaxAake Jun 30, 2025
e985173
Prepare move into TestKit repo
robsdedude Jul 7, 2025
baa79da
Merge remote-tracking branch 'rusty-bolt-stub/move-prep' into rust-fun
robsdedude Jul 7, 2025
cf0241e
Replace stub server with Rust implementation
robsdedude Jul 7, 2025
f7a5f34
Adjust dockerfile to compile stub server for runner image
robsdedude Jul 7, 2025
7113ed7
Add docs for stubscript's JOLT implementation
robsdedude Jul 8, 2025
9bd0bc8
Boltstub: add bolt 6.0 & vector type support
robsdedude Jul 8, 2025
34d3557
Merge branch '6.x' into rust-fun
robsdedude Jul 8, 2025
6efe81e
Boltstub: clippy fixes
robsdedude Jul 8, 2025
fbadcb0
Add rust checks to pre-commit hooks
robsdedude Jul 8, 2025
f0515c7
Merge branch '6.x' into rust-fun
robsdedude Jul 8, 2025
31baf9e
Stubserver: Fix broken scanner tests
robsdedude Jul 8, 2025
51966fa
Boltstub: use buffered socket
robsdedude Jul 9, 2025
4220619
Docs: add tip for auto-compiling boltstub on changes
robsdedude Jul 9, 2025
1636bc7
Boltstub wrapper: make sure to read pipes till end on shutdown
robsdedude Jul 9, 2025
0970a92
Merge branch `rust-fun` into `rust-websocket`
robsdedude Jul 9, 2025
610df25
Implement WebSocket socket wrapper
robsdedude Jul 11, 2025
d0981cc
boltstub: fix auto bangline match advancing state
robsdedude Jul 11, 2025
29e478c
boltstub: optimize state management
robsdedude Jul 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ certgen/certgen
tlsserver/tlsserver
.idea
*.iml
.DS_Store
16 changes: 16 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,19 @@ repos:
rev: 5.13.2
hooks:
- id: isort
- repo: local
hooks:
- id: cargo-fmt
name: cargo fmt
entry: cargo fmt --manifest-path boltstub/Cargo.toml --
language: system
types: [rust]
pass_filenames: false
- repo: local
hooks:
- id: cargo-clippy
name: cargo clippy
entry: cargo clippy --manifest-path boltstub/Cargo.toml --all-features --tests -- -D warnings
language: system
types: [rust]
pass_filenames: false
27 changes: 22 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,30 @@ Setting up the development environment:
* Install Python 3.8+
* Install the requirements
```bash
$ python3 -m pip install -U pip
$ python3 -m pip install -Ur requirements.txt
python3 -m pip install -U pip
python3 -m pip install -Ur requirements.txt
```
You have to repeat this step whenever a commit adds new dependencies.
* Install Rust
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```
* Compile and install the stubserver
```bash
cargo install --locked --path boltstub
```
*TIP*:
When working on the stubserver, you can use `watchexec` to automatically
build and install it whenever you change the code:
```bash
# only once, to install watchexec:
cargo install --locked [email protected]
# then, whenever you work on the stubserver:
watchexec -w boltstub -e rs cargo install --locked --path boltstub
```
* Install the pre-commit hook, that will do some code-format-checking.
```bash
$ pre-commit install
pre-commit install
```
Note that this is not an auto-formatter. It will alter some code, but
mostly it will just complain about non-compliant code.
Expand All @@ -27,7 +44,7 @@ Setting up the development environment:
`setup.cfg`.
If you want to run the checks manually, you can do so:
```bash
$ pre-commit run --all-files
pre-commit run --all-files
# or
$ pre-commit run --file path/to/a/file
pre-commit run --file path/to/a/file
```
2 changes: 2 additions & 0 deletions boltstub/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.gitignore
*.md
1 change: 1 addition & 0 deletions boltstub/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target
2 changes: 2 additions & 0 deletions boltstub/.rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
imports_granularity = "Module"
group_imports = "StdExternalCrate"
Loading