Merge commit '7621e2f8dec938cf48181c8b10afc9b01f444e68' into beta

This commit is contained in:
Ilya Laktyushin
2025-12-06 02:17:48 +04:00
commit 8344b97e03
28070 changed files with 7995182 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
objc_library(
name = "Crc32",
enable_modules = True,
module_name = "Crc32",
srcs = glob([
"Sources/**/*.m",
"Sources/**/*.h",
], allow_empty = True),
hdrs = glob([
"PublicHeaders/**/*.h",
]),
includes = [
"PublicHeaders",
],
sdk_frameworks = [
"Foundation",
],
sdk_dylibs = [
"libz",
],
visibility = [
"//visibility:public",
],
)
+32
View File
@@ -0,0 +1,32 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
name: "Crc32",
platforms: [.macOS(.v10_13)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
name: "Crc32",
targets: ["Crc32"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages this package depends on.
.target(
name: "Crc32",
dependencies: [],
path: ".",
exclude: ["BUILD"],
publicHeadersPath: "PublicHeaders",
cSettings: [
.headerSearchPath("PublicHeaders")
]),
]
)
@@ -0,0 +1,8 @@
#ifndef Postbox_Crc32_h
#define Postbox_Crc32_h
#import <Foundation/Foundation.h>
uint32_t Crc32(const void *bytes, int length);
#endif
+7
View File
@@ -0,0 +1,7 @@
#import <Crc32/Crc32.h>
#import <zlib.h>
uint32_t Crc32(const void *bytes, int length) {
return (uint32_t)crc32(0, bytes, (uInt)length);
}