Skip to content

v1.0.0-pre.1

Pre-release
Pre-release

Choose a tag to compare

@1Axen 1Axen released this 14 Jan 16:09
· 133 commits to rewrite since this release
272ea54

The blink rewrite is finally here!

Here's a list of the key changes:

  • All user exports are now nested in a .exports table
    -- 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
    type foo = number | string
    type bar = Instance | Instance<"Model">
    String literal unions replace unit enums
    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 StreamedInstance type replaces the previous Instance? solution for streamed instances
  • Events have a new Both option for the from field
  • 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 Enum type has been added
    type alpha = Enum<"AlphaMode">
  • New numerical types have been added: i/u24 i/u48, while the f16 type has been removed
  • Imports now support aliases from .luaurc files, .config.luau support is coming soon.
    import "@libs/common"
  • Compliation profiles have been introduced
    blink compile --profile dev input.file
    blink compile --profile release input.file
    The dev profile 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.