Repository navigation
v1.0.0-pre.1
Pre-release
Pre-release
The blink rewrite is finally here!
Here's a list of the key changes:
- All user exports are now nested in a
.exportstable-- before blink.my_event.fire(...) -- after blink.exports.my_event.fire(...)
- The syntax has been largely changed, check out the examples directory
- Literal number/boolean/string types are now supported
type foo = "Hello, World!" type bar = 0 type quax = false
- Unions are now supported
String literal unions replace unit enums
type foo = number | string type bar = Instance | Instance<"Model">
type state = "Idle" | "Running" | "Jumping" | "Falling"
- Recursive types are now supported
type node<T> = struct { value: T, next: node<T>? } type node_u8 = node<u8>
- Generics are now more powerful
type renderable<T> = { instance: Instance<T> } type vector2<T> = vector<T, T, 0>
- The new
StreamedInstancetype replaces the previousInstance?solution for streamed instances - Events have a new
Bothoption for thefromfield - Event/function data can now be named
event reliable = { from: Client, type: Reliable, call: SingleSync, data: (value: u8) }
- Promise/Future support has been removed, users should instead create small wrappers
- A new
Enumtype has been addedtype alpha = Enum<"AlphaMode">
- New numerical types have been added:
i/u24i/u48, while thef16type has been removed - Imports now support aliases from
.luaurcfiles,.config.luausupport is coming soon.import "@libs/common"
- Compliation profiles have been introduced
The
blink compile --profile dev input.file blink compile --profile release input.file
devprofile is chosen by default.
Profiles automatically enable certain options (ex. write_validations), and will guide compiler optimization down the line.
A list of currently missing but planned features:
- Bit packing
- Stable structs
- Sync validation
- Typescript output
- Batch max size option
- Glob imports and destructered imports
- Token bucket rate limiting for events/functions
Expect performance to be worse than the current stable version for the first couple of pre-releases, where the focus will be on feature parity/addition.
This is a pre-release, bugs are to be expected. Please report any issues you encounter to the Blink project thread in the ROSS discord server.