- Sift Roblox is an immutable data library for Luau and roblox-ts projects.
- Installation options include Wally, npm, the Roblox Library, Itch.io, and GitHub releases.
- Luau support uses native types without runtime type-checking from the library.
- roblox-ts support is available through the
@rbxts/siftpackage and included typings. - Version warning: Sift remains in the v0.x series, so minor releases may include breaking changes.
Sift Roblox Beginner Guide: What It Is
Sift Roblox is a developer library for working with immutable data in Luau and roblox-ts. It is not a playable Roblox experience, character system, or progression mechanic. Instead, it gives creators utility functions for updating arrays, dictionaries, and sets without directly mutating the original data.
The project is heavily based on the Llama library, which is no longer maintained. Sift follows a similar purpose while using native Luau types, reorganized tests, generated documentation, and built-in TypeScript typings. These differences make it useful for projects that need predictable state updates or shared data utilities.
| Area | Sift Approach | Beginner Benefit |
|---|---|---|
| Primary purpose | Immutable data utilities | Safer state updates |
| Supported languages | Luau and roblox-ts | Flexible Roblox workflows |
| Main collections | Arrays, dictionaries, and sets | Covers common data structures |
| Type system | Native Luau types | Less dependency on runtime type packages |
| Stability | v0.x development series | Review changes before upgrading |
The central idea is simple: rather than changing a table in place, create an updated result while preserving the original value. This pattern can make inventory data, player settings, configuration objects, and replicated state easier to reason about.
Arrays
Use list utilities for differences, symmetric differences, freezing, type checks, and shuffling.
Dictionaries
Work with key-value data through entries, freezing, deep freezing, and entry conversion.
Sets
Count values and calculate differences between collections without changing the source set.
Start with one small data structure, such as a settings dictionary or item list. Learning immutable updates in a contained system is easier than rewriting an entire project at once.
Installation Options for Roblox Projects
Sift can be added to a Roblox development project in several ways. The best choice depends on how your team manages dependencies. Wally is suited to command-line package workflows, roblox-ts projects can use npm, and manual installation works when you prefer to place the model directly into Studio.
The reference documentation identifies Sift as available through Wally, Itch.io, the Roblox Library, and GitHub releases. It also notes that the project is free and open source, while an Itch.io page may be used for optional sponsorship.
| Installation route | Best fit | Key action | Main consideration |
|---|---|---|---|
| Wally | Luau projects with dependency management | Add Sift to wally.toml, then run wally install | Requires a Wally workflow |
| npm | roblox-ts projects | Install @rbxts/sift | Uses TypeScript tooling |
| Roblox Library | Manual Studio workflows | Insert the library into Studio | Updates are handled manually |
| GitHub releases | Manual or scripted workflows | Download a release copy | Check the selected release carefully |
| Rojo sync | Source-controlled projects | Sync the Sift model through Rojo | Requires an existing Rojo setup |
Wally Setup
For a Wally project, add the dependency to the [dependencies] section of wally.toml. The documented format uses a v0.x version placeholder:
[dependencies]
Sift = "csqrl/sift@0.0.X"
Replace 0.0.X with the version you intend to use, then run:
wally install
Keep the selected version visible in your project configuration. This makes it easier to reproduce the same dependency set across machines and reduces confusion when a newer minor release changes behavior.
roblox-ts Setup
The documentation states that Sift includes TypeScript typings and can be installed for roblox-ts with:
npm install @rbxts/sift
A basic import and dictionary operation may look like this:
import Sift from "@rbxts/sift"
const updated = Sift.Dictionary.merge(
{ a: 1, c: 2 },
{ b: 3, c: Sift.None }
)
The documented result is a dictionary containing a: 1 and b: 3. The Sift.None value removes the existing c entry during the merge.
Manual Installation
Manual installation means obtaining a copy from the Roblox Library or a GitHub release and placing it into Studio. The Sift model can also be synced with Rojo. This route is approachable for small experiments, but teams should record the release version and installation date so future updates remain manageable.
Sift is still in the v0.x series. The documentation warns that breaking changes may occur when the minor version increments, so test dependency upgrades before using them in production.
Step-by-Step First Data Update
The fastest way to understand Sift is to practice one immutable update at a time. Begin with a small dictionary, inspect the returned value, and confirm that the original table remains the reference value for your application logic.
Choose a Small Data Structure
Start with settings, a lightweight configuration object, or a short item list. Avoid introducing Sift into several unrelated systems during your first test.
Select the Matching Collection API
Use dictionary functions for key-value records, array functions for ordered lists, and set functions for unique-value collections. Keeping the API aligned with the data structure improves readability.
Create the Updated Result
Call the relevant Sift utility and store its return value in a new variable. Treat the result as the next state rather than editing the original table directly.
Verify the Result
Check the returned data and test edge cases, including missing keys, empty collections, nested values, and repeated entries where relevant.
A dictionary merge is a useful first example:
local Sift = require(path.to.Sift)
local original = {
Coins = 100,
Title = "Rookie",
}
local updated = Sift.Dictionary.merge(original, {
Coins = 125,
Title = Sift.None,
})
In this pattern, the returned dictionary can represent the next state. The Coins value is replaced, while Title is removed through Sift.None. The exact import path depends on the installation method and project structure, so use the path generated by your dependency workflow.
| Operation | Collection | Practical use |
|---|---|---|
difference | Array or set | Find values present in one collection but not others |
differenceSymmetric | Array or set | Find values unique to either side |
freeze | Array or dictionary | Prevent direct changes to a collection |
freezeDeep | Array or dictionary | Freeze nested arrays or dictionaries |
merge | Dictionary | Combine updates and remove keys with Sift.None |
shuffle | Array | Return elements in a randomized order |
If you can explain which value is the original state, which value is the returned state, and why Sift.None removes a dictionary key, you understand the core workflow.
Luau and roblox-ts Workflow Comparison
Sift supports both Luau and roblox-ts, but the surrounding development experience differs. Luau users typically work directly in Roblox Studio or a Wally-managed project. roblox-ts users write TypeScript and compile it into Roblox-compatible code through their existing toolchain.
The library documentation emphasizes that Sift uses native Luau types and does not perform the runtime type checking previously associated with the older dependency approach. This means type correctness remains an important responsibility for the developer.
| Workflow | Language | Package command | Typing note |
|---|---|---|---|
| Direct Luau | Luau | Wally or manual installation | Uses native Luau types |
| roblox-ts | TypeScript | npm install @rbxts/sift | Includes TypeScript typings |
| Studio manual | Luau | Roblox Library or release copy | Import structure depends on placement |
| Rojo project | Luau or project-managed source | Sync model through Rojo | Fits source-controlled workflows |
Choosing the Right Starting Point
Choose direct Luau if you are learning Roblox scripting or want the shortest path from Studio to a working example. Choose roblox-ts if your project already uses TypeScript and npm. Avoid changing languages only to use Sift; the library is designed to fit either workflow.
For Luau developers, pay attention to the difference between static guidance and runtime behavior. Native types can help describe intended values, but incorrect data may still produce runtime errors when functions receive unexpected inputs.
For roblox-ts developers, typings can improve editor feedback and make APIs easier to discover. However, compiled code still needs project-level testing, especially when data comes from player input, saved data, networking, or external systems.
Luau First
Best for Studio learners, small experiments, and projects already organized around native Roblox scripting.
roblox-ts First
Best for teams using TypeScript, npm, and a compile-based development workflow.
Migration Mindset
Useful when replacing older Llama-based utilities, but review API differences and test every state update.
Sift does not replace validation at system boundaries. Check data loaded from saves, received from clients, or assembled from external input before passing it into collection utilities.
Common Mistakes and Maintenance Checklist
A beginner-friendly Sift workflow depends less on memorizing every function and more on keeping data ownership clear. Decide which system owns a value, create a new result for updates, and avoid mixing mutable and immutable patterns without a reason.
Common Mistakes
- Editing the original table after creating a Sift result: This can make state history difficult to follow.
- Using an array function for dictionary data: Select the API based on the collection type, not simply the desired result.
- Assuming freezing repairs bad data: Freeze functions restrict changes; they do not validate the contents of a collection.
- Ignoring nested structures: A shallow freeze and a deep freeze have different effects.
- Upgrading v0.x dependencies without testing: Minor version increments may include breaking changes.
- Skipping project documentation: Record how Sift is installed and which version your project expects.
| Risk | Why it matters | Recommended response |
|---|---|---|
| Original data is mutated | Later systems may see unexpected values | Treat returned results as the next state |
| Wrong collection API | The operation may not match the data shape | Identify array, dictionary, or set first |
| Shallow freeze misunderstood | Nested collections may remain changeable | Use deep freezing when nested protection is required |
| Invalid input reaches Sift | Errors may appear at runtime | Validate data before utility calls |
| Untracked version change | A v0.x update may alter behavior | Pin and test the intended release |
Beginner Project Checklist:
- Choose Luau or roblox-ts before installing the package
- Record the Sift version used by the project
- Test one array, dictionary, or set operation
- Compare the original collection with the returned result
- Review the official Sift documentation before upgrading
For reference, use the official Sift documentation page to review installation notes, v0.x stability guidance, and the available collection utilities. Keep this link in your project notes alongside the dependency configuration.
When upgrading Sift, test merges, freezes, differences, and any utility used by saved or replicated data. Small targeted tests can reveal breaking changes early.
Sift Roblox Beginner Guide FAQ
Q: Is Sift Roblox a playable Roblox game?
No. Sift is an immutable data library for Roblox development. It provides utilities for Luau and roblox-ts projects rather than gameplay, avatars, codes, or in-game progression.
Q: How can I install Sift with Wally?
Add Sift to the dependencies section of wally.toml using the csqrl/sift package format, replace the version placeholder with the release you want, and run wally install.
Q: Does Sift support roblox-ts?
Yes. The documentation states that Sift includes TypeScript typings. The package can be installed with npm install @rbxts/sift.
Q: What does Sift.None do?
In the documented dictionary merge example, Sift.None removes an existing key from the resulting dictionary. It is useful when an update needs to delete a value rather than replace it.
Sift is a practical option for developers who want structured immutable updates in Roblox projects. Begin with one collection type, use the installation path that matches your workflow, and treat v0.x upgrades as changes that require testing.
The most reliable beginner path is simple: install Sift, practice one immutable update, verify the result, and expand only after the data flow is clear.