-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: update build process #35
feat: update build process #35
Conversation
- name: install rustup | ||
if: ${{ !matrix.settings.use-docker }} | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh | ||
sh rustup-init.sh -y --default-toolchain none | ||
rustup target add ${{ matrix.target }} | ||
rustup target add ${{ matrix.settings.target }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a note, this step can be replaced with an action
- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.use-docker }}
with:
toolchain: stable
targets: ${{ matrix.settings.target }}
# - name: Windows arm64 | ||
# target: aarch64-pc-windows-msvc | ||
# runner: windows-latest | ||
# use-docker: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a hard time finding a container that was easy to setup for building Windows on arm64. I suppose if someone wants in the future should be easy enough to turn on but ran out of time and just commented this case out.
I also got x86 musl building natively and with rust, but not sure if you want to include that. I had trouble with arm but also didnt try super hard because its sort of a minority architecture. Could be turned on but wasnt sure of the implications relative to the assembly in the lib. I think they are compatible and its just the build tooling and abi layout that changes. Honestly, I'm not super familiar with musl is why I removed it. https://github.com/matthewkeil/hashtree/actions/runs/9272182080/job/25509333449 |
are you using the rust bindings in js? |
Yes @arnetheduck. In ChainSafe/hashtree-js#3 Are using a submodule from the branch this PR is built from but will move to the crate once its published. Would you mind rerunning that linux/arm64 build that was hanging as a sanity check they are all working here. I ran in my fork but would love to see the green check here too |
(sorry for off-topic) @matthewkeil ah curious - I would have thought that the C files are both easier to use and "thinner" in terms of compiler support that's needed to get to the finish line - what motivates the use of rust in this case? |
Our bindings were built with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for this one, after offline discussions this looks good to me
Motivation
Had some issues with compilation of rust bindings for
hashtree-js
which is a node.js wrapper around this lib. The rust bindings did not build for WindowsInclusions
build.rs
to compile on WindowsMakefile
CC
for default situationsCC
for cross-compilation situationsobjarm
andobjx86
intoOBJ_LIST
dependent on platformDockerfile
for compiling and testing rust bindings onlinux-arm64