-
Notifications
You must be signed in to change notification settings - Fork 52
Blog post describing updates to Valkey Modules Rust SDK #250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is lots of good stuff here.
It feels a little like release notes in the current state, especially towards the end.
What would make it a good blog post is a few paragraphs that tie together why these changes are important (is it just keeping up with changes in Valkey? does it fill in the SKD gaps?, etc.).
At the end it goes into bullet point mode rather than narrative too. Maybe make the ideas for further development into a paragraph and the list of contributions into a sentence.
It needs a conclusion paragraph as well.
I also left some specific wording and grammar notes.
|
||
In an earlier [article](/blog/modules-101/) we discussed the process of building Valkey Modules. | ||
Modules allow adding extra features (such as new commands and data types) to Valkey without making changes to the core code. | ||
We briefly touched on how to use [Valkey Modules Rust SDK](https://github.com/valkey-io/valkeymodule-rs) to build a simple module. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar: needs definite article. 'how to use the Valkey Modules SDK'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
Modules allow adding extra features (such as new commands and data types) to Valkey without making changes to the core code. | ||
We briefly touched on how to use [Valkey Modules Rust SDK](https://github.com/valkey-io/valkeymodule-rs) to build a simple module. | ||
In this article we will expand on this topic and discuss some of the new features added to the SDK over the last year. | ||
SDK itself also provides examples on how to use these new features but this article summarizes them below. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can drop this sentence.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
In this article we will expand on this topic and discuss some of the new features added to the SDK over the last year. | ||
SDK itself also provides examples on how to use these new features but this article summarizes them below. | ||
|
||
## What is Valkey Modules Rust SDK? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grammar: definite article
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
## What is Valkey Modules Rust SDK? | ||
|
||
The SDK is based on [Redis Modules Rust SDK](https://github.com/RedisLabsModules/redismodule-rs) and provides abstraction APIs on top of Valkey Modules own API. | ||
For those familiar with Rust development the SDK is a regular Rust crate that can be added to Cargo.toml file like any other Rust dependency. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo.toml in backticks (e.g. inline source code styling)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is a 'regular Rust crate' - is there another way of saying that? Do you need 'regular'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
|
||
The SDK is based on [Redis Modules Rust SDK](https://github.com/RedisLabsModules/redismodule-rs) and provides abstraction APIs on top of Valkey Modules own API. | ||
For those familiar with Rust development the SDK is a regular Rust crate that can be added to Cargo.toml file like any other Rust dependency. | ||
It requires functionality to be present in the underlying Valkey version but allows writing Valkey modules in Rust, without needing to use raw pointers or unsafe code. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'It requires functionality to be present in the underlying Valkey version' -> I really don't understand what that means. What functionality are you talking about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rephrased as It requires the underlying Valkey version to have appropriate module APIs
|
||
## Redis support | ||
|
||
There is a new feature flag in case module needs to run on Valkey and Redis. Specify `use-redismodule-api` so that module used RedisModule API Initialization for backwards compatibility. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'There is a new feature flag in case module needs to run on Valkey and Redis.' -> 'There is a new feature flag if your module needs to run on both Valkey and Redis.'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
|
||
## Unit tests and memory allocation | ||
|
||
This feature flag supports running unit tests outside of Valkey or Redis. As the result it cannot use Vakey Allocator and instead relies on the System Allocator instead. The core logis is present in `alloc.rs` but developers only need to specify this in the module Cargo.toml. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo.toml in back ticks to make it inline code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
categories= "modules" | ||
+++ | ||
|
||
## What are Valkey modules? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need a heading to start a blog post - just go into the paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
cargo test --features enable-system-alloc | ||
``` | ||
|
||
## Ideas for future development |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are there issues for these ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some are logged, will log others
|
||
## List of contributors | ||
|
||
Below are the Github handles of the developers who contibuted to the SDK in the past year |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
link their github profiles.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
agree on the |
8254955
to
80f5e10
Compare
Signed-off-by: Dmitry Polyakovsky <[email protected]>
…alkey-io#249) The documentation tiles on the homepage were stacking awkwardly at screen widths between 768px and 1090px. Modified the grid layout to create a more natural 2x2 layout at these intermediate screen sizes, ensuring consistent spacing and better visual organization. <img width="1023" alt="Screenshot 2025-04-24 at 4 53 59 PM" src="https://github.com/user-attachments/assets/237bce45-1cec-46ad-925a-766d0627fd93" /> <img width="480" alt="Screenshot 2025-04-24 at 4 54 13 PM" src="https://github.com/user-attachments/assets/ee8e564a-44d1-45f4-914b-248787ae9340" /> Signed-off-by: Daniel Phillips <[email protected]> Signed-off-by: Dmitry Polyakovsky <[email protected]>
Signed-off-by: dmitrypol <[email protected]> Signed-off-by: Dmitry Polyakovsky <[email protected]>
Signed-off-by: Dmitry Polyakovsky <[email protected]>
1b2f526
to
978870c
Compare
Description
Blog post describing updates to Valkey Modules Rust SDK
Issues Resolved
Check List
--signoff
By submitting this pull request, I confirm that my contribution is made under the terms of the BSD-3-Clause License.