Skip to content

Commit 9b0ad2a

Browse files
Add BinaryBuilder build_tarballs.jl script (#15)
* Add BinaryBuilder build_tarballs.jl script * Add MIT Licenses * Update README * Don't add dep yet
1 parent b415021 commit 9b0ad2a

File tree

8 files changed

+98
-4
lines changed

8 files changed

+98
-4
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
/Manifest.toml
1+
Manifest.toml
22
*.log

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 RelationalAI, and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

deps/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# deps/
2+
3+
- `deps/object_store_ffi` -- the Rust library that defines a C API for [`object_store`](https://github.com/apache/arrow-rs/tree/master/object_store).
4+
- `deps/binary_builder` -- the script that uses [`BinaryBuilder.jl`](https://github.com/JuliaPackaging/BinaryBuilder.jl) to build the `object_store_ffi` binaries and generate the `object_store_ffi_jll.jl` package.

deps/binary_builder/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/products/
2+
/build/

deps/binary_builder/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae"
3+
4+
[compat]
5+
BinaryBuilder = "0.5"

deps/binary_builder/build_tarballs.jl

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using BinaryBuilder
2+
3+
cd(@__DIR__)
4+
5+
name = "object_store_ffi"
6+
version = v"0.1.0"
7+
8+
sources = [
9+
DirectorySource(joinpath("..", "object_store_ffi")),
10+
]
11+
12+
# Bash recipe for building across all platforms
13+
script = raw"""
14+
cd ${WORKSPACE}/srcdir/
15+
cargo rustc --release --lib --crate-type=cdylib
16+
install -Dvm 755 "target/${rust_target}/release/libobject_store_ffi.${dlext}" "${libdir}/libobject_store_ffi.${dlext}"
17+
"""
18+
19+
# We could potentially support more platforms, if required.
20+
# Except perhaps i686 Windows and Musl systems.
21+
platforms = [
22+
Platform("aarch64", "macos"),
23+
Platform("x86_64", "linux"),
24+
# Platform("x86_64", "macos"),
25+
# Platform("aarch64", "linux"),
26+
]
27+
28+
# The products that we will ensure are always built
29+
products = [
30+
LibraryProduct("libobject_store_ffi", :libobject_store_ffi),
31+
]
32+
33+
# Dependencies that must be installed before this package can be built
34+
dependencies = [
35+
]
36+
37+
# Build the tarballs
38+
build_tarballs(
39+
ARGS, name, version, sources, script, platforms, products, dependencies;
40+
compilers=[:c, :rust], julia_compat="1.6"
41+
)

deps/object_store_ffi/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@ edition = "2021"
77
[lib]
88
crate-type = ["cdylib"]
99

10-
[profile.release]
11-
debug = true
10+
# # https://doc.rust-lang.org/cargo/reference/profiles.html
11+
# [profile.release]
12+
# debug = "limited"
1213

1314
[dependencies]
1415
tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "signal", "time"] }
1516
bytes = "1.0"
1617
tracing = "0.1"
1718
tracing-subscriber = "0.3"
1819
futures-util = "0.3"
19-
# object_store = { git = "https://github.com/andrebsguedes/arrow-rs.git", branch = "dns", features = ["azure"] }
2020
reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "trust-dns"] }
2121
object_store = { version = "0.8", features = ["azure"] }
2222
thiserror = "1"

deps/object_store_ffi/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 RelationalAI, and contributors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)