diff --git a/.gitignore b/.gitignore index 310f778..d6d8cc5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,2 @@ -/Manifest.toml +Manifest.toml *.log diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..33b44ba --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 RelationalAI, and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/deps/README.md b/deps/README.md new file mode 100644 index 0000000..190002f --- /dev/null +++ b/deps/README.md @@ -0,0 +1,4 @@ +# deps/ + +- `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). +- `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. diff --git a/deps/binary_builder/.gitignore b/deps/binary_builder/.gitignore new file mode 100644 index 0000000..a3ffb8b --- /dev/null +++ b/deps/binary_builder/.gitignore @@ -0,0 +1,2 @@ +/products/ +/build/ diff --git a/deps/binary_builder/Project.toml b/deps/binary_builder/Project.toml new file mode 100644 index 0000000..67f51c7 --- /dev/null +++ b/deps/binary_builder/Project.toml @@ -0,0 +1,5 @@ +[deps] +BinaryBuilder = "12aac903-9f7c-5d81-afc2-d9565ea332ae" + +[compat] +BinaryBuilder = "0.5" diff --git a/deps/binary_builder/build_tarballs.jl b/deps/binary_builder/build_tarballs.jl new file mode 100644 index 0000000..5faa674 --- /dev/null +++ b/deps/binary_builder/build_tarballs.jl @@ -0,0 +1,41 @@ +using BinaryBuilder + +cd(@__DIR__) + +name = "object_store_ffi" +version = v"0.1.0" + +sources = [ + DirectorySource(joinpath("..", "object_store_ffi")), +] + +# Bash recipe for building across all platforms +script = raw""" +cd ${WORKSPACE}/srcdir/ +cargo rustc --release --lib --crate-type=cdylib +install -Dvm 755 "target/${rust_target}/release/libobject_store_ffi.${dlext}" "${libdir}/libobject_store_ffi.${dlext}" +""" + +# We could potentially support more platforms, if required. +# Except perhaps i686 Windows and Musl systems. +platforms = [ + Platform("aarch64", "macos"), + Platform("x86_64", "linux"), + # Platform("x86_64", "macos"), + # Platform("aarch64", "linux"), +] + +# The products that we will ensure are always built +products = [ + LibraryProduct("libobject_store_ffi", :libobject_store_ffi), +] + +# Dependencies that must be installed before this package can be built +dependencies = [ +] + +# Build the tarballs +build_tarballs( + ARGS, name, version, sources, script, platforms, products, dependencies; + compilers=[:c, :rust], julia_compat="1.6" +) diff --git a/deps/object_store_ffi/Cargo.toml b/deps/object_store_ffi/Cargo.toml index d0f2716..7ffb7b2 100644 --- a/deps/object_store_ffi/Cargo.toml +++ b/deps/object_store_ffi/Cargo.toml @@ -7,8 +7,9 @@ edition = "2021" [lib] crate-type = ["cdylib"] -[profile.release] -debug = true +# # https://doc.rust-lang.org/cargo/reference/profiles.html +# [profile.release] +# debug = "limited" [dependencies] tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "signal", "time"] } @@ -16,7 +17,6 @@ bytes = "1.0" tracing = "0.1" tracing-subscriber = "0.3" futures-util = "0.3" -# object_store = { git = "https://github.com/andrebsguedes/arrow-rs.git", branch = "dns", features = ["azure"] } reqwest = { version = "0.11", default-features = false, features = ["rustls-tls", "trust-dns"] } object_store = { version = "0.8", features = ["azure"] } thiserror = "1" diff --git a/deps/object_store_ffi/LICENSE b/deps/object_store_ffi/LICENSE new file mode 100644 index 0000000..33b44ba --- /dev/null +++ b/deps/object_store_ffi/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 RelationalAI, and contributors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE.