feat: Implement Anisette JS/TS API with WASM support

- Added main Anisette class for high-level API.
- Introduced device management with Device class.
- Created HTTP client abstraction for network requests.
- Implemented provisioning session handling with ProvisioningSession class.
- Added utility functions for encoding, decoding, and random generation.
- Established library management with LibraryStore class.
- Integrated WASM loading and bridging with WasmBridge.
- Defined core types and interfaces for the API.
- Set up TypeScript configuration and build scripts.
- Updated package.json for new build and run commands.
- Added bun.lock and package.json for JS dependencies.
- Enhanced error handling and memory management in Rust code.
This commit is contained in:
2026-02-28 00:36:15 +08:00
parent 80038ce8f2
commit d05cc41660
22 changed files with 4520 additions and 19 deletions

View File

@@ -4,6 +4,9 @@
"build:unicorn": "bash script/rebuild-unicorn.sh",
"build:glue": "bash script/build-glue.sh",
"build:release": "bash script/build-glue.sh --release",
"run:node": "bun test/run-node.mjs"
"build:js": "cd js && bun install && bun run build",
"build": "bash script/build-glue.sh && cd js && bun install && bun run build",
"run:node": "node example/run-node.mjs",
"run:api": "node example/anisette-api.mjs"
}
}