From 7bde1a3d9eef58f0db5881f2a42181ce7a2094d3 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 17:06:35 +0200 Subject: [PATCH 1/8] Added arduino-lint check workflow --- .github/workflows/arduino-lint.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/arduino-lint.yml diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml new file mode 100644 index 0000000..ef0cc41 --- /dev/null +++ b/.github/workflows/arduino-lint.yml @@ -0,0 +1,27 @@ +name: Check Arduino + +# See: https://docs.github.com/en/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v2 + with: + compliance: specification + library-manager: update + # Always use this setting for official repositories. Remove for 3rd party projects. + official: true \ No newline at end of file From 21b270b12d051f3a04640c6708ee9d0b96c62a12 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 17:10:41 +0200 Subject: [PATCH 2/8] Change library-manager checks to 'submit' it will be changed back to 'update' once the library is published. --- .github/workflows/arduino-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index ef0cc41..2f5628b 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -22,6 +22,6 @@ jobs: uses: arduino/arduino-lint-action@v2 with: compliance: specification - library-manager: update + library-manager: submit # remember to change to 'update' after the library is published on the libraries index # Always use this setting for official repositories. Remove for 3rd party projects. official: true \ No newline at end of file From fd75392ba8112981ac2c7f4af7ee9a7fe21c442d Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 17:16:05 +0200 Subject: [PATCH 3/8] Fix linter warning WARNING: The library.properties paragraph field repeats the sentence field. These are displayed together so redundancy is not needed. See: https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format (Rule LP036) --- library.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/library.properties b/library.properties index fc5f258..f509f66 100644 --- a/library.properties +++ b/library.properties @@ -2,8 +2,8 @@ name=RPClite version=0.0.1 author=Lucio Rossi (eigen-value) maintainer=Lucio Rossi (eigen-value) -sentence=RPClite for Arduino (based on hideakitai MsgPack) -paragraph=RPClite for Arduino (based on hideakitai MsgPack) +sentence=A MessagePack RPC library for Arduino +paragraph=allows to create a client/server architecture using MessagePack as the serialization format. It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. category=Communication url=https://github.com/bcmi-labs/RPClite architectures=* From 0530795d056adebc9d299388e605c7f0f3814b71 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 17:23:24 +0200 Subject: [PATCH 4/8] Renamed lib to Arduino_RPClite WARNING: Library name RPClite is missing the "Arduino_" prefix. The names of all new official libraries must have this prefix. See: https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format (Rule LP013) --- examples/rpc_lite_client/rpc_lite_client.ino | 2 +- examples/rpc_lite_dummy/rpc_lite_dummy.ino | 2 +- examples/rpc_lite_server/rpc_lite_server.ino | 2 +- examples/wrapper_example/wrapper_example.ino | 2 +- library.properties | 4 ++-- src/{RPClite.h => Arduino_RPClite.h} | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) rename src/{RPClite.h => Arduino_RPClite.h} (73%) diff --git a/examples/rpc_lite_client/rpc_lite_client.ino b/examples/rpc_lite_client/rpc_lite_client.ino index 77b533e..9fc3628 100644 --- a/examples/rpc_lite_client/rpc_lite_client.ino +++ b/examples/rpc_lite_client/rpc_lite_client.ino @@ -1,4 +1,4 @@ -#include +#include SerialTransport transport(&Serial2); RPCClient client(transport); diff --git a/examples/rpc_lite_dummy/rpc_lite_dummy.ino b/examples/rpc_lite_dummy/rpc_lite_dummy.ino index c84421c..ab6cec8 100644 --- a/examples/rpc_lite_dummy/rpc_lite_dummy.ino +++ b/examples/rpc_lite_dummy/rpc_lite_dummy.ino @@ -1,4 +1,4 @@ -#include +#include DummyTransport transport; RPCServer server(transport); diff --git a/examples/rpc_lite_server/rpc_lite_server.ino b/examples/rpc_lite_server/rpc_lite_server.ino index a9f2fe0..e883369 100644 --- a/examples/rpc_lite_server/rpc_lite_server.ino +++ b/examples/rpc_lite_server/rpc_lite_server.ino @@ -1,4 +1,4 @@ -#include +#include #include HardwareSerial* uart = new HardwareSerial(0); diff --git a/examples/wrapper_example/wrapper_example.ino b/examples/wrapper_example/wrapper_example.ino index da2644f..e4c0a5d 100644 --- a/examples/wrapper_example/wrapper_example.ino +++ b/examples/wrapper_example/wrapper_example.ino @@ -1,4 +1,4 @@ -#include +#include int add(int x, int y) { return x + y; diff --git a/library.properties b/library.properties index f509f66..418df59 100644 --- a/library.properties +++ b/library.properties @@ -1,10 +1,10 @@ -name=RPClite +name=Arduino_RPClite version=0.0.1 author=Lucio Rossi (eigen-value) maintainer=Lucio Rossi (eigen-value) sentence=A MessagePack RPC library for Arduino paragraph=allows to create a client/server architecture using MessagePack as the serialization format. It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. category=Communication -url=https://github.com/bcmi-labs/RPClite +url=https://github.com/bcmi-labs/Arduino_RPClite architectures=* depends=ArxContainer (>=0.6.0), ArxTypeTraits, DebugLog (>=0.8.1) diff --git a/src/RPClite.h b/src/Arduino_RPClite.h similarity index 73% rename from src/RPClite.h rename to src/Arduino_RPClite.h index 50ac824..9cf1d3e 100644 --- a/src/RPClite.h +++ b/src/Arduino_RPClite.h @@ -2,8 +2,8 @@ // Created by lucio on 4/8/25. // -#ifndef RPCLITE_H -#define RPCLITE_H +#ifndef ARDUINO_RPCLITE_H +#define ARDUINO_RPCLITE_H #include "Arduino.h" @@ -16,4 +16,4 @@ #include "DummyTransport.h" #include "SerialTransport.h" -#endif //RPCLITE_H +#endif //ARDUINO_RPCLITE_H From cf07b08647f77dd6dc3b0c87eaa484be9bf6bc70 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 18:20:23 +0200 Subject: [PATCH 5/8] Update .github/workflows/arduino-lint.yml Co-authored-by: Per Tillisch --- .github/workflows/arduino-lint.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index 2f5628b..612d13b 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -13,6 +13,8 @@ on: jobs: lint: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout repository From 01947e9517cd1649f9448c1030de401640de097b Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 18:24:52 +0200 Subject: [PATCH 6/8] Set strict compliance for the linter --- .github/workflows/arduino-lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/arduino-lint.yml b/.github/workflows/arduino-lint.yml index 612d13b..a85a4b5 100644 --- a/.github/workflows/arduino-lint.yml +++ b/.github/workflows/arduino-lint.yml @@ -23,7 +23,7 @@ jobs: - name: Arduino Lint uses: arduino/arduino-lint-action@v2 with: - compliance: specification + compliance: strict library-manager: submit # remember to change to 'update' after the library is published on the libraries index # Always use this setting for official repositories. Remove for 3rd party projects. official: true \ No newline at end of file From b37518f5135cd0e43bd6776760e7ff7d39c2bb4c Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 8 May 2025 18:32:09 +0200 Subject: [PATCH 7/8] Set a placeholder 'url' field to be changed before publishing --- library.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library.properties b/library.properties index 418df59..52bcbc1 100644 --- a/library.properties +++ b/library.properties @@ -5,6 +5,6 @@ maintainer=Lucio Rossi (eigen-value) sentence=A MessagePack RPC library for Arduino paragraph=allows to create a client/server architecture using MessagePack as the serialization format. It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. category=Communication -url=https://github.com/bcmi-labs/Arduino_RPClite +url=https://www.arduino.cc/ architectures=* depends=ArxContainer (>=0.6.0), ArxTypeTraits, DebugLog (>=0.8.1) From 9187619ea1a95865ce0eaa6e38621da71cb712e6 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Fri, 9 May 2025 11:39:36 +0200 Subject: [PATCH 8/8] Other changes to README and descriptions --- README.md | 9 +++++++-- library.json | 6 +++--- library.properties | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index a2cb504..c2446c6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,7 @@ -# RPClite -RPC lib for embedded based on MsgPack +# Arduino_RPClite + +A MessagePack RPC library for Arduino allows to create a client/server architecture using MessagePack as the serialization format. It follows the [MessagePack-RPC protocol specification](https://github.com/msgpack-rpc/msgpack-rpc/blob/master/spec.md). It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. + +### Credits + +This library is based on the MsgPack library by @hideakitai. diff --git a/library.json b/library.json index 84c249d..b2a0cc7 100644 --- a/library.json +++ b/library.json @@ -1,10 +1,10 @@ { - "name": "RPClite", + "name": "Arduino_RPClite", "keywords": "rpclib,msgpack,serial", - "description": "RPClite for Arduino (based on hideakitai MsgPack)", + "description": "A MessagePack RPC library for Arduino", "repository": { "type": "git", - "url": "https://github.com/bcmi-labs/RPClite" + "url": "https://github.com/bcmi-labs/Arduino_RPClite" }, "authors": { "name": "Lucio Rossi", diff --git a/library.properties b/library.properties index 52bcbc1..28a61c9 100644 --- a/library.properties +++ b/library.properties @@ -3,7 +3,7 @@ version=0.0.1 author=Lucio Rossi (eigen-value) maintainer=Lucio Rossi (eigen-value) sentence=A MessagePack RPC library for Arduino -paragraph=allows to create a client/server architecture using MessagePack as the serialization format. It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. +paragraph=allows to create a client/server architecture using MessagePack as the serialization format. It follows the MessagePack-RPC protocol specification. It is designed to be lightweight and easy to use, making it suitable for embedded systems and IoT applications. category=Communication url=https://www.arduino.cc/ architectures=*