26 releases (5 stable)

new 1.1.2 May 9, 2025
1.0.1 Mar 25, 2025
1.0.0-rc2 Dec 13, 2024
1.0.0-rc1 Nov 6, 2024
0.7.3 Nov 8, 2023

#288 in Authentication

Download history 61/week @ 2025-01-19 67/week @ 2025-01-26 12/week @ 2025-02-02 1/week @ 2025-02-09 7/week @ 2025-02-16 110/week @ 2025-02-23 99/week @ 2025-03-02 57/week @ 2025-03-09 9/week @ 2025-03-16 106/week @ 2025-03-23 25/week @ 2025-03-30 25/week @ 2025-04-06 139/week @ 2025-04-13 137/week @ 2025-04-20 27/week @ 2025-04-27 53/week @ 2025-05-04

357 downloads per month
Used in 3 crates (via spacetimedb-core)

Custom license

150KB
3K SLoC

Abstract Virtual Machine for execution of end-user logic

It optimizes the code & include a more general "query planner"

The execution is split in 3 "phases":

1- AST formation

Generate the AST (that could be invalid according to the semantics).

This step is outside the [vm] and can be done, for example, by the SQL layer.

Use [dsl] to build the [expr:Expr] that build the AST.

2- AST validation

Calling eval::optimize verify the code has the correct semantics (ie: It checks types, schemas, functions are valid, etc.), and "desugar" the code in a more optimal form for later execution.

This build expr::Expr that is what could be stored in the database, ie: Is like bytecode.

3- Execution

Run the AST build from expr::Expr. It assumes is correct.


⚠️ Internal Crate ⚠️

This crate is intended for internal use only. It is not stable and may change without notice.

Dependencies

~17MB
~337K SLoC