You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A few weeks ago, I was reading about a framework for Rust serialization/deserialization framework called Serde, which has the ability to derive serialization/deserialization methods using a macro like so:
I sat down to start playing with it, and now I have a (mostly) working Fjage gateway written in Rust.
While providing the ability to interface with Fjage from Rust programs is my eventual goal, so far, I have been focused on making this package binary-compatible with the C gateway API. As of right now, you can download the Rust gateway, build it, link the resulting library against the UnetSocket C API, and successfully send and receive a datagram. Further, it passes all of the C gateway's tests when linked with test_fjage.c
In addition to implementing the base C API, it also provides the following extensions:
For fjage_param_set...() methods, it will also return an error if the ParameterRsp values do not match those that were sent (as in the case of trying to write to a read-only parameter)
It also implements base64 decoding and encoding, though encoding is only enabled for array parameters at the moment.
There are a few demos, including an implementation of datagram reception and transmission, a GetFileReq/PutFileReq utility, and an interactive remote shell.
The implementation is not ready for use, as I still have a lot of testing and cleaning up to do, and it doesn't yet support RS-232, but I did want to reach out and ask for feedback on where the project is at so far, as well as if there is any interest in adding it as a proper gateway in the future.
Thanks,
Brodie
The text was updated successfully, but these errors were encountered:
brodiealexander
changed the title
A pure-Rust gateway for Fjåge
A pure-Rust gateway for Fjåge with C API compatibility
Jul 7, 2024
A few weeks ago, I was reading about a framework for Rust serialization/deserialization framework called Serde, which has the ability to derive serialization/deserialization methods using a macro like so:
I sat down to start playing with it, and now I have a (mostly) working Fjage gateway written in Rust.
While providing the ability to interface with Fjage from Rust programs is my eventual goal, so far, I have been focused on making this package binary-compatible with the C gateway API. As of right now, you can download the Rust gateway, build it, link the resulting library against the UnetSocket C API, and successfully send and receive a datagram. Further, it passes all of the C gateway's tests when linked with test_fjage.c
In addition to implementing the base C API, it also provides the following extensions:
In addition, I think it should be relatively easy to add support for generic messages using something similar to:
For
fjage_param_set...()
methods, it will also return an error if the ParameterRsp values do not match those that were sent (as in the case of trying to write to a read-only parameter)It also implements base64 decoding and encoding, though encoding is only enabled for array parameters at the moment.
What I have so far is available for viewing at https://github.com/brodiealexander/fjage-rs
There are a few demos, including an implementation of datagram reception and transmission, a GetFileReq/PutFileReq utility, and an interactive remote shell.
The implementation is not ready for use, as I still have a lot of testing and cleaning up to do, and it doesn't yet support RS-232, but I did want to reach out and ask for feedback on where the project is at so far, as well as if there is any interest in adding it as a proper gateway in the future.
Thanks,
Brodie
The text was updated successfully, but these errors were encountered: