Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Add assemble crate target (typedb#2)
Browse files Browse the repository at this point in the history
## What is the goal of this PR?

Add `//:assemble` target that assembles the client project as a crate.

## What are the changes implemented in this PR?

* Load additional libraries to the `WORKSPACE` file
* Add assemble target to the `BUILD` file
  • Loading branch information
lukas-slezevicius authored Aug 5, 2022
1 parent cb963ef commit 5d283ce
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
10 changes: 10 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
package(default_visibility = ["//visibility:public"])

load("@rules_rust//rust:defs.bzl", "rust_library")
load("@vaticle_bazel_distribution//crates:rules.bzl", "assemble_crate")

rust_library(
name = "typedb_client",
Expand All @@ -39,3 +40,12 @@ rust_library(
"@vaticle_dependencies//library/crates:derivative",
],
)

assemble_crate(
name = "assemble",
target = "typedb_client",
description = "TypeDB Client API for Rust",
homepage = "https://github.com/vaticle/typedb-client-rust",
license = "apache",
repository = "https://github.com/vaticle/typedb-client-rust",
)
36 changes: 36 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,17 @@
load("//dependencies/vaticle:repositories.bzl", "vaticle_dependencies")
vaticle_dependencies()

# Load //builder/java
load("@vaticle_dependencies//builder/java:deps.bzl", java_deps = "deps")
java_deps()

# Load //builder/kotlin
load("@vaticle_dependencies//builder/kotlin:deps.bzl", kotlin_deps = "deps")
kotlin_deps()
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "kotlin_repositories", "kt_register_toolchains")
kotlin_repositories()
kt_register_toolchains()

# Load //builder/rust
load("@vaticle_dependencies//builder/rust:deps.bzl", rust_deps = "deps")
rust_deps()
Expand All @@ -31,3 +42,28 @@ rust_repositories(version = "1.57.0", include_rustc_srcs = True)

load("@vaticle_dependencies//library/crates:crates.bzl", "raze_fetch_remote_crates")
raze_fetch_remote_crates()

# Load //builder/python
load("@vaticle_dependencies//builder/python:deps.bzl", python_deps = "deps")
python_deps()

# Load //tool/common
load("@vaticle_dependencies//tool/common:deps.bzl", "vaticle_dependencies_ci_pip")
vaticle_dependencies_ci_pip()

######################################
# Load @vaticle_bazel_distribution #
######################################

load("@vaticle_dependencies//distribution:deps.bzl", "vaticle_bazel_distribution")
vaticle_bazel_distribution()

############################
# Load @maven dependencies #
############################

load("@vaticle_dependencies//tool/common:deps.bzl", vaticle_dependencies_tool_maven_artifacts = "maven_artifacts")
load("@vaticle_bazel_distribution//maven:deps.bzl", vaticle_bazel_distribution_maven_artifacts = "maven_artifacts")

load("@vaticle_dependencies//library/maven:rules.bzl", "maven")
maven(vaticle_dependencies_tool_maven_artifacts + vaticle_bazel_distribution_maven_artifacts)

0 comments on commit 5d283ce

Please sign in to comment.