update version numbers

main
Ziyang Hu 1 year ago
parent 776e8e26a5
commit bf43d02cc8

1
.gitignore vendored

@ -38,3 +38,4 @@ Cross.toml
/tools /tools
*.cozo_auth *.cozo_auth
.cozo_repl_history .cozo_repl_history
/venv/

18
Cargo.lock generated

@ -677,7 +677,7 @@ checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa"
[[package]] [[package]]
name = "cozo" name = "cozo"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"approx", "approx",
"base64 0.21.0", "base64 0.21.0",
@ -730,7 +730,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo-bin" name = "cozo-bin"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"async-stream", "async-stream",
"axum", "axum",
@ -759,7 +759,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo-lib-wasm" name = "cozo-lib-wasm"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"console_error_panic_hook", "console_error_panic_hook",
"cozo", "cozo",
@ -770,7 +770,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo-node" name = "cozo-node"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"cozo", "cozo",
"crossbeam", "crossbeam",
@ -781,7 +781,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo-swift" name = "cozo-swift"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"cozo", "cozo",
"swift-bridge", "swift-bridge",
@ -790,7 +790,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo_c" name = "cozo_c"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"cbindgen", "cbindgen",
"cozo", "cozo",
@ -799,7 +799,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo_java" name = "cozo_java"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"cozo", "cozo",
"jni", "jni",
@ -808,7 +808,7 @@ dependencies = [
[[package]] [[package]]
name = "cozo_py" name = "cozo_py"
version = "0.5.1" version = "0.6.0"
dependencies = [ dependencies = [
"cozo", "cozo",
"miette", "miette",
@ -817,7 +817,7 @@ dependencies = [
[[package]] [[package]]
name = "cozorocks" name = "cozorocks"
version = "0.1.5" version = "0.1.6"
dependencies = [ dependencies = [
"cc", "cc",
"cxx", "cxx",

@ -1 +1 @@
0.5.1 0.6.0

@ -1,6 +1,6 @@
[package] [package]
name = "cozo-bin" name = "cozo-bin"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
license = "MPL-2.0" license = "MPL-2.0"
description = "Standalone Cozo database" description = "Standalone Cozo database"
@ -42,7 +42,7 @@ storage-tikv = ["cozo/storage-tikv"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
cozo = { version = "0.5.1", path = "../cozo-core", default-features = false } cozo = { version = "0.6.0", path = "../cozo-core", default-features = false }
clap = { version = "4.0.26", features = ["derive"] } clap = { version = "4.0.26", features = ["derive"] }
env_logger = "0.10.0" env_logger = "0.10.0"
log = "0.4.17" log = "0.4.17"

@ -1,6 +1,6 @@
[package] [package]
name = "cozo" name = "cozo"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
description = "A general-purpose, transactional, relational database that uses Datalog and focuses on graph data and algorithms" description = "A general-purpose, transactional, relational database that uses Datalog and focuses on graph data and algorithms"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]
@ -118,7 +118,7 @@ document-features = "0.2.6"
rayon = { version = "1.5.3", optional = true } rayon = { version = "1.5.3", optional = true }
minreq = { version = "2.6.0", features = ["https-rustls"], optional = true } minreq = { version = "2.6.0", features = ["https-rustls"], optional = true }
tikv-jemallocator-global = { version = "0.5.0", optional = true } tikv-jemallocator-global = { version = "0.5.0", optional = true }
cozorocks = { path = "../cozorocks", version = "0.1.5", optional = true } cozorocks = { path = "../cozorocks", version = "0.1.6", optional = true }
sled = { version = "0.34.7", optional = true } sled = { version = "0.34.7", optional = true }
tikv-client = { version = "0.1.0", optional = true } tikv-client = { version = "0.1.0", optional = true }
tokio = { version = "1.21.2", optional = true } tokio = { version = "1.21.2", optional = true }

@ -158,26 +158,23 @@ pub enum DataValue {
Bot, Bot,
} }
/// Vector of floating numbers
#[derive(Debug, Clone, serde_derive::Serialize, serde_derive::Deserialize)] #[derive(Debug, Clone, serde_derive::Serialize, serde_derive::Deserialize)]
pub enum Vector { pub enum Vector {
/// 32-bit float array
F32(Array1<f32>), F32(Array1<f32>),
/// 64-bit float array
F64(Array1<f64>), F64(Array1<f64>),
} }
impl Vector { impl Vector {
/// Get the length of the vector
pub fn len(&self) -> usize { pub fn len(&self) -> usize {
match self { match self {
Vector::F32(v) => v.len(), Vector::F32(v) => v.len(),
Vector::F64(v) => v.len(), Vector::F64(v) => v.len(),
} }
} }
pub fn is_compatible(&self, other: &Self) -> bool {
match (self, other) {
(Vector::F32(_), Vector::F32(_)) => true,
(Vector::F64(_), Vector::F64(_)) => true,
_ => false,
}
}
pub(crate) fn el_type(&self) -> VecElementType { pub(crate) fn el_type(&self) -> VecElementType {
match self { match self {
Vector::F32(_) => VecElementType::F32, Vector::F32(_) => VecElementType::F32,

@ -68,6 +68,7 @@ pub use storage::{Storage, StoreTx};
pub use crate::data::expr::Expr; pub use crate::data::expr::Expr;
use crate::data::json::JsonValue; use crate::data::json::JsonValue;
pub use crate::data::symb::Symbol; pub use crate::data::symb::Symbol;
pub use crate::data::value::Vector;
pub use crate::fixed_rule::SimpleFixedRule; pub use crate::fixed_rule::SimpleFixedRule;
pub use crate::parse::SourceSpan; pub use crate::parse::SourceSpan;
pub use crate::runtime::callback::CallbackOp; pub use crate::runtime::callback::CallbackOp;

@ -1,6 +1,6 @@
[package] [package]
name = "cozo_c" name = "cozo_c"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
license = "MPL-2.0" license = "MPL-2.0"
homepage = "https://www.cozodb.org" homepage = "https://www.cozodb.org"
@ -38,7 +38,7 @@ io-uring = ["cozo/io-uring"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
cozo = { version = "0.5.1", path = "../cozo-core", default_features = false } cozo = { version = "0.6.0", path = "../cozo-core", default_features = false }
lazy_static = "1.4.0" lazy_static = "1.4.0"
[build-dependencies] [build-dependencies]

@ -1,6 +1,6 @@
[package] [package]
name = "cozo_java" name = "cozo_java"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
license = "MPL-2.0" license = "MPL-2.0"
homepage = "https://www.cozodb.org" homepage = "https://www.cozodb.org"
@ -40,5 +40,5 @@ io-uring = ["cozo/io-uring"]
[dependencies] [dependencies]
jni = "0.21.0" jni = "0.21.0"
# , features = ["compact"] # , features = ["compact"]
cozo = { version = "0.5.1", path = "../cozo-core", default_features = false, features = ["compact"] } cozo = { version = "0.6.0", path = "../cozo-core", default_features = false, features = ["compact"] }
lazy_static = "1.4.0" lazy_static = "1.4.0"

@ -1,6 +1,6 @@
[package] [package]
name = "cozo-node" name = "cozo-node"
version = "0.5.1" version = "0.6.0"
description = "Cozo database for NodeJS" description = "Cozo database for NodeJS"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]
license = "MPL-2.0" license = "MPL-2.0"
@ -40,7 +40,7 @@ io-uring = ["cozo/io-uring"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
cozo = { version = "0.5.1", path = "../cozo-core", default-features = false } cozo = { version = "0.6.0", path = "../cozo-core", default-features = false }
lazy_static = "1.4.0" lazy_static = "1.4.0"
crossbeam = "0.8.2" crossbeam = "0.8.2"
miette = "5.5.0" miette = "5.5.0"

@ -1,6 +1,6 @@
{ {
"name": "cozo-node", "name": "cozo-node",
"version": "0.5.1", "version": "0.6.0",
"description": "Cozo database for NodeJS", "description": "Cozo database for NodeJS",
"main": "index", "main": "index",
"files": [ "files": [

@ -126,6 +126,24 @@ fn value2js<'a>(cx: &mut impl Context<'a>, val: &DataValue) -> JsResult<'a, JsVa
target_l.as_value(cx) target_l.as_value(cx)
} }
DataValue::Bot => cx.undefined().as_value(cx), DataValue::Bot => cx.undefined().as_value(cx),
DataValue::Vec(v) => {
let target_l = cx.empty_array();
match v {
Vector::F32(a) => {
for (i, el) in a.iter().enumerate() {
let el = cx.number(*el as f64);
target_l.set(cx, i as u32, el)?;
}
}
Vector::F64(a) => {
for (i, el) in a.iter().enumerate() {
let el = cx.number(*el);
target_l.set(cx, i as u32, el)?;
}
}
}
target_l.as_value(cx)
}
}) })
} }

@ -1,6 +1,6 @@
[package] [package]
name = "cozo_py" name = "cozo_py"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
description = "Cozo database for python" description = "Cozo database for python"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]
@ -41,6 +41,6 @@ io-uring = ["cozo/io-uring"]
[dependencies] [dependencies]
cozo = { version = "0.5.1", path = "../cozo-core", default-features = false } cozo = { version = "0.6.0", path = "../cozo-core", default-features = false }
pyo3 = { version = "0.18.0", features = ["extension-module", "abi3", "abi3-py37"] } pyo3 = { version = "0.18.0", features = ["extension-module", "abi3", "abi3-py37"] }
miette = "5.5.0" miette = "5.5.0"

@ -119,6 +119,18 @@ fn value_to_py(val: DataValue, py: Python<'_>) -> PyObject {
[vld.timestamp.0 .0.into_py(py), vld.is_assert.0.into_py(py)].into_py(py) [vld.timestamp.0 .0.into_py(py), vld.is_assert.0.into_py(py)].into_py(py)
} }
DataValue::Bot => py.None(), DataValue::Bot => py.None(),
DataValue::Vec(v) => {
match v {
Vector::F32(a) => {
let vs: Vec<_> = a.into_iter().map(|v| v.into_py(py)).collect();
vs.into_py(py)
}
Vector::F64(a) => {
let vs: Vec<_> = a.into_iter().map(|v| v.into_py(py)).collect();
vs.into_py(py)
}
}
}
} }
} }

@ -1,6 +1,6 @@
[package] [package]
name = "cozo-swift" name = "cozo-swift"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
description = "Cozo database for Swift" description = "Cozo database for Swift"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]
@ -40,5 +40,5 @@ io-uring = ["cozo/io-uring"]
swift-bridge-build = "0.1.41" swift-bridge-build = "0.1.41"
[dependencies] [dependencies]
cozo = { version = "0.5.1", path = "../cozo-core", default-features = false } cozo = { version = "0.6.0", path = "../cozo-core", default-features = false }
swift-bridge = "0.1.41" swift-bridge = "0.1.41"

