@crossbind/port-expat-wasi 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/LICENSE +21 -0
- package/README.md +11 -0
- package/crossbind.build.js +1 -0
- package/crossbind.config.js +5 -0
- package/dist/prebuilt/CMakeLists.txt +57 -0
- package/dist/prebuilt/wasi-wasm32-st-release/crossbind-emccflags.fingerprint +1 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/expat.h +1105 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/expat_config.h +122 -0
- package/dist/prebuilt/wasi-wasm32-st-release/include/expat_external.h +168 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/cmake/expat-2.8.3/expat-config-version.cmake +65 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/cmake/expat-2.8.3/expat-config.cmake +99 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/cmake/expat-2.8.3/expat-release.cmake +19 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/cmake/expat-2.8.3/expat.cmake +107 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/libexpat.a +0 -0
- package/dist/prebuilt/wasi-wasm32-st-release/lib/pkgconfig/expat.pc +13 -0
- package/dist/prebuilt/wasi-wasm32-st-release/share/doc/expat/AUTHORS +10 -0
- package/dist/prebuilt/wasi-wasm32-st-release/share/doc/expat/changelog +2163 -0
- package/e2e/main.c +29 -0
- package/e2e/run.mjs +80 -0
- package/package.json +33 -0
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,11 @@
|
|
|
1
|
+
# @crossbind/port-expat-wasi
|
|
2
|
+
|
|
3
|
+
The **WASI** build of the precompiled **Expat** library, built with [crossbind](https://crossbind.dev).
|
|
4
|
+
|
|
5
|
+
> For installation and usage, see the main package: **[@crossbind/port-expat](https://www.npmjs.com/package/@crossbind/port-expat)**.
|
|
6
|
+
|
|
7
|
+
## Supported targets
|
|
8
|
+
- WASI (`wasm32-wasip3`) — single-threaded command modules; run with `wasmtime` (47+)
|
|
9
|
+
|
|
10
|
+
## License
|
|
11
|
+
This project includes the precompiled Expat library, distributed under the [MIT License](https://github.com/libexpat/libexpat/blob/master/COPYING).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@crossbind/port-expat/build.mjs';
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
set(MY_LIST "wasi-wasm32-st-release")
|
|
2
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
3
|
+
if(PACKAGE_HOST_INDEX EQUAL -1)
|
|
4
|
+
set(PROJECT_TARGET_HOST "${PROJECT_TARGET_HOST_RELEASE}")
|
|
5
|
+
endif()
|
|
6
|
+
LIST(FIND MY_LIST "${PROJECT_TARGET_HOST}" PACKAGE_HOST_INDEX)
|
|
7
|
+
|
|
8
|
+
if(NOT PACKAGE_HOST_INDEX EQUAL -1)
|
|
9
|
+
cmake_minimum_required(VERSION 3.28)
|
|
10
|
+
set(CMAKE_CXX_STANDARD 11)
|
|
11
|
+
set(PROJECT_NAME "expat")
|
|
12
|
+
set(PROJECT_LIBS "expat")
|
|
13
|
+
project("${PROJECT_NAME}")
|
|
14
|
+
|
|
15
|
+
if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|
16
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/../..")
|
|
17
|
+
else()
|
|
18
|
+
set(PACKAGE_DIR "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/lib")
|
|
19
|
+
endif()
|
|
20
|
+
|
|
21
|
+
set(PROJECT_LIBS_DIR)
|
|
22
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
23
|
+
SET(FOUND_LIB "FOUND_LIB-NOTFOUND")
|
|
24
|
+
find_library(FOUND_LIB
|
|
25
|
+
NAMES "${L}"
|
|
26
|
+
PATHS "${PACKAGE_DIR}"
|
|
27
|
+
NO_CACHE
|
|
28
|
+
NO_DEFAULT_PATH
|
|
29
|
+
NO_CMAKE_FIND_ROOT_PATH
|
|
30
|
+
REQUIRED
|
|
31
|
+
)
|
|
32
|
+
LIST(APPEND PROJECT_LIBS_DIR ${FOUND_LIB})
|
|
33
|
+
endforeach()
|
|
34
|
+
|
|
35
|
+
add_library("${PROJECT_NAME}" INTERFACE)
|
|
36
|
+
# Cargo producers register through an init-array constructor nothing references. KEEP pins the
|
|
37
|
+
# generated keep symbol (--undefined) so only the registration object is pulled - never the
|
|
38
|
+
# whole archive, because each Rust staticlib bundles libstd and fully loading two of them
|
|
39
|
+
# duplicates thousands of std symbols. FORCE (manual-bindings crates, no keep symbol) falls
|
|
40
|
+
# back to whole-archive - safe only as the app's single loaded Rust archive. (Apple consumers
|
|
41
|
+
# get the equivalent flags from the generated podspec instead.)
|
|
42
|
+
set(PROJECT_RUST_LINK "")
|
|
43
|
+
if(PROJECT_RUST_LINK STREQUAL "KEEP" AND NOT APPLE)
|
|
44
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
45
|
+
foreach(L IN LISTS PROJECT_LIBS)
|
|
46
|
+
target_link_options("${PROJECT_NAME}" INTERFACE "-Wl,--undefined=crossbind_keep_${L}")
|
|
47
|
+
endforeach()
|
|
48
|
+
elseif(PROJECT_RUST_LINK STREQUAL "FORCE" AND NOT APPLE)
|
|
49
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "$<LINK_LIBRARY:WHOLE_ARCHIVE,${PROJECT_LIBS_DIR}>")
|
|
50
|
+
else()
|
|
51
|
+
target_link_libraries("${PROJECT_NAME}" INTERFACE "${PROJECT_LIBS_DIR}")
|
|
52
|
+
endif()
|
|
53
|
+
|
|
54
|
+
if(NOT APPLE)
|
|
55
|
+
target_include_directories("${PROJECT_NAME}" INTERFACE "${PROJECT_SOURCE_DIR}/${PROJECT_TARGET_HOST}/include")
|
|
56
|
+
endif()
|
|
57
|
+
endif()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945
|