error[E0080]: index out of bounds error when trying to install LuaCAD
โ Rust ๐ 2026-04-19 ๐ค surdeus ๐๏ธ 3HI,
I am trying to install LuaCAD which is a scripting 3d CAD that uses a Rust engine to convert Lua code to openscad code. LuaCAD was downloaded from github (GitHub - ad-si/LuaCAD: Create CAD models with Lua and OpenSCAD ยท GitHub)
I Have GCC installed (v=14.2), Rust is installed (v=1.95), i also have the csgrs (v=0.20.1) crate installed which luaCAD requires. I am running mx linux.
The issue seems to be in the manifold-sys crate (v=0.1.0) and specifically the bindings.rs file however my knowledge of Rust is minimal (just a beginner really) so not sure whether this is an error in the code or an incompatibility issue related to the manifold-sys library. The full error is below.
Any help with this is much appreciated.
error[E0080]: index out of bounds: the length is 1 but the index is 8
--> /home/richard/Dev/CAD/LuaCAD/target/release/build/manifold-sys-5178a39b48578b69/out/bindings.rs:102:3
|
102 | / ["Size of ManifoldManifoldPair"]
103 | | [::std::mem::size_of::<ManifoldManifoldPair>() - 8usize];
| |____________________________________________________________^ evaluation of `_` failed here
error[E0080]: index out of bounds: the length is 1 but the index is 32
--> /home/richard/Dev/CAD/LuaCAD/target/release/build/manifold-sys-5178a39b48578b69/out/bindings.rs:218:3
|
218 | / ["Size of ManifoldMeshGLOptions"]
219 | | [::std::mem::size_of::<ManifoldMeshGLOptions>() - 32usize];
| |______________________________________________________________^ evaluation of `_` failed here
error[E0080]: index out of bounds: the length is 1 but the index is 32
--> /home/richard/Dev/CAD/LuaCAD/target/release/build/manifold-sys-5178a39b48578b69/out/bindings.rs:262:3
|
262 | / ["Size of ManifoldMeshGL64Options"]
263 | | [::std::mem::size_of::<ManifoldMeshGL64Options>() - 32usize];
| |________________________________________________________________^ evaluation of `_` failed here
For more information about this error, try `rustc --explain E0080`.
error: could not compile `manifold-sys` (lib) due to 3 previous errors
error: failed to compile `luacad v0.1.0 (/home/richard/Dev/CAD/LuaCAD/crates/luacad)`, intermediate artifacts can be found at `/home/richard/Dev/CAD/LuaCAD/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_BUILD_BUILD_DIR` to that path.
make: *** [makefile:64: install] Error 101
4 posts - 2 participants
๐ท๏ธ Rust_feed