1
0
Fork 0
mirror of https://github.com/BLAKE3-team/BLAKE3 synced 2024-05-09 11:46:08 +02:00

Compare commits

...

6 Commits

Author SHA1 Message Date
Cheney Wang ed61eaa9bb
Merge 36043dff98 into 0816badf3a 2024-04-07 20:24:37 -07:00
Javier Blazquez 0816badf3a fix Windows ARM64 build and detect ARM64EC as ARM64 2024-04-07 11:48:02 -04:00
Cheney Wang 36043dff98
Update README.md 2022-10-09 13:56:17 +08:00
Cheney Wang b8be47a9f0
Modify format 2022-10-09 13:54:57 +08:00
Cheney Wang e49fd59fbe
Move vcpkg instructions to c/readme.md 2022-10-09 13:53:27 +08:00
Cheney Wang 1895f9240e
Add vcpkg installation instructions 2022-09-14 18:36:08 +08:00
3 changed files with 18 additions and 3 deletions

View File

@ -309,6 +309,18 @@ example:
gcc -shared -O3 -o libblake3.so blake3.c blake3_dispatch.c blake3_portable.c
```
## Installing from vcpkg
You can download and install `blake3` using the [vcpkg](https://github.com/Microsoft/vcpkg) dependency manager:
```sh
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh #.\bootstrap-vcpkg.bat(for windows)
./vcpkg integrate install
./vcpkg install blake3
```
The `blake3` port in vcpkg is kept up to date by Microsoft team members and community contributors. If the version is out of date, please [create an issue or pull request](https://github.com/Microsoft/vcpkg) on the vcpkg repository.
# Multithreading
Unlike the Rust implementation, the C implementation doesn't currently support

View File

@ -4,9 +4,12 @@
#include "blake3_impl.h"
#if defined(IS_X86)
#if defined(_MSC_VER)
#include <Windows.h>
#endif
#if defined(IS_X86)
#if defined(_MSC_VER)
#include <intrin.h>
#elif defined(__GNUC__)
#include <immintrin.h>

View File

@ -28,7 +28,7 @@ enum blake3_flags {
#define INLINE static inline __attribute__((always_inline))
#endif
#if defined(__x86_64__) || defined(_M_X64)
#if (defined(__x86_64__) || defined(_M_X64)) && !defined(_M_ARM64EC)
#define IS_X86
#define IS_X86_64
#endif
@ -38,7 +38,7 @@ enum blake3_flags {
#define IS_X86_32
#endif
#if defined(__aarch64__) || defined(_M_ARM64)
#if defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
#define IS_AARCH64
#endif