bschwind / opencascade-rs

Rust bindings to the OpenCascade CAD Kernel
GNU Lesser General Public License v2.1
116 stars 22 forks source link

fix: allow cross compilation under builtin flag #163

Open DSchroer opened 10 months ago

DSchroer commented 10 months ago

Fix for https://github.com/bschwind/opencascade-rs/issues/160

occt-sys no longer builds OCCT in the build.rs file. This allows it to be re-included in the workspace and the build still only triggered when the builtin feature is enabled.

This also now passes the correct ENV variables to the build so it is built for TARGET and not HOST.

Finally added CI to test these builds work on various platforms.

Had to rename Handle_* to Handle* for MSVC.

bschwind commented 2 months ago

@DSchroer I'd be interested in revisiting this - since this PR was opened I have requested a larger crate size for occt-sys which means I don't need to do as many exclude shenanigans in Cargo.toml, as well as less patching of the occt src directory.

fidoriel commented 1 week ago

I am interested in a working cross compile chain. Any chance to finish this project @DSchroer? If not, I am going to try it ;)

bschwind commented 1 week ago

@fidoriel please do! I'll do my best to help review/test if any PRs are posted.

fidoriel commented 1 week ago

To sum up: the crates upload limit is overcome. Nevertheless, the windows thing deserves its own PR, being out of scope for this one. Hence I am not on windows, so cannot (and will not) test. And therefor extract the cross compile part.

So, a proper cleanup and squash is needed? I use currently a fork with this patch applied ;)

bschwind commented 6 days ago

@fidoriel yep that sounds about right!