Skip to content

Releases: cccb/servicepoint

v0.15.0

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:35
  • FEATURE: Several types are now Copy, including BinaryOperation and ZST commands.
  • FEATURE: CharGrid now accepts inexactly sized strs for set_row_str and set_col_str.
  • FEATURE: Many conversion functions have been implemented for references. In many cases, this can be used to reduce the number of allocations needed. This also makes it possible to send a reference to a command.
  • FEATURE: Packets can now be serialized to a preexisting buffer.
  • rand has been updated to v0.9 for better compatibility with the 2024 edition of rust.
  • The packet payload is now None instead of a zero-length Vec.

v0.14.1

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:35
  • FIX: many examples used UdpSocket::bind instead of UdpSocket::bind_connect
  • FIX #5: The display now stops reading UTF-8 chars for the CharGridCommand when encountering a null byte. The library has been changed to add spaces instead.

v0.14.0

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:36

This is a big breaking change for the library.

  • BREAKING: To support commands implemented outside the library, the Command enum has been renamed to TypedCommand.
  • BREAKING: Connections have been removed. While this sounds like a huge change, the connections were thin wrappers around the underlying transports.
  • BREAKING: The commands have been renamed to better reflect their usage.
  • BREAKING: Nearly all calls to panic!, .unwrap() and .expect() have been removed and signatures changed to reflect that. Apart from out-of-bounds accesses on the containers, the library will not crash your app anymore.
  • BREAKING: The BitVec type alias has been renamed to DisplayBitVec because of an issue in cbindgen that affected servicepoint_binding_c.
  • FEATURE: Add UdpSocketExt to easily use a UdpSocket in a way similar to the old connections.
  • FEATURE: Command is now a new trait that gets auto-implemented if the required supertraits are.
  • FEATURE: Each command is now a struct with public fields. This means a command can be mutated and functions can declare specific types in their signatures.
  • FEATURE: Containers like CharGrid and Bitmap have gotten new TryInto implementations for their command struct. That means to send a bitmap to the top left of the screen with default compression, you can write BitmapCommand::from(bitmap).
  • FEATURE: Some structs and enum values have been annotated with a repr attribute to make them usable in language bindings.

Migration Guide

  • Some functions now return None or Err when called improperly. To keep the old behavior, add an .expect() or .unwrap().
  • Replace usages of servicepoint::BitVec with servicepoint::DisplayBitVec.

Connection

  • Connection::Fake can be replaced by FakeConnection - though the usefulness of that decreased.
  • Connection::Websocket does not have an equivalent anymore. You should use tungstenite directly by first turning the command into a packet and then the packet into a Vec<u8>.
  • Instead of Connection::open use UdpSocket::bind_connect after adding UdpSocketExt to the imports.
  • Instead of calling socket.send(command), use socket.send_command(command).

Command names

v0.13 v0.14
Command::Clear ClearCommand
Command::Utf8Data CharGridCommand
Command::Brightness GlobalBrightnessCommand
Command::BitmapLinearWin BitmapCommand
Command::Cp437Data Cp437GridCommand
Command::CharBrightness BrightnessGridCommand
Command::HardReset HardResetCommand
Command::FadeOut FadeOutCommand
Command::BitmapLegacy BitmapLegacyCommand
Command::BitmapLinear BitVecCommand { operation: Overwrite }
Command::BitmapLinearAnd BitVecCommand { operation: And }
Command::BitmapLinearOr BitVecCommand { operation: Or }
Command::BitmapLinearXor BitVecCommand { operation: Xor }

Known issues

  • The examples use UdpSocket::bind instead of bind_connect, which makes them crash at runtime because the system call fails. This is fixed in v0.14.1

v0.13.2

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:36
  • The language bindings are not part of the main repository anymore. Links to the new repositories can be found in README.md.
  • FEATURE: impl Default for CompressionCode
  • FIX: building the library without any features enabled works as expected

v0.13.1

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:37
  • Metadata changes
  • More tests

v0.13.0

Choose a tag to compare

@kaesaecracker kaesaecracker released this 24 May 13:37
  • BREAKING: slight API restructure, everything public is now in the top level crate
  • FEATURE: Command::Utf8Data to send text without any encoding issues
  • FEATURE: ValueGrid::wrap and CharGrid::wrap_str