@ -1,6 +1,6 @@
Pod::Spec.new do |spec| Pod::Spec.new do |spec|
spec.name = "CozoSwiftBridge" spec.name = "CozoSwiftBridge"
spec.version = "0.5.1" spec.version = "0.6.0"
spec.summary = "CozoDB for Swift" spec.summary = "CozoDB for Swift"
spec.description = "This library allows you to use CozoDB embedded in your Swift application" spec.description = "This library allows you to use CozoDB embedded in your Swift application"
spec.homepage = "https://github.com/cozodb/cozo/" spec.homepage = "https://github.com/cozodb/cozo/"

@ -16,7 +16,7 @@
target 'YourApp' do target 'YourApp' do
use_frameworks! use_frameworks!
pod 'CozoSwiftBridge', '~> 0.5.1' pod 'CozoSwiftBridge', '~> 0.6.0'
end end
``` ```

@ -19,7 +19,7 @@ see the Building section below.
target 'YourApp' do target 'YourApp' do
use_frameworks! use_frameworks!
pod 'CozoSwiftBridge', '~> 0.5.1' pod 'CozoSwiftBridge', '~> 0.6.0'
end end
``` ```

@ -1,6 +1,6 @@
[package] [package]
name = "cozo-lib-wasm" name = "cozo-lib-wasm"
version = "0.5.1" version = "0.6.0"
edition = "2021" edition = "2021"
description = "Cozo database for WASM" description = "Cozo database for WASM"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]
@ -17,7 +17,7 @@ default = ["console_error_panic_hook"]
[dependencies] [dependencies]
wasm-bindgen = "0.2.63" wasm-bindgen = "0.2.63"
cozo = { version = "0.5.1", path = "../cozo-core", default-features = false, features = ["wasm"] } cozo = { version = "0.6.0", path = "../cozo-core", default-features = false, features = ["wasm"] }
# The `console_error_panic_hook` crate provides better debugging of panics by # The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires # logging them with `console.error`. This is great for development, but requires

@ -1,6 +1,6 @@
[package] [package]
name = "cozorocks" name = "cozorocks"
version = "0.1.5" version = "0.1.6"
edition = "2021" edition = "2021"
license = "MPL-2.0" license = "MPL-2.0"
authors = ["Ziyang Hu"] authors = ["Ziyang Hu"]

Loading…
Cancel
Save