1#![feature(coroutines)]
2#![feature(iter_from_coroutine)]
3#![feature(assert_matches)]
4#![feature(gen_blocks)]
5#![feature(let_chains)]
6#![feature(async_iterator)]
8#![feature(type_alias_impl_trait)]
9#![feature(trait_alias)]
10#![feature(box_patterns)]
11#![feature(if_let_guard)]
12#![feature(try_trait_v2)]
13#![allow(unused_parens)]
15#![feature(associated_type_defaults)]
16#![feature(core_float_math)]
17#![feature(thread_local)]
18#![allow(static_mut_refs)]
19#![cfg_attr(not(feature = "std"), no_std)]
20
21#[macro_use]
22extern crate mopa;
23
24extern crate num_integer;
25
26pub mod crypto;
27pub mod dif;
28
29#[cfg(feature = "ast")]
30pub mod ast;
31#[cfg(feature = "compiler")]
32pub mod compiler;
33#[cfg(feature = "decompiler")]
34pub mod decompiler;
35#[cfg(feature = "compiler")]
36pub mod fmt;
37pub mod generator;
38pub mod global;
39pub mod libs;
40pub mod logger;
41#[cfg(feature = "lsp")]
42pub mod lsp;
43pub mod network;
44#[cfg(feature = "compiler")]
45pub mod parser;
46pub mod references;
47pub mod runtime;
48#[cfg(feature = "compiler")]
49pub mod type_inference;
50#[cfg(feature = "compiler")]
51pub mod visitor;
52
53pub mod core_compiler;
54pub mod dxb_parser;
55pub mod serde;
56pub mod task;
57pub mod traits;
58pub mod types;
59pub mod utils;
60pub mod values;
61
62pub use datex_macros as macros;
64extern crate core;
65extern crate self as datex_core;
66
67pub mod stdlib {
68 #[cfg(not(feature = "std"))]
69 pub use nostd::{
70 any, borrow, boxed, cell, collections, fmt, format, future, hash, io,
71 ops, panic, pin, rc, string, sync, time, vec,
72 };
73
74 #[cfg(feature = "std")]
75 pub use std::*;
76}
77
78pub mod collections {
80 #[cfg(not(feature = "std"))]
81 pub use hashbrown::hash_map;
82 #[cfg(not(feature = "std"))]
83 pub use hashbrown::hash_map::HashMap;
84 #[cfg(not(feature = "std"))]
85 pub use hashbrown::hash_set;
86 #[cfg(not(feature = "std"))]
87 pub use hashbrown::hash_set::HashSet;
88 #[cfg(feature = "std")]
89 pub use std::collections::*;
90}
91
92pub mod std_sync {
93 #[cfg(not(feature = "std"))]
94 pub use spin::Mutex;
95 #[cfg(feature = "std")]
96 pub use std::sync::Mutex;
97}
98
99pub mod time {
100 #[cfg(all(not(target_arch = "wasm32"), not(feature = "std")))]
101 pub use embedded_time::*;
102 #[cfg(all(not(target_arch = "wasm32"), feature = "std"))]
103 pub use std::time::*;
104 #[cfg(target_arch = "wasm32")]
105 pub use web_time::*;
106}
107pub mod std_random {
108 #[cfg(not(feature = "std"))]
109 pub use foldhash::fast::RandomState;
110 #[cfg(feature = "std")]
111 pub use std::hash::RandomState;
112}