3 ms·
For the core of my engine, I just need to build some basic mesh tools like mesh(), combine(), intersect(), difference(). Everything else, common objects like cu
by mg 11mo ago
For the core of my engine, I just need to build some basic mesh tools like mesh(), combine(), intersect(), difference(). Everything else, common objects like cube(), sphere(), disk() and common operations like move() and rotate() is then simple.
SolidPython: This seems to rely on OpenScad. I think a solution without dependencies will fare better in the long run.
PythonSCAD: This also seems to be heavily interwoven with OpenScad.
CadQuery: This might be interesting. I will probably start with some code for mesh(), combine(), intersect(), difference() that I write myself and then look into libraries like this one and evaluate if it makes sense to swap out my own for one of them. But I have the feeling they will not match my preferred architecture closely enough.
What do you mean by "Due to the large size, python really isn't suitable for embedding in wasm"? In what regard is Python "big"?
- VorpalWay 11mo agoPython is big in the sense that your wasm bundle with the CPython runtime and a bunch of the standard library are going to be several MB most likely. Just libpython.so in my system is 8.7 MB for example. The standard library is an additional 56 MB. Yes, you can compress and strip down unused parts, but it will still not be a fast loading page if you want to provide a reasonable coding experience for the user to write python in. And it will eat server bandwidth, not a big deal if it is just you self hosting for yourself, but if you want to make this a public service that does matter.
- mg 11mo ago8.6 MB - wow! There must be way more in there than just running Python code. I once implemented a small subset of PHP in PHP (just enough to run the code I wanted it to run) and it took me 320 lines of code. The file (gloriously named php.php) was less than 10k in size. Still, loading 8.7 MB is kinda ok. It takes about 2s on my pretty normal home connection. Indeed, https://pyodide.org/en/stable/console.html https://pyodide.org/en/stable/console.html loads a wasm that is 8.7 MB. It also loads "python_stdlib.zip" which is 2.42 MB. Maybe that is the whole standard lib in compressed form? I wonder why they publish a zip. Browsers natively support all kinds of nice compression. I guess there are leaner implementations than CPython? https://pyscript.net https://pyscript.net loads a file "mircopython.wasm" that is 434 KB.