swamp_script_std/lib.rs
1/*
2 * Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/script
3 * Licensed under the MIT License. See LICENSE in the project root for license information.
4 */
5
6pub mod collections;
7pub mod prelude;
8
9/*
10pub const SPARSE_TYPE_ID: TypeNumber = 999;
11pub const SPARSE_ID_TYPE_ID: TypeNumber = 998;
12
13#[must_use]
14pub fn create_std_module() -> Module {
15 let mut symbol_table = SymbolTable::new();
16
17 {
18 let sparse_rust_type = ExternalType {
19 type_name: "Sparse".to_string(),
20 number: SPARSE_TYPE_ID,
21 };
22 symbol_table
23 .add_external_type(sparse_rust_type)
24 .expect("could not register Sparse type");
25
26 let rust_type_ref_for_id = ExternalType {
27 type_name: "SparseId".to_string(),
28 number: SPARSE_ID_TYPE_ID,
29 };
30 symbol_table
31 .add_external_type(rust_type_ref_for_id)
32 .expect("could not register SparseId type");
33 }
34
35 {
36 let sparse_rust_type = ExternalType {
37 type_name: "Grid".to_string(),
38 number: SPARSE_TYPE_ID,
39 };
40 symbol_table
41 .add_external_type(sparse_rust_type)
42 .expect("could not register Grid type");
43 }
44
45 let std_module = Module::new(&["std".to_string()], symbol_table, None);
46
47 std_module
48}
49*/