From the editor
It's been several weeks since I published an update to This Week in Ruma.
I've been out of town for a lot of that time and too busy to give Ruma the time it deserves.
This hasn't stopped Ruma's contributors from moving forward, however!
There are several pull requests in various stages of completion and review.
It will likely to continue to be on the quiet side for Ruma through the remainder of the year, but don't worry.
The project is not going away.
Notable changes to ruma
- Added support for user profiles.
- New room aliases now properly generate an m.room.aliases event.
- The construction of API endpoints and the various middleware they use has been refactored to use a trait and a macro.
Many thanks to Ruma's contributors this week.
The status document is quickly going from red to green!
Notable changes to ruma
- Added support for listing the members of a room.
- Added support for room-specific client configuration data.
- Added a new custom error code for cases where the client submits an invalid parameter.
- The creator of a room now automatically joins is.
- Added a
Signature
type that is produced from a SigningKey
.
- Added a
SignatureSet
type that works like a set but serializes to a map, which is how a homeserver's signatures are represented in Matrix events.
Ruma had some major progress this week.
We're getting ever closer to the first alpha release.
Ruma's fantastic community contributed implementations for several new API endpoints, with more on the way.
On Friday I did my second live stream of Ruma development.
If you missed it, you can watch the recording.
In it, I work on a new crate, ruma-client-api, the purpose of which is to separate the request and response data types for each API endpoint from the homeserver so that the same types can be used by client code.
The general structure of the API has changed since the Friday screencast, and is coming together very nicely now.
And finally, a milestone was reached with ruma-events by converting the Event
, RoomEvent
, and StateEvent
types from structs to traits, greatly simplifying the overall API, and paving the way for better generic treatment of the different event kinds in the Ruma homeserver.
Initially I thought it would require language support for fields in traits, but I managed to get almost the same effect with macros.
At least ergonomic enough that I'm comfortable stabilizing the current API without fields in traits, at least once I verify that it works well in the homeserver code.
Notable changes to ruma
- Added support for deactivating an account.
- Added support for joining a room.
- Added support for listing the members of a room.
- Cleaned up the way variable URL path parameters are handled, moving all the logic in to Iron middleware, and reducing the volume of code in each API's handler function.
- Squashed all database migrations into a single "prerelease" migration to make it easier for contributors to work on features requiring new tables concurrently, and because there is no need to have more than one migration per released version of Ruma.
- Added this new crate to share the request and response types between client and server.
- Overall API designed and types added for about a third of the Matrix client API functionality so far.
Event
, RoomEvent
, and StateEvent
are now traits, which unifies and simplifies the crate's overall API.
- Enums now implement
Display
and FromStr
.
On Friday, I live streamed myself working on Ruma for the first time.
I tweeted about it from my personal account and mentioned it in #ruma:matrix.org, but otherwise didn't publicize it.
A few people watched and helped work out the kinks with audio and video quality.
(Thank you to those who watched!)
I walked through the API endpoint for creating message events, explaining more or less line by line how the code works, then worked on implementing the API endpoint for creating state events.
The people who watched gave me good feedback, and I had a good time doing it, so I think I'll start to stream some of my Ruma development regularly.
It will be at 1:00 PM Pacific Time on my Twitch channel.
I will start tweeting about it from Ruma's Twitter account to remind everyone.
I'd love to get some questions during the stream, so if you're interested in learning about Matrix, Rust, or both, please come watch and tell me what you want to know!
Notable changes to ruma
- Added initial support for the state event creation API endpoint.
- Filled in missing functionality and fixed a few issues with the room alias API endpoints, which checks those off the list completely.
- A new contributor is working on the API endpoint for joining a room, and in the process added a new Iron middleware for extracting a
ruma_identifiers::RoomId
from the URL path parameter wherever it's required.
- A small quality of life fix:
script/cargo
now passed the value of RUST_LOG
to the Docker environment when developing.
- The project's README now includes some more information about how to determine which version of nightly Rust Ruma is built against for those not using Docker for development.
New contributors
Apologies for the lack of updates the last two weeks!
Two weeks ago I had family visiting over the weekend and last weekend I was in Portland for the first ever RustConf, which was fantastic!
In addition to the changes below, I've been working on transaction support for the message event creation API.
It looks like it's going to require a few features that are not yet supported by Diesel: SET TRANSACTION
and tables with composite primary keys.
These are already on the roadmap for Diesel, so more progress will be made on this front soon.
Notable changes to ruma
- Some changes to error handling to be more ergonomic, provide better user-facing error messages, and to follow Rust conventions better.
- Added information to the project's README about how to develop without Docker.
- Added integration tests for the message event creation API, which uncovered a bug that is now fixed.
- The room alias creation API now correctly returns a 409 HTTP status code if the alias already exists.
New contributors
Rust at large
- Talked with Niko Matsakis at RustConf and concluded that the functionality proposed in RFC 1546 will be necessary for ruma-events to define the different kinds of Matrix events as traits instead of structs.
I added a somewhat rambly explanation of this in the comments on the RFC.
Matrix at large
- The Matrix client Vector has come out of beta and has been rebranded as Riot!
End-to-end encrypted messages are finally here!