3 ms·
The modeling language for Fornjot is Rust. To me, this seems like an akward language to write models in. Not saying that OpenSCAD:s modeling is amazing though.
by progre 5y ago
The modeling language for Fornjot is Rust. To me, this seems like an akward language to write models in. Not saying that OpenSCAD:s modeling is amazing though.
- ur-whale 5y ago> The modeling language for Fornjot is Rust. To me, this seems like an akward language Yeah, that is a very weird choice indeed. Brings a ton of constraints to the user (borrow checker for 3d? why?) that have nothing to do with 3D modeling. I would have understood something like Python or Lua a lot better.
- riidom 5y agoThis should be a good use-case for rust-based scripting languages, I think. I loosely followed a project of that kind a while ago, I don't quite remember if it was Gluon [0] or Dyon [1]. Not sure if these are still active, or if another competitor showed up in meantime. ___ [0] https://github.com/gluon-lang/gluon https://github.com/gluon-lang/gluon [1] https://github.com/PistonDevelopers/dyon https://github.com/PistonDevelopers/dyon
- hannobraun 5y agoHey, author of Fornjot here. > The modeling language for Fornjot is Rust. To me, this seems like an akward language to write models in. I fully agree! Given that Fornjot is written in Rust, starting with Rust as the modeling language was just the most straight-forward option. But Fornjot is architected to be language-agnostic. Right now, it uses a plugin system based on dynamic linking, and you could plug anything in there that can generate C-ABI-compatible structs (the plan is to replace that with a system based on WASM). In addition, I've started splitting Fornjot into self-contained libraries[1]. Once that effort is complete, there will be lots of ways to make Fornjot available to other languages. That said, I think there's merit in having options when using Code-CAD, and Rust is certainly different enough from the typical alternatives to be valuable. I don't think it will ever be the best option for regular CAD modeling, but it might have a niche in infrastructure code that CAD models (written in other languages) use. [1] https://github.com/hannobraun/Fornjot/issues/141 https://github.com/hannobraun/Fornjot/issues/141
- ivanceras 5y agoRust has macro which allows you to write domain specific language if you want. The examples right now, is written in rust as they are still developing it. You need to have a solid core before building a domain specific language on top it.
- dymk 5y agoHaving to run the Rust compiler just to update my CAD model is a non starter though