Skip to content

Commit 3dd2d8c

Browse files
authored
wirego_remote(rust): add support for Wirego implemented in Rust (#37)
* wirego_remote(rust): Implement basic Wirego Remote functionality with basic example in Rust * Add integration test with basic communication with wirego plugin * Add ProcessHeuristic handling * Improve command handling so failures send the \0x00 instead of crashing * Add a bit better error handling * Extract types for WiregoListener + create doc for all exposed stuff * Add imports to shorten the code * Add UTs for ZmqMessage to WiregoBridge command request converter * Some fixes in the example + more UTs * another small ut * Some more UTs * Add integration test with almost all commands handling * Add simple CI workflow for rust * Add missing check for frames count * Cleanup examples directory * Add README for wirego remote rust * Review fixes :) * Integration test for Windows (TCP) and Linux (TCP and IPC * Modify the cfg attribute to support all UNIX systems
1 parent 0226365 commit 3dd2d8c

File tree

13 files changed

+3821
-1
lines changed

13 files changed

+3821
-1
lines changed

.github/workflows/rust-ubuntu.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Rust Wirego Remote build on Linux
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
# examples could be run in the other job after this one passes
7+
paths: [".github/workflows/rust-ubuntu.yml", "wirego_remote/rust/wirego"]
8+
pull_request:
9+
branches: ["main"]
10+
paths: [".github/workflows/rust-ubuntu.yml", "wirego_remote/rust/wirego"]
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
linux:
17+
name: Build
18+
runs-on: ubuntu-latest
19+
env:
20+
working-directory: wirego_remote/rust/wirego
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v4
24+
25+
- name: Build development version
26+
run: cargo build --verbose
27+
working-directory: ${{ env.working-directory }}
28+
29+
- name: Check the package and dependencies for errors
30+
run: cargo check --verbose
31+
working-directory: ${{ env.working-directory }}
32+
33+
- name: Run unit and integration tests
34+
run: cargo test --verbose
35+
working-directory: ${{ env.working-directory }}
36+
37+
- name: Build release version
38+
run: cargo build --release --verbose
39+
working-directory: ${{ env.working-directory }}

wirego_remote/go/wirego/zmq_relay.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ func (wg *Wirego) returnFailure(err error) error {
419419
return wg.zmqSocket.Send(response)
420420
}
421421

422-
// getStringFromFrame extrazcts a C-String from a given frame. Upon error, an empty string is returned.
422+
// getStringFromFrame extracts a C-String from a given frame. Upon error, an empty string is returned.
423423
func getStringFromFrame(frame []byte) string {
424424
//Make sure it's a C string
425425
if frame[len(frame)-1] != 0x00 {

wirego_remote/rust/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
target/
2+
**/*.rs.bk
3+
Cargo.lock

0 commit comments

Comments
 (0)