https://github.com/jwygithub/cloudflare-wasm
Using Wasm in CloudFlare
https://github.com/jwygithub/cloudflare-wasm
Last synced: 5 months ago
JSON representation
Using Wasm in CloudFlare
- Host: GitHub
- URL: https://github.com/jwygithub/cloudflare-wasm
- Owner: jwyGithub
- License: mit
- Created: 2024-07-24T00:55:16.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-18T01:57:59.000Z (over 1 year ago)
- Last Synced: 2025-09-01T13:31:48.260Z (10 months ago)
- Language: Rust
- Size: 77.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cloudflare-wasm
Using Wasm in CloudFlare
## Packages
- [@jiangweiye/cloudflare-wasm-yaml](#wasm-yaml)
- [@jiangweiye/cloudflare-wasm-image](#wasm-image)
### wasm-yaml
使用 wasm 解析 yaml 文件,以及将 yaml 文件转换为 map 对象。
[使用示例](https://github.com/jwyGithub/cloudflare-wasm/tree/main/packages/yaml)
```typescript
import { dump, load } from '@jiangweiye/cloudflare-wasm-yaml';
export default {
async fetch(request: Request, env: Env): Promise {
const data = load('name: Cloudflare Workers\n');
data.set('name', 'Cloudflare Workers');
const output = dump(data);
return new Response(output, {
headers: { 'content-type': 'text/plain' }
});
}
};
```
### wasm-image
使用 wasm 处理图片,支持图片转换,压缩, 等。
[使用示例](https://github.com/jwyGithub/cloudflare-wasm/tree/main/packages/image)