Skip to content

Commit f6bbfb5

Browse files
committed
reckless: rust rewrite
Changelog-None
1 parent 0ff9167 commit f6bbfb5

34 files changed

Lines changed: 5480 additions & 2863 deletions

Cargo.lock

Lines changed: 137 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ members = [
2020
"plugins/wss-proxy-plugin",
2121
"plugins/bip353-plugin",
2222
"plugins/currencyrate-plugin",
23+
"plugins/reckless-plugin",
2324
]
2425

2526
[workspace.dependencies]

Makefile

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -460,8 +460,7 @@ ALL_NONGEN_SRCFILES := $(ALL_NONGEN_HEADERS) $(ALL_NONGEN_SOURCES)
460460
BIN_PROGRAMS = \
461461
cli/lightning-cli \
462462
lightningd/lightningd \
463-
tools/lightning-hsmtool\
464-
tools/reckless
463+
tools/lightning-hsmtool
465464
PKGLIBEXEC_PROGRAMS = \
466465
lightningd/lightning_channeld \
467466
lightningd/lightning_closingd \
@@ -872,7 +871,7 @@ clean: obsclean
872871

873872
# See doc/contribute-to-core-lightning/contributor-workflow.md
874873
PYLNS=client proto testing
875-
update-versions: update-pyln-versions update-reckless-version update-dot-version # FIXME: update-doc-examples
874+
update-versions: update-pyln-versions update-dot-version # FIXME: update-doc-examples
876875
@uv lock
877876

878877
update-pyln-versions: $(PYLNS:%=update-pyln-version-%)
@@ -910,11 +909,6 @@ pyln-build-all: pyln-build pyln-build-bolts pyln-build-grpc-proto pyln-build-wss
910909
update-lock:
911910
uv sync --all-extras --all-groups
912911

913-
update-reckless-version:
914-
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
915-
@echo "Updating tools/reckless to $(NEW_VERSION)"
916-
@$(SED) -i.bak "s/__VERSION__ = '.*'/__VERSION__ = '$(NEW_VERSION)'/" tools/reckless && rm tools/reckless.bak
917-
918912
update-dot-version:
919913
@if [ -z "$(NEW_VERSION)" ]; then echo "Set NEW_VERSION!" >&2; exit 1; fi
920914
echo $(NEW_VERSION) > .version

contrib/msggen/msggen/schema.json

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31332,9 +31332,9 @@
3133231332
"$schema": "../rpc-schema-draft.json",
3133331333
"type": "object",
3133431334
"rpc": "reckless",
31335-
"title": "Issue a command to the reckless plugin manager utility",
31335+
"title": "Reckless, a plugin manager",
3133631336
"description": [
31337-
"The **reckless** RPC starts a reckless process with the *command* and *target* provided. Node configuration, network, and lightning direrctory are automatically passed to the reckless utility."
31337+
"The **reckless** RPC lets you manage plugins. It has multiple commands available, best described in the **help** command."
3133831338
],
3133931339
"request": {
3134031340
"required": [
@@ -31346,45 +31346,34 @@
3134631346
"type": "string",
3134731347
"enum": [
3134831348
"install",
31349+
"update",
3134931350
"uninstall",
31350-
"search",
31351+
"listavailable",
31352+
"listinstalled",
3135131353
"enable",
3135231354
"disable",
3135331355
"source",
31354-
"--version"
31356+
"tip",
31357+
"help"
3135531358
],
3135631359
"description": [
3135731360
"Determines which command to pass to reckless",
3135831361
" - *command* **install** takes a *plugin_name* to search for and install a named plugin.",
3135931362
" - *command* **uninstall** takes a *plugin_name* and attempts to uninstall a plugin of the same name.",
31360-
" - *command* **search** takes a *plugin_name* to search for a named plugin.",
31363+
" - *command* **help** takes a *command* to display help for.",
3136131364
"..."
3136231365
]
3136331366
},
3136431367
"target/subcommand": {
31365-
"oneOf": [
31366-
{
31367-
"type": "string"
31368-
},
31369-
{
31370-
"type": "array"
31371-
}
31372-
],
31368+
"type": "string",
3137331369
"description": [
3137431370
"Target of a reckless command or a subcommand."
3137531371
]
3137631372
},
3137731373
"target": {
31378-
"oneOf": [
31379-
{
31380-
"type": "string"
31381-
},
31382-
{
31383-
"type": "array"
31384-
}
31385-
],
31374+
"type": "string",
3138631375
"description": [
31387-
"*name* of a plugin to install/uninstall/search/enable/disable or source to add/remove."
31376+
"*name* of a plugin to install/uninstall/listavailable/enable/disable or source to add/remove."
3138831377
]
3138931378
}
3139031379
}
@@ -31399,7 +31388,7 @@
3139931388
"result": {
3140031389
"type": "array",
3140131390
"items": {
31402-
"type": "string"
31391+
"type": "object"
3140331392
},
3140431393
"description": [
3140531394
"Output of the requested reckless command."

doc/lightningd-config.5.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ connections. Default is 9736.
334334
them over grpc. If buffer overflow occurs some notifications will not
335335
be delivered.
336336

337+
* **reckless-dir**=*DIR*
338+
339+
Set the working directory for reckless, where repositories, metadata, reckless-installed
340+
plugins, and a reckless-installed config is stored. Defaults to `lightning-dir/../reckless`
341+
337342
### Lightning node customization options
338343

339344
* **recover**=*mnemonic*

doc/reckless.7.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
reckless -- Issue a command to the reckless plugin manager utility
2-
==================================================================
1+
reckless -- Reckless, a plugin manager
2+
======================================
33

44
SYNOPSIS
55
--------
@@ -9,27 +9,22 @@ SYNOPSIS
99
DESCRIPTION
1010
-----------
1111

12-
The **reckless** RPC starts a reckless process with the *command* and *target* provided. Node configuration, network, and lightning direrctory are automatically passed to the reckless utility.
12+
The **reckless** RPC lets you manage plugins. It has multiple commands available, best described in the **help** command.
1313

14-
- **command** (string) (one of "install", "uninstall", "search", "enable", "disable", "source", "--version"): Determines which command to pass to reckless
14+
- **command** (string) (one of "install", "update", "uninstall", "listavailable", "listinstalled", "enable", "disable", "source", "tip", "help"): Determines which command to pass to reckless
1515
- *command* **install** takes a *plugin\_name* to search for and install a named plugin.
1616
- *command* **uninstall** takes a *plugin\_name* and attempts to uninstall a plugin of the same name.
17-
- *command* **search** takes a *plugin\_name* to search for a named plugin.
17+
- *command* **help** takes a *command* to display help for.
1818
...
19-
- **target/subcommand** (one of, optional): Target of a reckless command or a subcommand.:
20-
- (string)
21-
- (array)
22-
- **target** (one of, optional): *name* of a plugin to install/uninstall/search/enable/disable or source to add/remove.:
23-
- (string)
24-
- (array)
19+
- **target/subcommand** (string, optional): Target of a reckless command or a subcommand.
20+
- **target** (string, optional): *name* of a plugin to install/uninstall/listavailable/enable/disable or source to add/remove.
2521

2622
RETURN VALUE
2723
------------
2824

2925
On success, an object is returned, containing:
3026

31-
- **result** (array of strings): Output of the requested reckless command.:
32-
- (string, optional)
27+
- **result** (array of objects): Output of the requested reckless command.:
3328
- **log** (array of strings): Verbose log entries of the requested reckless command.:
3429
- (string, optional)
3530

0 commit comments

Comments
 (0)