Skip to content
Closed
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
2 changes: 1 addition & 1 deletion tensorstore/internal/container/block_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class BlockQueue;

// SQBlock is a buffer used as a backing SimpleDeque.
template <typename T, typename Allocator>
struct SQBlock {
class SQBlock {
private:
using BlockAllocator =
typename std::allocator_traits<Allocator>::template rebind_alloc<SQBlock>;
Expand Down
2 changes: 1 addition & 1 deletion tensorstore/internal/container/single_producer_queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SingleProducerQueue;
// SPQArray is a circular buffer used as a backing store for
// SingleProducerQueue.
template <typename T, typename Allocator>
struct SPQArray {
class SPQArray {
private:
static_assert(std::is_trivially_destructible_v<T>);

Expand Down
10 changes: 10 additions & 0 deletions tensorstore/kvstore/s3/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -366,3 +366,13 @@ tensorstore_cc_test(
"@com_google_googletest//:gtest_main",
],
)

tensorstore_cc_test(
name = "aws_api_test",
size = "small",
srcs = ["aws_api_test.cc"],
deps = [
"@aws_crt_cpp",
"@com_google_googletest//:gtest_main",
],
)
22 changes: 22 additions & 0 deletions tensorstore/kvstore/s3/aws_api_test.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright 2024 The TensorStore Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include <aws/crt/Api.h>

TEST(AwsApiTest, Basic) {
::Aws::Crt::ApiHandle api_handle;
EXPECT_THAT(api_handle.GetCrtVersion().major, ::testing::Eq(0));
}
23 changes: 23 additions & 0 deletions third_party/aws_c_auth/aws_c_auth.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Description:
# AWS C Auth

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

exports_files(["LICENSE"])

cc_library(
name = "aws_c_auth",
srcs = glob([
"source/*.c",
]),
hdrs = glob([
"include/aws/auth/**/*.h",
]),
includes = ["include"],
deps = [
"@aws_c_http",
"@aws_c_sdkutils",
],
)
33 changes: 33 additions & 0 deletions third_party/aws_c_auth/workspace.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2024 The TensorStore Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("//third_party:repo.bzl", "third_party_http_archive")

def repo():
maybe(
third_party_http_archive,
name = "aws_c_auth",
sha256 = "f249a12a6ac319e929c005fb7efd5534c83d3af3a3a53722626ff60a494054bb",
strip_prefix = "aws-c-auth-0.7.22",
urls = [
"https://storage.googleapis.com/tensorstore-bazel-mirror/github.com/awslabs/aws-c-auth/archive/refs/tags/v0.7.22.tar.gz",
],
build_file = Label("//third_party:aws_c_auth/aws_c_auth.BUILD.bazel"),
cmake_name = "aws_c_auth",
cmake_target_mapping = {
"@aws_c_auth//:aws_c_auth": "aws_c_auth::aws_c_auth",
},
bazel_to_cmake = {},
)
66 changes: 66 additions & 0 deletions third_party/aws_c_cal/aws_c_cal.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Description:
# AWS s2n tls

load("@tensorstore//bazel:utils.bzl", "package_relative_path")

package(default_visibility = ["//visibility:public"])

licenses(["notice"]) # Apache 2.0

cc_library(
name = "aws_c_cal",
srcs = glob([
"source/*.c",
]) + select({
"@platforms//os:windows": glob([
"source/windows/*.c",
]),
"@platforms//os:linux": glob([
"source/unix/*.c",
]),
"@platforms//os:osx": glob([
"source/darwin/*.c",
"source/darwin/*.h",
]),
}),
hdrs = glob([
"include/aws/cal/*.h",
"include/aws/cal/private/*.h",
]),
copts = select({
"@platforms//os:osx": [
"-I" + package_relative_path("source/darwin"),
],
"//conditions:default": [],
}),
includes = ["include"],
linkopts = select({
"@platforms//os:windows": [
"-DEFAULTLIB:bcrypt.lib",
],
"@platforms//os:macos": [
"-framework CoreFoundation",
"-framework Security",
],
"//conditions:default": [],
}) + select({
":compiler_mingw_gcc": [
"-lbcrypt",
],
"//conditions:default": [],
}),
deps = [
"@aws_c_common",
"@com_google_boringssl//:crypto",
],
)

[
alias(
name = name,
actual = "@tensorstore//:{target}".format(target = name),
)
for name in [
"compiler_mingw_gcc",
]
]
33 changes: 33 additions & 0 deletions third_party/aws_c_cal/workspace.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Copyright 2024 The TensorStore Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
load("//third_party:repo.bzl", "third_party_http_archive")

def repo():
maybe(
third_party_http_archive,
name = "aws_c_cal",
sha256 = "9c51afbece6aa7a4a3e40b99c242884c1744d7f949a3f720cea41d247ac2d06a",
strip_prefix = "aws-c-cal-0.7.0",
urls = [
"https://storage.googleapis.com/tensorstore-bazel-mirror/github.com/awslabs/aws-c-cal/archive/refs/tags/v0.7.0.tar.gz",
],
build_file = Label("//third_party:aws_c_cal/aws_c_cal.BUILD.bazel"),
cmake_name = "aws_c_cal",
cmake_target_mapping = {
"@aws_c_cal//:aws_c_cal": "aws_c_cal::aws_c_cal",
},
bazel_to_cmake = {},
)
Loading