Move the wasm lib, and cleanup rust directory and all references (#5585)
* git mv src/wasm-lib rust Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv wasm-lib to workspace Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv kcl-lib Signed-off-by: Jess Frazelle <github@jessfraz.com> * mv derive docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * resolve file paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * clippy Signed-off-by: Jess Frazelle <github@jessfraz.com> * move more shit Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more paths Signed-off-by: Jess Frazelle <github@jessfraz.com> * make yarn build:wasm work Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix scripts Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixups Signed-off-by: Jess Frazelle <github@jessfraz.com> * better references Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix cargo ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix reference Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix more ci Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix tests Signed-off-by: Jess Frazelle <github@jessfraz.com> * cargo sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix script Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix a dep Signed-off-by: Jess Frazelle <github@jessfraz.com> * sort Signed-off-by: Jess Frazelle <github@jessfraz.com> * remove unused deps Signed-off-by: Jess Frazelle <github@jessfraz.com> * Revert "remove unused deps" This reverts commit fbabdb062e275fd5cbc1476f8480a1afee15d972. * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * deps; Signed-off-by: Jess Frazelle <github@jessfraz.com> * fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
		@ -0,0 +1,285 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/simulation_tests.rs
 | 
			
		||||
description: Artifact commands non_string_key_of_object.kcl
 | 
			
		||||
snapshot_kind: text
 | 
			
		||||
---
 | 
			
		||||
[
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": 1.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 1.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "plane_set_color",
 | 
			
		||||
      "plane_id": "[uuid]",
 | 
			
		||||
      "color": {
 | 
			
		||||
        "r": 0.7,
 | 
			
		||||
        "g": 0.28,
 | 
			
		||||
        "b": 0.28,
 | 
			
		||||
        "a": 0.4
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 1.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 1.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "plane_set_color",
 | 
			
		||||
      "plane_id": "[uuid]",
 | 
			
		||||
      "color": {
 | 
			
		||||
        "r": 0.28,
 | 
			
		||||
        "g": 0.7,
 | 
			
		||||
        "b": 0.28,
 | 
			
		||||
        "a": 0.4
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": 1.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 1.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "plane_set_color",
 | 
			
		||||
      "plane_id": "[uuid]",
 | 
			
		||||
      "color": {
 | 
			
		||||
        "r": 0.28,
 | 
			
		||||
        "g": 0.28,
 | 
			
		||||
        "b": 0.7,
 | 
			
		||||
        "a": 0.4
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": -1.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 1.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": -1.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 1.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "make_plane",
 | 
			
		||||
      "origin": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "x_axis": {
 | 
			
		||||
        "x": -1.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 0.0
 | 
			
		||||
      },
 | 
			
		||||
      "y_axis": {
 | 
			
		||||
        "x": 0.0,
 | 
			
		||||
        "y": 0.0,
 | 
			
		||||
        "z": 1.0
 | 
			
		||||
      },
 | 
			
		||||
      "size": 100.0,
 | 
			
		||||
      "clobber": false,
 | 
			
		||||
      "hide": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "edge_lines_visible",
 | 
			
		||||
      "hidden": false
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "set_scene_units",
 | 
			
		||||
      "unit": "mm"
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "object_visible",
 | 
			
		||||
      "object_id": "[uuid]",
 | 
			
		||||
      "hidden": true
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  {
 | 
			
		||||
    "cmdId": "[uuid]",
 | 
			
		||||
    "range": [
 | 
			
		||||
      0,
 | 
			
		||||
      0,
 | 
			
		||||
      0
 | 
			
		||||
    ],
 | 
			
		||||
    "command": {
 | 
			
		||||
      "type": "object_visible",
 | 
			
		||||
      "object_id": "[uuid]",
 | 
			
		||||
      "hidden": true
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
]
 | 
			
		||||
@ -0,0 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/simulation_tests.rs
 | 
			
		||||
description: Artifact graph flowchart non_string_key_of_object.kcl
 | 
			
		||||
extension: md
 | 
			
		||||
snapshot_kind: binary
 | 
			
		||||
---
 | 
			
		||||
@ -0,0 +1,3 @@
 | 
			
		||||
```mermaid
 | 
			
		||||
flowchart LR
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										103
									
								
								rust/kcl-lib/tests/non_string_key_of_object/ast.snap
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										103
									
								
								rust/kcl-lib/tests/non_string_key_of_object/ast.snap
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,103 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/simulation_tests.rs
 | 
			
		||||
description: Result of parsing non_string_key_of_object.kcl
 | 
			
		||||
---
 | 
			
		||||
{
 | 
			
		||||
  "Ok": {
 | 
			
		||||
    "body": [
 | 
			
		||||
      {
 | 
			
		||||
        "declaration": {
 | 
			
		||||
          "end": 19,
 | 
			
		||||
          "id": {
 | 
			
		||||
            "end": 3,
 | 
			
		||||
            "name": "obj",
 | 
			
		||||
            "start": 0,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
          "init": {
 | 
			
		||||
            "end": 19,
 | 
			
		||||
            "properties": [
 | 
			
		||||
              {
 | 
			
		||||
                "end": 17,
 | 
			
		||||
                "key": {
 | 
			
		||||
                  "end": 11,
 | 
			
		||||
                  "name": "key",
 | 
			
		||||
                  "start": 8,
 | 
			
		||||
                  "type": "Identifier"
 | 
			
		||||
                },
 | 
			
		||||
                "start": 8,
 | 
			
		||||
                "type": "ObjectProperty",
 | 
			
		||||
                "value": {
 | 
			
		||||
                  "end": 17,
 | 
			
		||||
                  "raw": "123",
 | 
			
		||||
                  "start": 14,
 | 
			
		||||
                  "type": "Literal",
 | 
			
		||||
                  "type": "Literal",
 | 
			
		||||
                  "value": {
 | 
			
		||||
                    "value": 123.0,
 | 
			
		||||
                    "suffix": "None"
 | 
			
		||||
                  }
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ],
 | 
			
		||||
            "start": 6,
 | 
			
		||||
            "type": "ObjectExpression",
 | 
			
		||||
            "type": "ObjectExpression"
 | 
			
		||||
          },
 | 
			
		||||
          "start": 0,
 | 
			
		||||
          "type": "VariableDeclarator"
 | 
			
		||||
        },
 | 
			
		||||
        "end": 19,
 | 
			
		||||
        "kind": "const",
 | 
			
		||||
        "start": 0,
 | 
			
		||||
        "type": "VariableDeclaration",
 | 
			
		||||
        "type": "VariableDeclaration"
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "declaration": {
 | 
			
		||||
          "end": 32,
 | 
			
		||||
          "id": {
 | 
			
		||||
            "end": 23,
 | 
			
		||||
            "name": "num",
 | 
			
		||||
            "start": 20,
 | 
			
		||||
            "type": "Identifier"
 | 
			
		||||
          },
 | 
			
		||||
          "init": {
 | 
			
		||||
            "computed": false,
 | 
			
		||||
            "end": 32,
 | 
			
		||||
            "object": {
 | 
			
		||||
              "end": 29,
 | 
			
		||||
              "name": "obj",
 | 
			
		||||
              "start": 26,
 | 
			
		||||
              "type": "Identifier",
 | 
			
		||||
              "type": "Identifier"
 | 
			
		||||
            },
 | 
			
		||||
            "property": {
 | 
			
		||||
              "end": 31,
 | 
			
		||||
              "raw": "3",
 | 
			
		||||
              "start": 30,
 | 
			
		||||
              "type": "Literal",
 | 
			
		||||
              "type": "Literal",
 | 
			
		||||
              "value": {
 | 
			
		||||
                "value": 3.0,
 | 
			
		||||
                "suffix": "None"
 | 
			
		||||
              }
 | 
			
		||||
            },
 | 
			
		||||
            "start": 26,
 | 
			
		||||
            "type": "MemberExpression",
 | 
			
		||||
            "type": "MemberExpression"
 | 
			
		||||
          },
 | 
			
		||||
          "start": 20,
 | 
			
		||||
          "type": "VariableDeclarator"
 | 
			
		||||
        },
 | 
			
		||||
        "end": 32,
 | 
			
		||||
        "kind": "const",
 | 
			
		||||
        "start": 20,
 | 
			
		||||
        "type": "VariableDeclaration",
 | 
			
		||||
        "type": "VariableDeclaration"
 | 
			
		||||
      }
 | 
			
		||||
    ],
 | 
			
		||||
    "end": 33,
 | 
			
		||||
    "start": 0
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
@ -0,0 +1,14 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/simulation_tests.rs
 | 
			
		||||
description: Error from executing non_string_key_of_object.kcl
 | 
			
		||||
---
 | 
			
		||||
KCL Semantic error
 | 
			
		||||
 | 
			
		||||
  × semantic: Only strings can be used as the property of an object, but
 | 
			
		||||
  │ you're using a number
 | 
			
		||||
   ╭─[2:7]
 | 
			
		||||
 1 │ obj = { key = 123 }
 | 
			
		||||
 2 │ num = obj[3]
 | 
			
		||||
   ·       ───┬──
 | 
			
		||||
   ·          ╰── tests/non_string_key_of_object/input.kcl
 | 
			
		||||
   ╰────
 | 
			
		||||
							
								
								
									
										2
									
								
								rust/kcl-lib/tests/non_string_key_of_object/input.kcl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								rust/kcl-lib/tests/non_string_key_of_object/input.kcl
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,2 @@
 | 
			
		||||
obj = { key = 123 }
 | 
			
		||||
num = obj[3]
 | 
			
		||||
							
								
								
									
										6
									
								
								rust/kcl-lib/tests/non_string_key_of_object/ops.snap
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								rust/kcl-lib/tests/non_string_key_of_object/ops.snap
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,6 @@
 | 
			
		||||
---
 | 
			
		||||
source: kcl/src/simulation_tests.rs
 | 
			
		||||
description: Operations executed non_string_key_of_object.kcl
 | 
			
		||||
snapshot_kind: text
 | 
			
		||||
---
 | 
			
		||||
[]
 | 
			
		||||
		Reference in New Issue
	
	Block a user