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

No std(WIP) #2

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Rust

on:
push:
branches: [main]
pull_request:
branches: [main]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,18 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk


# Added by cargo
#
# already existing elements were commented out

/target
#Cargo.lock
examples/Cargo.lock
examples/target
examples/target/
*.so
.DS_STORE
build/
examples/src/*.hdf5
Empty file added CHANGELOG.md
Empty file.
62 changes: 62 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[package]
authors = ["aljun <[email protected]>"]
edition = "2018"
license = "Apache-2.0"
name = "hora"
version = "0.1.0"

description = "Hora Search Everywhere"
documentation = "https://docs.rs/hora/"
repository = "https://github.com/hora-search/hora"

categories = ["artificial intelligence"]
keywords = ["approximate nearest neighbor search", "artificial intelligence", "SIMD", "nearest-neighbor-search", "no_std"]

[profile.dev]
codegen-units = 4
debug = 1 # required for line numbers in tests, see tikv #5049
debug-assertions = true
incremental = true
lto = false
opt-level = 0
overflow-checks = false
panic = 'unwind'
rpath = false

[profile.release]
codegen-units = 1
debug = false
debug-assertions = false
incremental = false
lto = "fat"
opt-level = 3
overflow-checks = false
panic = 'unwind'
rpath = false

[features]
no_std = ["hashbrown"]
simd = ["packed_simd"]

[dependencies]
bincode = "1.3.2"
fixedbitset = "0.4.0"
hashbrown = {version = "0.11.2", optional = true}
log = "^0.4"
# num = "0.4.0"
packed_simd = {version = "0.3.5", package = "packed_simd_2", optional = true}
rand = "0.8.3"
rayon = "^1.5"
serde = {version = "1.0", features = ["derive"]}
smallvec = {version = "1.6.1", features = ["serde"], optional = true}

[dev-dependencies]
criterion = "0.3.4"

[dependencies.num]
version = "0.4"
default-features = false

[[bench]]
harness = false
name = "bench_metrics"
Loading