-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uplink-sys download uplink-c libraries rather than compiling them #19
Comments
With our other bindings we made is explicitly required that the dev builds the uplink-c, usually via build scripts in the bindings; this means having the toolchain for the uplink-c build is a pre-req. Rust devs will likely have Go installed and if not, they can quickly install it. Having the Storj team manage yet-another artifact is unnecessary. |
In my opinion, it creates too much fiction. What about docs.rs? do you know if there is a way that could compile
I think that could be added to the the |
Simply because they are developers. The build instructions should work, however, there will be edge-cases that a dev with a unique environment would be expected to navigate.
Agreed - would not be much effort, however, ensuring compatibility and support with each platform developers expect the binaries to work on could create additional overhead. |
I see more of an issue when
True, however, we could require Go as a fallback solution, if for that specific arch and/or OS the crate doesn't have the binary libraries then compile uplink-c. I'll have a look at a possible solution to docs.rs without requiring this. |
I've spent some time with the docs.rs docs and it looks to me that there is no way to use a container with Go installed because it uses some predefined images. I also tried to do some hacks for skipping calling Go, in terms of not failing despite not building the docs for At this point, I don't know how we can make docs.rs work without bundling the binary libraries on it. My next try is to trick the build script to use a bundle |
I tried to conditionally build the crate including the I don't have more ideas about what more to do for building the documentation of the crates in docs.rs. It's worth commenting that even if we add the library binaries and build the crate from the docs.rs won't work either because of the dependency with |
I created #21 for the specific issue with docs.rs not building the docs for the crates and leave this issue only for the discussing and working on not requiring Go for building |
I was thinking that perhaps we could have a hybrid approach. When Go is installed and the operative system is Linux or OSX, compile the uplink-c as it's currently done. For the rest of the cases use the lib objects included in the repository. For doing it, we should include the lib objects in the repository; at the beginning only for the supported platforms, Linux and OSX , and use them when Go isn't installed. After we could include other operative systems and perhaps architectures, which would require updating the |
I realized that since uplink-c v1.8.0, there are the binary libs for the 3 major operative systems published in Github. I'm thinking of creating a proof-of-concept of the hybrid approach mentioned above. |
uplink-sys
has a build script that compiles theuplink-c
for generating the binary libraries files (e.g..so
,.dll
, etc.).uplink-c
requires Go compiling.Requiring Go causes friction for using the crate because it has to be installed
Although this is related to
uplink-sys
and Rust developers will likely use theuplink
crate, this problem is transient. Becauseuplink
depends onuplink-sys
, whenuplink
is used, it requires buildinguplink-sys
so those 2 issues listed above impactuplink
crate in the same way (see doc.rs for uplink https://docs.rs/crate/uplink/0.1.1/builds/585706).For resolving this issue, first, Storj has to publish the
uplink-c
binary libraries for the different architectures and operating systems, thatuplink-c
supports. Then we can change theuplink-sys
crate build script:The text was updated successfully, but these errors were encountered: