18 releases (6 breaking)

1.0.0-rc1 Nov 6, 2024
0.12.0 Oct 4, 2024
0.11.1 Sep 2, 2024
0.10.1 Jun 28, 2024
0.7.3 Nov 8, 2023

#916 in Database interfaces

Download history 7/week @ 2024-08-17 10/week @ 2024-08-24 144/week @ 2024-08-31 16/week @ 2024-09-07 35/week @ 2024-09-14 11/week @ 2024-09-21 191/week @ 2024-09-28 49/week @ 2024-10-05 15/week @ 2024-10-12 7/week @ 2024-10-19 2/week @ 2024-10-26 115/week @ 2024-11-02 16/week @ 2024-11-09 14/week @ 2024-11-16 10/week @ 2024-11-23 10/week @ 2024-11-30

58 downloads per month
Used in 4 crates (via spacetimedb-core)

Custom license

145KB
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.

Dependencies

~14MB
~266K SLoC