summaryrefslogtreecommitdiff
path: root/library/src/compute
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-05-15 10:36:03 +0200
committerLaurenz <laurmaedje@gmail.com>2023-05-15 10:36:03 +0200
commit1fa56a317c8d8da76546e6b5e19b279d84380837 (patch)
tree5bc0acad0b881898511bdf66dc6384f1b5e83de3 /library/src/compute
parent156aef10c463f81ca0016583a9df83d7b8560e59 (diff)
Extract category definitions into individual functions
Diffstat (limited to 'library/src/compute')
-rw-r--r--library/src/compute/mod.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/library/src/compute/mod.rs b/library/src/compute/mod.rs
index 3f6a79fc..8ebae48e 100644
--- a/library/src/compute/mod.rs
+++ b/library/src/compute/mod.rs
@@ -8,3 +8,31 @@ mod foundations;
pub use self::construct::*;
pub use self::data::*;
pub use self::foundations::*;
+
+use crate::prelude::*;
+
+/// Hook up all compute definitions.
+pub(super) fn define(global: &mut Scope) {
+ global.define("type", type_);
+ global.define("repr", repr);
+ global.define("panic", panic);
+ global.define("assert", assert);
+ global.define("eval", eval);
+ global.define("int", int);
+ global.define("float", float);
+ global.define("luma", luma);
+ global.define("rgb", rgb);
+ global.define("cmyk", cmyk);
+ global.define("symbol", symbol);
+ global.define("str", str);
+ global.define("label", label);
+ global.define("regex", regex);
+ global.define("range", range);
+ global.define("read", read);
+ global.define("csv", csv);
+ global.define("json", json);
+ global.define("toml", toml);
+ global.define("yaml", yaml);
+ global.define("xml", xml);
+ global.define("calc", calc::module());
+}