@crossbind/port-expat 2.0.0-beta.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +66 -0
- package/build.mjs +10 -0
- package/mergeConfig.mjs +17 -0
- package/package.json +37 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# @crossbind/port-expat
|
|
2
|
+
|
|
3
|
+
## 2.0.0-beta.50
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Rebuilt in the 1.0.2 toolchain image — Rust 1.98.0, Emscripten 6.0.2. The recipe and the
|
|
8
|
+
upstream source are unchanged; what moved is the compiler the binaries were produced by.
|
|
9
|
+
|
|
10
|
+
## 1.1.0
|
|
11
|
+
|
|
12
|
+
### Minor Changes
|
|
13
|
+
|
|
14
|
+
- Update Expat to version 2.7.1. [#49](https://github.com/crossbind/crossbind/issues/49)
|
|
15
|
+
|
|
16
|
+
## 1.0.0
|
|
17
|
+
|
|
18
|
+
### Major Changes
|
|
19
|
+
|
|
20
|
+
- 🚀 first stable release
|
|
21
|
+
|
|
22
|
+
## 1.0.0-beta.23
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- chore: add initial version of CHANGELOGS files
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper
|
|
2
|
+
Copyright (c) 2001-2022 Expat maintainers
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
5
|
+
a copy of this software and associated documentation files (the
|
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
10
|
+
the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included
|
|
13
|
+
in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
18
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
19
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
20
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
21
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# @crossbind/port-expat
|
|
2
|
+
**Precompiled Expat (XML parser) library built with crossbind for seamless integration in JavaScript, WebAssembly and React Native projects.**
|
|
3
|
+
|
|
4
|
+
<a href="https://www.npmjs.com/package/@crossbind/port-expat">
|
|
5
|
+
<img alt="NPM version" src="https://img.shields.io/npm/v/@crossbind/port-expat?style=for-the-badge" />
|
|
6
|
+
</a>
|
|
7
|
+
<a href="https://github.com/libexpat/libexpat">
|
|
8
|
+
<img src="https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Funpkg.com%2F%40crossbind%2Fpackage-expat%2Fpackage.json&query=%24.nativeVersion&style=for-the-badge&label=Expat" />
|
|
9
|
+
</a>
|
|
10
|
+
<a href="https://github.com/libexpat/libexpat/blob/master/COPYING">
|
|
11
|
+
<img alt="License" src="https://img.shields.io/npm/l/%40crossbind%2Fpackage-expat?style=for-the-badge" />
|
|
12
|
+
</a>
|
|
13
|
+
|
|
14
|
+
> Use it together with **[crossbind](https://crossbind.dev)** — the toolchain for using C++ libraries from JavaScript, TypeScript, WebAssembly, Node.js and React Native. Learn more at **[crossbind.dev](https://crossbind.dev)**.
|
|
15
|
+
|
|
16
|
+
## Integration
|
|
17
|
+
Install the main package together with the platform builds:
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npm install @crossbind/port-expat @crossbind/port-expat-wasm @crossbind/port-expat-android @crossbind/port-expat-ios
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Then import all three platforms in `crossbind.config.js` — crossbind compiles only the one matching each build target:
|
|
24
|
+
|
|
25
|
+
```diff
|
|
26
|
+
+import expatWasm from '@crossbind/port-expat-wasm/crossbind.config.js';
|
|
27
|
+
+import expatAndroid from '@crossbind/port-expat-android/crossbind.config.js';
|
|
28
|
+
+import expatIos from '@crossbind/port-expat-ios/crossbind.config.js';
|
|
29
|
+
|
|
30
|
+
export default {
|
|
31
|
+
dependencies: [
|
|
32
|
+
+ expatWasm,
|
|
33
|
+
+ expatAndroid,
|
|
34
|
+
+ expatIos,
|
|
35
|
+
],
|
|
36
|
+
paths: {
|
|
37
|
+
config: import.meta.url,
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Usage
|
|
43
|
+
Below are the steps to use Expat in your C++ or JavaScript code.
|
|
44
|
+
|
|
45
|
+
### Usage in C++ Code
|
|
46
|
+
```diff
|
|
47
|
+
+#include <expat.h>
|
|
48
|
+
|
|
49
|
+
std::string Native::sample() {
|
|
50
|
+
+ return std::string(XML_ExpatVersion());
|
|
51
|
+
}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## Supported platforms
|
|
55
|
+
This is the main package; the precompiled binaries are shipped per platform:
|
|
56
|
+
|
|
57
|
+
| Platform | Package | Targets |
|
|
58
|
+
|---|---|---|
|
|
59
|
+
| WebAssembly | [`@crossbind/port-expat-wasm`](https://www.npmjs.com/package/@crossbind/port-expat-wasm) | `wasm32` — single-threaded & multi-threaded |
|
|
60
|
+
| Android | [`@crossbind/port-expat-android`](https://www.npmjs.com/package/@crossbind/port-expat-android) | `arm64-v8a` (64-bit ARM), `x86_64` (emulator) |
|
|
61
|
+
| iOS | [`@crossbind/port-expat-ios`](https://www.npmjs.com/package/@crossbind/port-expat-ios) | device (`arm64`), simulator (`arm64`) |
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
This project includes the precompiled Expat library, which is distributed under the [MIT License](https://github.com/libexpat/libexpat/blob/master/COPYING).
|
|
65
|
+
|
|
66
|
+
Expat Homepage: [https://github.com/libexpat/libexpat](https://github.com/libexpat/libexpat)
|
package/build.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
sha256: '22920a86c83f32300b11463635b71f11137a917975af297725e55525027d4e50', // expat-2.8.3.tar.gz
|
|
3
|
+
getURL: (version) => `https://github.com/libexpat/libexpat/releases/download/R_${version.replaceAll('.', '_')}/expat-${version}.tar.gz`,
|
|
4
|
+
buildType: 'cmake',
|
|
5
|
+
getBuildParams: () => [
|
|
6
|
+
'-DEXPAT_BUILD_TESTS=OFF',
|
|
7
|
+
'-DEXPAT_BUILD_TOOLS=OFF',
|
|
8
|
+
'-DEXPAT_BUILD_EXAMPLES=OFF',
|
|
9
|
+
],
|
|
10
|
+
};
|
package/mergeConfig.mjs
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default (newConfig = {}) => ({
|
|
2
|
+
...newConfig,
|
|
3
|
+
general: {
|
|
4
|
+
name: 'expat',
|
|
5
|
+
alias: { package: '@crossbind/port-expat' },
|
|
6
|
+
},
|
|
7
|
+
export: {
|
|
8
|
+
type: 'cmake',
|
|
9
|
+
bundle: false,
|
|
10
|
+
...(newConfig.export || {}),
|
|
11
|
+
},
|
|
12
|
+
paths: {
|
|
13
|
+
output: 'dist',
|
|
14
|
+
base: '../..',
|
|
15
|
+
...(newConfig.paths || {}),
|
|
16
|
+
},
|
|
17
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@crossbind/port-expat",
|
|
3
|
+
"version": "2.0.0-beta.50",
|
|
4
|
+
"nativeVersion": "2.8.3",
|
|
5
|
+
"description": "This package provides the precompiled Expat XML parser library, built using crossbind, for seamless integration into JavaScript, WebAssembly, and React Native projects. It enables fast and efficient parsing of XML data, making it ideal for applications requiring robust XML handling across platforms. Perfect for web, server-side, and mobile development environments.",
|
|
6
|
+
"homepage": "https://github.com/crossbind/crossbind/tree/main/ports/expat#readme",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/crossbind/crossbind.git"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"expat",
|
|
15
|
+
"libexpat",
|
|
16
|
+
"xml",
|
|
17
|
+
"crossbind",
|
|
18
|
+
"crossbind-package",
|
|
19
|
+
"webassembly",
|
|
20
|
+
"wasm",
|
|
21
|
+
"android",
|
|
22
|
+
"ios",
|
|
23
|
+
"react-native"
|
|
24
|
+
],
|
|
25
|
+
"crossbind": {
|
|
26
|
+
"upstream": {
|
|
27
|
+
"license": {
|
|
28
|
+
"declared": "MIT",
|
|
29
|
+
"selected": null,
|
|
30
|
+
"files": [
|
|
31
|
+
"COPYING"
|
|
32
|
+
],
|
|
33
|
+
"copyright": null
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|