Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
175 commits
Select commit Hold shift + click to select a range
b1fcd1f
refactoring
benStre Mar 8, 2026
9b7aacc
todo
benStre Mar 8, 2026
83fada8
refactoring (wip)
benStre Mar 8, 2026
f1d33d2
refactoring, fix all tests
benStre Mar 8, 2026
d7df039
add remote execution tests (wip)
benStre Mar 8, 2026
8bfb582
refactoring (wip)
benStre Mar 9, 2026
f83b744
refactoring, tests for remote execution compilation
benStre Mar 9, 2026
a820902
fixes
benStre Mar 9, 2026
307b503
wip
benStre Mar 9, 2026
b7bcef5
wip
benStre Mar 9, 2026
bbd6547
wip
benStre Mar 11, 2026
94b3496
wip
benStre Mar 11, 2026
b7ad2df
fix lsp
benStre Mar 11, 2026
df0bf31
fix lsp
benStre Mar 11, 2026
310352e
wip
benStre Mar 11, 2026
4904617
wip
benStre Mar 11, 2026
bc58b22
refactoring
benStre Mar 11, 2026
9637cf1
refactoring
benStre Mar 11, 2026
d682aec
wip
benStre Mar 11, 2026
5bcac31
wip - ownership of shared containers
benStre Mar 11, 2026
3ed5d8e
refactoring move / clone slots
benStre Mar 13, 2026
3b5fc36
refactoring move / clone slots
benStre Mar 13, 2026
59619d5
refactoring move / clone slots
benStre Mar 13, 2026
d0e4cd5
refactoring move / clone slots
benStre Mar 13, 2026
8e16906
wip
benStre Mar 13, 2026
ece1700
refactoring, fixes
benStre Mar 13, 2026
9e85206
wip
benStre Mar 18, 2026
f7f3fbd
wip
benStre Mar 18, 2026
962dcf7
wip
benStre Mar 18, 2026
9bf10f2
fix isowned
jonasstrehle Mar 18, 2026
9ec7e15
wip
benStre Mar 18, 2026
a4d0134
wip
benStre Mar 20, 2026
3a91b8c
refactoring
benStre Mar 22, 2026
a05194c
refactoring
benStre Mar 22, 2026
6a15a3c
instruction refactoring
benStre Mar 22, 2026
30dfbda
instruction refactoring
benStre Mar 22, 2026
760cdf7
instruction refactoring
benStre Mar 22, 2026
4975b5b
instruction refactoring
benStre Mar 23, 2026
208eb91
refactoring compiler buffer
benStre Mar 23, 2026
6434aac
fixes
benStre Mar 23, 2026
6d4a60d
cleanup
benStre Mar 23, 2026
ec95269
fixes
benStre Mar 23, 2026
2569931
fixes
benStre Mar 23, 2026
299a94a
refactoring
benStre Mar 23, 2026
7ebf31a
refactoring
benStre Mar 23, 2026
75831ba
wip instruction tree
benStre Mar 23, 2026
6e1069f
wip instruction tree
benStre Mar 25, 2026
a395916
instruction tree disassembly
benStre Mar 25, 2026
d525a65
instruction tree disassembly
benStre Mar 25, 2026
e06cf5e
wip core compiler context
benStre Mar 28, 2026
eb0b390
wip core compiler context
benStre Mar 29, 2026
1a370ff
fixes
benStre Mar 30, 2026
42d3b76
fix hash for shared container
benStre Mar 30, 2026
e87431b
refactoring
benStre Mar 30, 2026
cf9033d
wip stack refactoring
benStre Mar 30, 2026
f9204b8
cleanup
benStre Mar 30, 2026
a221a4d
refactoring
benStre Apr 5, 2026
41c3c3c
wip
benStre Apr 5, 2026
0c25dea
wip
benStre Apr 5, 2026
83c3288
wip
benStre Apr 5, 2026
68dec2a
cleanup
benStre Apr 5, 2026
b83dda5
refactoring
benStre Apr 6, 2026
32663e9
refactoring
benStre Apr 6, 2026
56525d5
assembly serialization
benStre Apr 6, 2026
5c194e8
refactoring
benStre Apr 6, 2026
c3ed71d
fix macros
benStre Apr 6, 2026
ee1dd1e
cleanup
benStre Apr 6, 2026
b83a271
cleanup
benStre Apr 6, 2026
0364a0d
fixes
benStre Apr 6, 2026
2fc2606
feature flags
benStre Apr 6, 2026
4cf94b3
fix benchmarks
benStre Apr 6, 2026
df3dbc0
lsp refactoring, feature flag collission fix
benStre Apr 6, 2026
a46ef54
fix
benStre Apr 6, 2026
e8a1f8d
fix tests
benStre Apr 6, 2026
2125574
refactoring
benStre Apr 9, 2026
6321e15
wip
benStre Apr 9, 2026
a851b35
shared value refactoring
benStre Apr 12, 2026
375566f
shared value refactoring
benStre Apr 12, 2026
2280bde
shared container refactoring (wip)
benStre Apr 12, 2026
9a3ebb2
shared container refactoring (wip)
benStre Apr 12, 2026
40a72d0
shared container refactoring (wip)
benStre Apr 12, 2026
a60b728
shared container refactoring (wip)
benStre Apr 12, 2026
7048547
shared container refactoring (wip)
benStre Apr 12, 2026
2842701
shared container refactoring (wip)
benStre Apr 12, 2026
37ce24c
shared container and type refactoring (wip)
benStre Apr 13, 2026
6577775
shared container and type refactoring (wip)
benStre Apr 15, 2026
92f0f67
shared container and type refactoring (wip)
benStre Apr 15, 2026
b357b1c
shared container and type refactoring (wip)
benStre Apr 15, 2026
703c102
shared container and type refactoring (wip)
benStre Apr 15, 2026
17ad357
shared container and type refactoring (WIP)
jonasstrehle Apr 16, 2026
19b0633
shared container and type refactoring (WIP)
jonasstrehle Apr 16, 2026
ac19c1a
refactor core lib
jonasstrehle Apr 16, 2026
2e04540
remove redundant type constructors from Type implementation
jonasstrehle Apr 16, 2026
b9da012
shared container and type refactoring (wip)
benStre Apr 16, 2026
1208ec1
shared container and type refactoring (WIP)
jonasstrehle Apr 17, 2026
45f55a0
shared container and type refactoring (WIP)
jonasstrehle Apr 17, 2026
36364c7
shared container and type refactoring (WIP)
jonasstrehle Apr 17, 2026
78d384a
fix mutations (WIP)
jonasstrehle Apr 17, 2026
810b175
fix dif (WIP)
jonasstrehle Apr 17, 2026
170f213
x
jonasstrehle Apr 17, 2026
33c63fd
wip
benStre Apr 17, 2026
a2f4bbd
wip
benStre Apr 18, 2026
324b9fb
wip
benStre Apr 18, 2026
fc77def
start dif refactoring
benStre Apr 18, 2026
5a90f5c
wip
benStre Apr 18, 2026
efaa7cf
wip
benStre Apr 19, 2026
34fd8e5
wip
benStre Apr 19, 2026
0345068
compiles again, but lots of tests failing
benStre Apr 19, 2026
3502cac
fixes
benStre Apr 19, 2026
8d83dbe
fix benches
benStre Apr 19, 2026
8887d4e
more fixes
benStre Apr 19, 2026
049b153
value serde
benStre Apr 20, 2026
d47a2b6
wip
benStre Apr 20, 2026
c8e6b05
wip
benStre Apr 20, 2026
19650eb
wip serde
benStre Apr 20, 2026
94fcb2c
wip serde
benStre Apr 20, 2026
55a49d2
fixes
benStre Apr 20, 2026
c9b2d57
fixes
benStre Apr 21, 2026
e5f1c69
work on serde
benStre Apr 21, 2026
86b3dd1
work on dif
benStre Apr 22, 2026
e13570b
work on dif
benStre Apr 22, 2026
90a6a84
nostd fixes
jonasstrehle Apr 23, 2026
d6d1077
fmt
jonasstrehle Apr 23, 2026
f6c8d91
add test_case crate, add serde for pointer addr
jonasstrehle Apr 23, 2026
d58b6c8
refactoring
jonasstrehle Apr 23, 2026
f5b1731
big refactoring (WIP)
jonasstrehle Apr 23, 2026
c9c16fb
big refactoring (WIP)
jonasstrehle Apr 23, 2026
9473eef
big refactoring (WIP)
jonasstrehle Apr 23, 2026
8cc648b
big refactoring (WIP)
jonasstrehle Apr 23, 2026
553fc8b
big refactoring (WIP)
jonasstrehle Apr 23, 2026
4c75603
work on dif interface
benStre Apr 23, 2026
a3876a9
add update for list
jonasstrehle Apr 24, 2026
8e81cc0
split up apply and update
jonasstrehle Apr 24, 2026
04a02e5
split up core value ops
jonasstrehle Apr 24, 2026
d273bdd
split up integer ops
jonasstrehle Apr 24, 2026
37b4864
split up decimal ops
jonasstrehle Apr 24, 2026
6eb2f31
refactor ops of remaining core values
jonasstrehle Apr 24, 2026
b4abcdd
split up value
jonasstrehle Apr 24, 2026
f4f7aae
equality and identity refactor (WIP)
jonasstrehle Apr 24, 2026
fd2fc75
equality and identity refactor
jonasstrehle Apr 24, 2026
cc1af54
refactoring :/
jonasstrehle Apr 24, 2026
6d72e93
add module descriptions (WIP)
jonasstrehle Apr 24, 2026
e4dae2a
add module descriptions
jonasstrehle Apr 24, 2026
1ca03ec
remove whitespace
jonasstrehle Apr 24, 2026
9adf636
fix update error size
jonasstrehle Apr 24, 2026
48bd2c8
fix maperr
jonasstrehle Apr 24, 2026
0afd879
deprecate rstest and migrate to test-case
jonasstrehle Apr 24, 2026
453fadd
add safety section
jonasstrehle Apr 25, 2026
9cf4ec0
add observer relays for dif interface
jonasstrehle Apr 25, 2026
5ddddf7
dif interface updates
jonasstrehle Apr 25, 2026
83e77e1
work on dif interface
benStre Apr 25, 2026
5232865
work on dif interface
benStre Apr 25, 2026
cd53aa4
work on dif interface
benStre Apr 25, 2026
b409eaa
wip
benStre Apr 25, 2026
f4dca72
add rust analyzer setting for core over std usage
jonasstrehle Apr 25, 2026
dd164a2
add deref for runtime internal and move methods
jonasstrehle Apr 25, 2026
d42d81c
add deref for runtime internal and move methods
jonasstrehle Apr 25, 2026
5f51c2f
work on serde
jonasstrehle Apr 25, 2026
ec1cd40
work on serde
jonasstrehle Apr 25, 2026
ae403f9
add SerializeSeedOwned
jonasstrehle Apr 25, 2026
c7283fc
remove serialize seed crate
jonasstrehle Apr 25, 2026
37ff3cb
add owned test
jonasstrehle Apr 25, 2026
6949b4a
remove log
jonasstrehle Apr 25, 2026
8b58a63
fmt
jonasstrehle Apr 25, 2026
24fbfcd
add attrs
jonasstrehle Apr 25, 2026
354aa11
fix import
jonasstrehle Apr 25, 2026
19441e8
move out errors
jonasstrehle Apr 27, 2026
a35ba9b
add FIXME
jonasstrehle Apr 27, 2026
52b99ab
wip
benStre May 4, 2026
88d1ebb
wip
benStre May 4, 2026
10bb839
refactor serialize seed
benStre May 4, 2026
e77d972
refactor serialize seed
benStre May 4, 2026
82d98f6
serde
benStre May 4, 2026
3a2c011
serde
benStre May 4, 2026
66c57cc
no std fixes
jonasstrehle May 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
* text=auto

