Skip to content
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

add libtree_sitter_highlight #4694

Merged
merged 5 commits into from
Mar 30, 2022

Conversation

Pangoraw
Copy link
Contributor

The crate type is coded to be staticlib or lib but using rustc --crate-type we can create a shared library.

T/tree_sitter_highlight/build_tarballs.jl Outdated Show resolved Hide resolved
T/tree_sitter_highlight/build_tarballs.jl Outdated Show resolved Hide resolved
Pangoraw and others added 2 commits March 31, 2022 00:26
Co-authored-by: Mosè Giordano <giordano@users.noreply.github.com>
@Pangoraw
Copy link
Contributor Author

Pangoraw commented Mar 30, 2022

I am looking into the failure on windows

Edit: done

@giordano giordano enabled auto-merge (squash) March 30, 2022 23:21
@giordano giordano merged commit c346753 into JuliaPackaging:master Mar 30, 2022
@Pangoraw
Copy link
Contributor Author

Thanks!

@Pangoraw Pangoraw deleted the tree_sitter_highlight branch March 31, 2022 05:01
@giordano
Copy link
Member

@Pangoraw I was trying to build hyper as a cdylib as you did here. I tried

diff --git a/H/hyper/build_tarballs.jl b/H/hyper/build_tarballs.jl
index ed311fef2..e850a20b6 100644
--- a/H/hyper/build_tarballs.jl
+++ b/H/hyper/build_tarballs.jl
@@ -3,18 +3,19 @@
 using BinaryBuilder
 
 name = "hyper"
-version = v"0.14.17"
+version = v"0.14.18"
 
 # Collection of sources required to complete build
 sources = [
     ArchiveSource("https://github.com/hyperium/hyper/archive/refs/tags/v$(version).tar.gz",
-                  "64420fd550f43af09b0722b3504d4fd919de642d63f01ad54108aa854f5f5470"),
+                  "6095636d02ea5af3ff5f06d80b9466f7b58ba76339f39813b33c3f24c663fdef"),
 ]
 
 # Bash recipe for building across all platforms
 script = raw"""
 cd $WORKSPACE/srcdir/hyper*/
-RUSTFLAGS="--cfg hyper_unstable_ffi" cargo build --release --features client,http1,http2,ffi
+export RUSTFLAGS="--cfg hyper_unstable_ffi"
+cargo rustc --release --features client,http1,http2,ffi -- --crate-type=cdylib
 install -Dm 755 target/${rust_target}/release/*hyper.${dlext} "${libdir}/libhyper.${dlext}"
 """

but I get the following errors:

error: crate `http` required to be available in rlib format, but was not found in this form

error: crate `tokio` required to be available in rlib format, but was not found in this form

error: crate `futures_util` required to be available in rlib format, but was not found in this form

error: crate `http_body` required to be available in rlib format, but was not found in this form

error: crate `futures_channel` required to be available in rlib format, but was not found in this form

error: crate `tracing` required to be available in rlib format, but was not found in this form

error: crate `tower_service` required to be available in rlib format, but was not found in this form

error: crate `h2` required to be available in rlib format, but was not found in this form

error: crate `httparse` required to be available in rlib format, but was not found in this form

error: crate `want` required to be available in rlib format, but was not found in this form

Do you happen to know if there is anything we can do to get around them? I tried to google a bit, but couldn't understand much

@Pangoraw
Copy link
Contributor Author

Pangoraw commented Apr 1, 2022

Do you happen to know if there is anything we can do to get around them?

I don't really know where they are coming from 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants