lancelot 0.3.5 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +39 -6
- data/ext/lancelot/Cargo.lock +11 -34
- data/lib/lancelot/version.rb +1 -1
- data/lib/lancelot.rb +14 -1
- metadata +3 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d6f3e8538cc95fc2db6e6f5968998c67b367c7c6c840303d51362494e90feb7f
|
|
4
|
+
data.tar.gz: 44152d9aa613f53f2eaa945fa480a9b7116bdd4dd39cbecfe7a134fefcbd81ca
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8078f10a7b8b06de136461476cd81daa989b974e784f0685abf022f9e0ef10997debc4dd76bfbf23d80f22146295920ae27fbcada3322675f104bdbefcf94afc
|
|
7
|
+
data.tar.gz: 0de47573553ccebcf27abf111f884092695f22b52d94a36d0f7a422d0df6c9d992e2ae69a55a93f8e3a4fe40cfed2a7468a769a585274b00efeb2c0fea5229af
|
data/Rakefile
CHANGED
|
@@ -1,20 +1,53 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require "bundler/gem_tasks"
|
|
4
|
-
require "
|
|
5
|
-
|
|
6
|
-
RSpec::Core::RakeTask.new(:spec)
|
|
4
|
+
require "rake/extensiontask"
|
|
7
5
|
|
|
8
|
-
|
|
6
|
+
# Dev-only tooling (rspec, standard) is absent from the precompiled-gem build
|
|
7
|
+
# environment (the cross-gem container and the `gem build` step install only the
|
|
8
|
+
# runtime deps). Guard each require so loading the Rakefile to drive `native:<plat>`
|
|
9
|
+
# / `compile` never explodes on a missing development gem. The tasks they define are
|
|
10
|
+
# only registered when the gem is present.
|
|
11
|
+
begin
|
|
12
|
+
require "rspec/core/rake_task"
|
|
13
|
+
RSpec::Core::RakeTask.new(:spec)
|
|
14
|
+
rescue LoadError
|
|
15
|
+
# rspec unavailable (e.g. precompiled-gem build) -> skip the :spec task.
|
|
16
|
+
end
|
|
9
17
|
|
|
10
|
-
|
|
18
|
+
begin
|
|
19
|
+
require "standard/rake"
|
|
20
|
+
rescue LoadError
|
|
21
|
+
# standard unavailable -> skip its rake tasks.
|
|
22
|
+
end
|
|
11
23
|
|
|
12
24
|
task build: :compile
|
|
13
25
|
|
|
26
|
+
# Load the gemspec ONCE and hand it to Rake::ExtensionTask so that, in addition to
|
|
27
|
+
# the plain `compile` task, rake-compiler generates the per-platform `native:<plat>`
|
|
28
|
+
# tasks the precompiled-gem release pipeline drives (e.g. native:x86_64-linux).
|
|
14
29
|
GEMSPEC = Gem::Specification.load("lancelot.gemspec")
|
|
15
30
|
|
|
16
31
|
Rake::ExtensionTask.new("lancelot", GEMSPEC) do |ext|
|
|
17
32
|
ext.lib_dir = "lib/lancelot"
|
|
33
|
+
# Enable cross-compilation so `rake native:<platform>` exists for every platform
|
|
34
|
+
# the release matrix builds. The linux legs run inside rb-sys-dock; arm64-darwin
|
|
35
|
+
# builds natively on an Apple-Silicon runner.
|
|
36
|
+
ext.cross_compile = true
|
|
37
|
+
ext.cross_platform = %w[
|
|
38
|
+
x86_64-linux
|
|
39
|
+
aarch64-linux
|
|
40
|
+
arm64-darwin
|
|
41
|
+
]
|
|
18
42
|
end
|
|
19
43
|
|
|
20
|
-
task
|
|
44
|
+
# Default task: only depend on tasks that always exist. `spec`/`standard` are
|
|
45
|
+
# conditionally defined above, so reference them lazily to avoid a hard failure
|
|
46
|
+
# when the dev gems are absent.
|
|
47
|
+
desc "Compile, then run specs and the linter when available"
|
|
48
|
+
task :default do
|
|
49
|
+
Rake::Task["clobber"].invoke
|
|
50
|
+
Rake::Task["compile"].invoke
|
|
51
|
+
Rake::Task["spec"].invoke if Rake::Task.task_defined?("spec")
|
|
52
|
+
Rake::Task["standard"].invoke if Rake::Task.task_defined?("standard")
|
|
53
|
+
end
|
data/ext/lancelot/Cargo.lock
CHANGED
|
@@ -420,20 +420,18 @@ dependencies = [
|
|
|
420
420
|
|
|
421
421
|
[[package]]
|
|
422
422
|
name = "bindgen"
|
|
423
|
-
version = "0.
|
|
423
|
+
version = "0.72.1"
|
|
424
424
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
425
|
-
checksum = "
|
|
425
|
+
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
|
|
426
426
|
dependencies = [
|
|
427
427
|
"bitflags",
|
|
428
428
|
"cexpr",
|
|
429
429
|
"clang-sys",
|
|
430
|
-
"itertools 0.
|
|
431
|
-
"lazy_static",
|
|
432
|
-
"lazycell",
|
|
430
|
+
"itertools 0.13.0",
|
|
433
431
|
"proc-macro2",
|
|
434
432
|
"quote",
|
|
435
433
|
"regex",
|
|
436
|
-
"rustc-hash
|
|
434
|
+
"rustc-hash",
|
|
437
435
|
"shlex",
|
|
438
436
|
"syn 2.0.117",
|
|
439
437
|
]
|
|
@@ -2250,15 +2248,6 @@ dependencies = [
|
|
|
2250
2248
|
"serde",
|
|
2251
2249
|
]
|
|
2252
2250
|
|
|
2253
|
-
[[package]]
|
|
2254
|
-
name = "itertools"
|
|
2255
|
-
version = "0.12.1"
|
|
2256
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2257
|
-
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
|
|
2258
|
-
dependencies = [
|
|
2259
|
-
"either",
|
|
2260
|
-
]
|
|
2261
|
-
|
|
2262
2251
|
[[package]]
|
|
2263
2252
|
name = "itertools"
|
|
2264
2253
|
version = "0.13.0"
|
|
@@ -2840,12 +2829,6 @@ version = "1.5.0"
|
|
|
2840
2829
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2841
2830
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
2842
2831
|
|
|
2843
|
-
[[package]]
|
|
2844
|
-
name = "lazycell"
|
|
2845
|
-
version = "1.3.0"
|
|
2846
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
2847
|
-
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
2848
|
-
|
|
2849
2832
|
[[package]]
|
|
2850
2833
|
name = "leb128fmt"
|
|
2851
2834
|
version = "0.1.0"
|
|
@@ -3611,7 +3594,7 @@ dependencies = [
|
|
|
3611
3594
|
"pin-project-lite",
|
|
3612
3595
|
"quinn-proto",
|
|
3613
3596
|
"quinn-udp",
|
|
3614
|
-
"rustc-hash
|
|
3597
|
+
"rustc-hash",
|
|
3615
3598
|
"rustls",
|
|
3616
3599
|
"socket2",
|
|
3617
3600
|
"thiserror",
|
|
@@ -3631,7 +3614,7 @@ dependencies = [
|
|
|
3631
3614
|
"lru-slab",
|
|
3632
3615
|
"rand 0.9.2",
|
|
3633
3616
|
"ring",
|
|
3634
|
-
"rustc-hash
|
|
3617
|
+
"rustc-hash",
|
|
3635
3618
|
"rustls",
|
|
3636
3619
|
"rustls-pki-types",
|
|
3637
3620
|
"slab",
|
|
@@ -3817,18 +3800,18 @@ dependencies = [
|
|
|
3817
3800
|
|
|
3818
3801
|
[[package]]
|
|
3819
3802
|
name = "rb-sys"
|
|
3820
|
-
version = "0.9.
|
|
3803
|
+
version = "0.9.128"
|
|
3821
3804
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3822
|
-
checksum = "
|
|
3805
|
+
checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
|
|
3823
3806
|
dependencies = [
|
|
3824
3807
|
"rb-sys-build",
|
|
3825
3808
|
]
|
|
3826
3809
|
|
|
3827
3810
|
[[package]]
|
|
3828
3811
|
name = "rb-sys-build"
|
|
3829
|
-
version = "0.9.
|
|
3812
|
+
version = "0.9.128"
|
|
3830
3813
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3831
|
-
checksum = "
|
|
3814
|
+
checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
|
|
3832
3815
|
dependencies = [
|
|
3833
3816
|
"bindgen",
|
|
3834
3817
|
"lazy_static",
|
|
@@ -3973,12 +3956,6 @@ dependencies = [
|
|
|
3973
3956
|
"serde_derive",
|
|
3974
3957
|
]
|
|
3975
3958
|
|
|
3976
|
-
[[package]]
|
|
3977
|
-
name = "rustc-hash"
|
|
3978
|
-
version = "1.1.0"
|
|
3979
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3980
|
-
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
3981
|
-
|
|
3982
3959
|
[[package]]
|
|
3983
3960
|
name = "rustc-hash"
|
|
3984
3961
|
version = "2.1.1"
|
|
@@ -4466,7 +4443,7 @@ dependencies = [
|
|
|
4466
4443
|
"rayon",
|
|
4467
4444
|
"regex",
|
|
4468
4445
|
"rust-stemmers",
|
|
4469
|
-
"rustc-hash
|
|
4446
|
+
"rustc-hash",
|
|
4470
4447
|
"serde",
|
|
4471
4448
|
"serde_json",
|
|
4472
4449
|
"sketches-ddsketch",
|
data/lib/lancelot/version.rb
CHANGED
data/lib/lancelot.rb
CHANGED
|
@@ -1,7 +1,20 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
require_relative "lancelot/version"
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
# Load the compiled Rust extension. Precompiled (platform) gems install it into a
|
|
6
|
+
# Ruby-ABI-versioned subdir (lib/lancelot/<major.minor>/lancelot.{so,bundle}) so a
|
|
7
|
+
# single fat gem can carry a binary per Ruby version; source/dev builds place it flat
|
|
8
|
+
# at lib/lancelot/lancelot.{so,bundle}. Try the versioned path first, fall back to the
|
|
9
|
+
# flat one. Resolution goes through $LOAD_PATH (`require`, never `require_relative`)
|
|
10
|
+
# because RubyGems installs native extensions outside the gem's lib/ dir.
|
|
11
|
+
begin
|
|
12
|
+
RUBY_VERSION =~ /(\d+\.\d+)/
|
|
13
|
+
require "lancelot/#{Regexp.last_match(1)}/lancelot"
|
|
14
|
+
rescue LoadError
|
|
15
|
+
require "lancelot/lancelot"
|
|
16
|
+
end
|
|
17
|
+
|
|
5
18
|
require_relative "lancelot/dataset"
|
|
6
19
|
require_relative "lancelot/rank_fusion"
|
|
7
20
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lancelot
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Petersen
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rb_sys
|
|
@@ -139,7 +138,6 @@ metadata:
|
|
|
139
138
|
homepage_uri: https://github.com/scientist-labs/lancelot
|
|
140
139
|
source_code_uri: https://github.com/scientist-labs/lancelot
|
|
141
140
|
changelog_uri: https://github.com/scientist-labs/lancelot/blob/main/CHANGELOG.md
|
|
142
|
-
post_install_message:
|
|
143
141
|
rdoc_options: []
|
|
144
142
|
require_paths:
|
|
145
143
|
- lib
|
|
@@ -154,8 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
154
152
|
- !ruby/object:Gem::Version
|
|
155
153
|
version: '0'
|
|
156
154
|
requirements: []
|
|
157
|
-
rubygems_version: 3.
|
|
158
|
-
signing_key:
|
|
155
|
+
rubygems_version: 3.6.9
|
|
159
156
|
specification_version: 4
|
|
160
157
|
summary: Ruby bindings for Lance - a modern columnar data format for ML
|
|
161
158
|
test_files: []
|