*.rs text eol=lf
*.toml text eol=lf
*.lock text eol=lf
*.md text eol=lf
2 changes: 2 additions & 0 deletions .github/workflows/test-datex-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ jobs:
features: default,allow_unsigned_blocks
- profile: std
features: target_native
- profile: lsp
features: target_native,lsp_tokio
steps:
- uses: actions/checkout@v5

Expand Down
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.workspace": false,
"rust-analyzer.imports.preferNoStd": true,
"rust-analyzer.linkedProjects": [
"crates/datex-core/Cargo.toml",
"crates/datex-crypto-facade/Cargo.toml",
Expand Down
42 changes: 37 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 9 additions & 7 deletions crates/datex-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ foldhash = { version = "0.2.0", default-features = false }
cfg-if = "1.0.1"
async-trait = "0.1.87"
strum_macros = { version = "0.27.1" }
datex-macros-internal = { path = "../datex-macros-internal", version = "0.0.1" }
datex-macros-internal = { path = "../datex-macros-internal", version = "0.0.2" }

# nostd-only dependencies (optional)
hashbrown = { version = "0.16.0", features = ["serde"], optional = true }
Expand All @@ -106,6 +106,7 @@ internment = { version = "0.8.6", optional = true }
# lsp dependencies (optional)
realhydroper-lsp = { version = "0.22.0", default-features = false, features = [
"proposed",
"runtime-agnostic",
], optional = true }


Expand Down Expand Up @@ -166,6 +167,8 @@ json-syntax = "0.12.5"
lazy_static = "1.4.0"
ntest_timeout = "0.9.3"
indoc = "2.0.6"
test-case = "3.3.1"

# enable native crypto for tests
datex-crypto-native = { path = "../datex-crypto-native" }
# enable tokio for tests
Expand All @@ -183,7 +186,7 @@ flexi_logger = { version = "0.31.8" }

# When using the "std" feature, the "default" feature should not be enabled since
# it includes no_std-specific dependencies
default = ["no_std", "dep:async-timer"]
default = ["no_std", "dep:async-timer", "disassembler"]

no_std = ["dep:hashbrown", "dep:async-unsync", "dep:spin"]

Expand Down Expand Up @@ -280,14 +283,13 @@ compiler = ["ast", "parser", "dep:ariadne", "dep:pretty"]

decompiler = ["ast"]

disassembler = []

### LSP-related features ######################################################

lsp = ["dep:realhydroper-lsp"]
# lsp support
lsp_tokio = ["lsp", "realhydroper-lsp/runtime-tokio"]
# enable runtime-agnostic feature for realhydroper-lsp in wasm
lsp_wasm = ["lsp", "realhydroper-lsp/runtime-agnostic"]
lsp = ["dep:realhydroper-lsp", "compiler"]
lsp_tokio = ["lsp"]
lsp_wasm = ["lsp"]


### Utils for creating macros #################################################
Expand Down
8 changes: 6 additions & 2 deletions crates/datex-core/benches/json/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ use core::hint::black_box;
use criterion::{BenchmarkId, Criterion, criterion_group};

use crate::{json, json::utils::*};
use datex_core::compiler::{CompileOptions, compile_script};
use datex_core::{
compiler::{CompileOptions, compile_script},
runtime::Runtime,
};

fn bench_json_file(c: &mut Criterion, file_path: &str) {
let runtime = Runtime::stub();
// JSON benchmarks
// JSON string to runtime value
let json = get_json_test_string(file_path);
let (dxb, _) = compile_script(&json, CompileOptions::default())
let (dxb, _) = compile_script(&json, CompileOptions::default(), runtime)
.expect("Failed to parse JSON string");

// DATEX
Expand Down
37 changes: 25 additions & 12 deletions crates/datex-core/benches/json/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,17 @@ use datex_core::{
core_compiler::value_compiler::compile_value_container,
decompiler::{DecompileOptions, decompile_body},
runtime::{
RuntimeInternal,
execution::{ExecutionInput, ExecutionOptions, execute_dxb_sync},
Runtime,
execution::{
ExecutionInput, ExecutionOptions, execute_dxb_sync,
execution_input::ExecutionCallerMetadata,
},
},
values::value_container::ValueContainer,
};
use json_syntax::Parse;
use serde_json::Value;
use std::{io::Read, rc::Rc};
use std::io::Read;

pub fn get_json_test_string(file_path: &str) -> String {
// read json from test file
Expand All @@ -41,12 +44,15 @@ pub fn json_to_json_syntax_value(json: &str) -> json_syntax::Value {
}

pub fn json_to_datex_value(json: &str) -> ValueContainer {
let (dxb, _) = compile_script(json, CompileOptions::default())
.expect("Failed to parse JSON string");
let runtime = Runtime::stub();
let (dxb, _) =
compile_script(json, CompileOptions::default(), runtime.clone())
.expect("Failed to parse JSON string");
let exec_input = ExecutionInput::new(
&dxb,
ExecutionCallerMetadata::local_default(),
ExecutionOptions::default(),
Rc::new(RuntimeInternal::stub()),
runtime,
);
execute_dxb_sync(exec_input).unwrap().unwrap()
}
Expand All @@ -65,20 +71,24 @@ pub fn json_to_runtime_value_baseline_json_syntax(json: &str) {
}

pub fn json_to_runtime_value_datex<'a>(json: &'a str) {
let runtime = Runtime::stub();

let (dxb, _) = compile_script(
json,
CompileOptions {
..CompileOptions::default()
},
runtime.clone(),
)
.expect("Failed to parse JSON string");
let exec_input = ExecutionInput::new(
&dxb,
ExecutionCallerMetadata::local_default(),
ExecutionOptions::default(),
Rc::new(RuntimeInternal::stub()),
runtime,
);
let val = execute_dxb_sync(exec_input).unwrap().unwrap();
assert!(val.to_value().borrow().is_map());
val.with_collapsed_value(|val| assert!(val.is_map()));
}

pub fn json_to_runtime_value_datex_auto_static_detection(
Expand All @@ -89,6 +99,7 @@ pub fn json_to_runtime_value_datex_auto_static_detection(
CompileOptions {
..CompileOptions::default()
},
Runtime::stub(),
)
.unwrap();
if let StaticValueOrDXB::StaticValue(value) = dxb {
Expand All @@ -111,6 +122,7 @@ pub fn json_to_dxb<'a>(json: &'a str) {
CompileOptions {
..CompileOptions::default()
},
Runtime::stub(),
)
.expect("Failed to parse JSON string");
assert!(!dxb.is_empty(), "Expected DXB to be non-empty");
Expand All @@ -120,11 +132,12 @@ pub fn json_to_dxb<'a>(json: &'a str) {
pub fn dxb_to_runtime_value(dxb: &[u8]) {
let exec_input = ExecutionInput::new(
dxb,
ExecutionCallerMetadata::local_default(),
ExecutionOptions::default(),
Rc::new(RuntimeInternal::stub()),
Runtime::stub(),
);
let json_value = execute_dxb_sync(exec_input).unwrap().unwrap();
assert!(json_value.to_value().borrow().is_map());
json_value.with_collapsed_value(|val| assert!(val.is_map()));
}

// value -> JSON
Expand All @@ -143,13 +156,13 @@ pub fn runtime_value_to_json_baseline_json_syntax(value: &json_syntax::Value) {
}

pub fn runtime_value_to_json_datex(value: &ValueContainer) {
let dxb = compile_value_container(value);
let dxb = compile_value_container(value).unwrap();
let string = decompile_body(&dxb, DecompileOptions::json_compat()).unwrap();
assert!(!string.is_empty(), "Expected DATEX string to be non-empty");
}

pub fn runtime_value_to_dxb(value: &ValueContainer) {
let dxb = compile_value_container(value);
let dxb = compile_value_container(value).unwrap();
assert!(!dxb.is_empty(), "Expected DXB to be non-empty");
}

Expand Down
Loading
Loading