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:
Jess Frazelle
2025-03-01 13:59:01 -08:00
committed by GitHub
parent 0a2bf4b55f
commit c3bdc6f106
1443 changed files with 509 additions and 4274 deletions

View File

@ -0,0 +1,556 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Artifact commands assembly_non_default_units.kcl
---
[
{
"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
}
},
{
"cmdId": "[uuid]",
"range": [
0,
33,
0
],
"command": {
"type": "set_scene_units",
"unit": "in"
}
},
{
"cmdId": "[uuid]",
"range": [
0,
33,
3
],
"command": {
"type": "set_scene_units",
"unit": "in"
}
},
{
"cmdId": "[uuid]",
"range": [
172,
191,
3
],
"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": 60.0,
"clobber": false,
"hide": true
}
},
{
"cmdId": "[uuid]",
"range": [
197,
232,
3
],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
"ortho": false,
"animated": false,
"adjust_camera": false,
"planar_normal": {
"x": 0.0,
"y": -1.0,
"z": 0.0
}
}
},
{
"cmdId": "[uuid]",
"range": [
197,
232,
3
],
"command": {
"type": "start_path"
}
},
{
"cmdId": "[uuid]",
"range": [
197,
232,
3
],
"command": {
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 1.0,
"y": 0.0,
"z": 0.0
}
}
},
{
"cmdId": "[uuid]",
"range": [
197,
232,
3
],
"command": {
"type": "extend_path",
"path": "[uuid]",
"segment": {
"type": "arc",
"center": {
"x": 0.0,
"y": 0.0
},
"radius": 1.0,
"start": {
"unit": "degrees",
"value": 0.0
},
"end": {
"unit": "degrees",
"value": 360.0
},
"relative": false
}
}
},
{
"cmdId": "[uuid]",
"range": [
197,
232,
3
],
"command": {
"type": "close_path",
"path_id": "[uuid]"
}
},
{
"cmdId": "[uuid]",
"range": [
0,
33,
4
],
"command": {
"type": "set_scene_units",
"unit": "in"
}
},
{
"cmdId": "[uuid]",
"range": [
89,
108,
4
],
"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": 60.0,
"clobber": false,
"hide": true
}
},
{
"cmdId": "[uuid]",
"range": [
114,
149,
4
],
"command": {
"type": "enable_sketch_mode",
"entity_id": "[uuid]",
"ortho": false,
"animated": false,
"adjust_camera": false,
"planar_normal": {
"x": 0.0,
"y": -1.0,
"z": 0.0
}
}
},
{
"cmdId": "[uuid]",
"range": [
114,
149,
4
],
"command": {
"type": "start_path"
}
},
{
"cmdId": "[uuid]",
"range": [
114,
149,
4
],
"command": {
"type": "move_path_pen",
"path": "[uuid]",
"to": {
"x": 1.0,
"y": 2.0,
"z": 0.0
}
}
},
{
"cmdId": "[uuid]",
"range": [
114,
149,
4
],
"command": {
"type": "extend_path",
"path": "[uuid]",
"segment": {
"type": "arc",
"center": {
"x": 0.0,
"y": 2.0
},
"radius": 1.0,
"start": {
"unit": "degrees",
"value": 0.0
},
"end": {
"unit": "degrees",
"value": 360.0
},
"relative": false
}
}
},
{
"cmdId": "[uuid]",
"range": [
114,
149,
4
],
"command": {
"type": "close_path",
"path_id": "[uuid]"
}
}
]

View File

@ -0,0 +1,6 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Artifact graph flowchart assembly_non_default_units.kcl
extension: md
snapshot_kind: binary
---

View File

@ -0,0 +1,21 @@
```mermaid
flowchart LR
subgraph path2 [Path]
2["Path<br>[197, 232, 3]"]
3["Segment<br>[197, 232, 3]"]
4[Solid2d]
end
subgraph path6 [Path]
6["Path<br>[114, 149, 4]"]
7["Segment<br>[114, 149, 4]"]
8[Solid2d]
end
1["Plane<br>[172, 191, 3]"]
5["Plane<br>[89, 108, 4]"]
1 --- 2
2 --- 3
2 --- 4
5 --- 6
6 --- 7
6 --- 8
```

