Skip to content

Commit

Permalink
feat: add ecosystem
Browse files Browse the repository at this point in the history
  • Loading branch information
richerfu committed Mar 6, 2024
1 parent 7fc1c5f commit 6d96785
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -20,27 +20,39 @@ export default defineConfig({
sidebar: [
{
text: 'Basic',

items: [
{text: 'Quick Start', link: '/basic/quick-start'},
{text: 'Simple Project', link: '/basic/simple-project'},
]
},
{
text: 'Cli',
collapsed: false,
items: [
{text: 'Init', link: "/cli/init"},
{text: 'Build', link: "/cli/build"},
]
},
{
text: 'Usage',
collapsed: false,
items: [
{text: 'Basic', link: "/usage/basic"},
{text: 'Task', link: "/usage/task"},
{text: 'ThreadSafeFunction',link: "/usage/tsfn"}
]
},
{
text: 'Ecosystem',
collapsed: false,
items: [
{text: 'Basic', link: "/usage/basic.md"},
{text: 'Task', link: "/usage/task.md"},
{text: '@ohos-rs/crc32',link: "/ecosystem/crc32"}
]
},
{
text: 'CD/CD',
collapsed: false,
items: [
{text: 'CI', link: "/ci/basic.md"},
]
Expand Down
33 changes: 33 additions & 0 deletions src/ecosystem/crc32.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
editLink: true
---

# @ohos-rs/crc32

The fast implement crc32 in HarmonyOS using SIMD.

## Requirement

- NDK Version >= 10

## Install

```shell
ohpm install @ohos-rs/crc32
```

## Api

```ts
export function crc32(input: string | buffer.Buffer, crc?: number): number
export function crc32c(input: string | buffer.Buffer, crc?: number): number
```

## Usage

```ts
import { crc32 } from '@ohos-rs/crc32';
crc32("crc32c - test",0);
// 2608757237
```
7 changes: 7 additions & 0 deletions src/usage/tsfn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
editLink: true
---

# ThreadSafeFunction

todo

0 comments on commit 6d96785

Please sign in to comment.