Closed bschwind closed 1 year ago
I realize that this could also be a work-around for CI caching. Once we publish occt-sys
to crates.io, we can depend on it through crates.io, including it in the cache (hopefully).
Once we publish occt-sys to crates.io, we can depend on it through crates.io, including it in the cache (hopefully).
Ah yeah, if that works well then I'd much prefer that approach.
Trying hard to cut out all unnecessary files to keep the crate size under the 10MB limit - I think we may need a different approach of splitting up toolkits into different crates. I've gotten fairly good at controlling which "toolkits" (as occt calls them) get built, but getting them all to fit in one crate is looking very difficult and time consuming to accomplish.
Issues linked to https://github.com/rust-lang/crates.io/issues/195 seem to be like a good library of workarounds people do to circumvent the limit.
cc @mkovaxx
@strohel if we specify occt-sys
as a git dependency, will our cargo cache action cache it properly? I think we wouldn't be able to publish on crates.io with a git dependency, but maybe it would help with the caching situation?
Merging this for now, there can be some cleanup afterwards but I want to get this in now to get CI build times down.
Goals of this PR:
occt-sys
crate to below 10 MB, the crates.io upload limitI realized we can override opencascade files with the CMake
BUILD_PATCH
variable. I recreated theadm/MODULES
directory in our patch directory and verified that CMake picks it up and uses it instead of the file in OCCT.Next step is to modify
adm/MODULES
to cut out things we don't need, as well as editingocct-sys/Cargo.toml
to exclude big directories that we don't use anyway.Here's a reference to some of the CMake stuff in occt.
Depends on #112 being merged first.