View File

@ -0,0 +1,143 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Result of parsing assembly_non_default_units.kcl
---
{
"Ok": {
"body": [
{
"end": 172,
"path": {
"type": "Kcl",
"filename": "other1.kcl"
},
"selector": {
"type": "None",
"alias": null
},
"start": 153,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 192,
"path": {
"type": "Kcl",
"filename": "other2.kcl"
},
"selector": {
"type": "None",
"alias": null
},
"start": 173,
"type": "ImportStatement",
"type": "ImportStatement"
},
{
"end": 200,
"expression": {
"end": 200,
"name": "other1",
"start": 194,
"type": "Identifier",
"type": "Identifier"
},
"start": 194,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
},
{
"end": 207,
"expression": {
"end": 207,
"name": "other2",
"start": 201,
"type": "Identifier",
"type": "Identifier"
},
"start": 201,
"type": "ExpressionStatement",
"type": "ExpressionStatement"
}
],
"end": 208,
"innerAttrs": [
{
"end": 33,
"name": {
"end": 9,
"name": "settings",
"start": 1,
"type": "Identifier"
},
"properties": [
{
"end": 32,
"key": {
"end": 27,
"name": "defaultLengthUnit",
"start": 10,
"type": "Identifier"
},
"start": 10,
"type": "ObjectProperty",
"value": {
"end": 32,
"name": "in",
"start": 30,
"type": "Identifier",
"type": "Identifier"
}
}
],
"start": 0,
"type": "Annotation"
}
],
"nonCodeMeta": {
"nonCodeNodes": {
"1": [
{
"end": 194,
"start": 192,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
}
]
},
"startNodes": [
{
"end": 36,
"start": 33,
"type": "NonCodeNode",
"value": {
"type": "newLine"
}
},
{
"end": 87,
"start": 36,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "Use a default unit that isn't the default of mm.",
"style": "line"
}
},
{
"end": 152,
"start": 88,
"type": "NonCodeNode",
"value": {
"type": "blockComment",
"value": "This should look like two circles barely touching each other.",
"style": "line"
}
}
]
},
"start": 0
}
}

View File

@ -0,0 +1,3 @@
@settings(defaultLengthUnit = in)
export radius = 1

View File

@ -0,0 +1,10 @@
@settings(defaultLengthUnit = in)
// Use a default unit that isn't the default of mm.
// This should look like two circles barely touching each other.
import "other1.kcl"
import "other2.kcl"
other1
other2

View File

@ -0,0 +1,52 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Operations executed assembly_non_default_units.kcl
---
[
{
"labeledArgs": {
"data": {
"value": {
"type": "String",
"value": "XZ"
},
"sourceRange": [
186,
190,
3
]
}
},
"name": "startSketchOn",
"sourceRange": [
172,
191,
3
],
"type": "StdLibCall",
"unlabeledArg": null
},
{
"labeledArgs": {
"data": {
"value": {
"type": "String",
"value": "XZ"
},
"sourceRange": [
103,
107,
4
]
}
},
"name": "startSketchOn",
"sourceRange": [
89,
108,
4
],
"type": "StdLibCall",
"unlabeledArg": null
}
]

View File

@ -0,0 +1,8 @@
@settings(defaultLengthUnit = in)
// This is not used, but it triggers the problem.
import radius from "globals.kcl"
// Use the same units as in the main importing file.
startSketchOn('XZ')
|> circle(center = [0, 0], radius = 1)

View File

@ -0,0 +1,6 @@
@settings(defaultLengthUnit = in)
// Use the same units as in the main importing file.
startSketchOn('XZ')
|> circle(center = [0, 2], radius = 1)

View File

@ -0,0 +1,32 @@
---
source: kcl-lib/src/simulation_tests.rs
description: Variables in memory after executing assembly_non_default_units.kcl
---
{
"other1": {
"type": "Module",
"value": 3,
"__meta": [
{
"sourceRange": [
153,
172,
0
]
}
]
},
"other2": {
"type": "Module",
"value": 4,
"__meta": [
{
"sourceRange": [
173,
192,
0
]
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB