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