@swiftbrowser/kit
v0.29.2
Published
SwiftBrowser compiled for WebAssembly, so that @swiftbrowser/cli builds an app's own code only: every module of the Swift package and an archive of its objects (with debug info), for Swift 6.4.0 and its Swift SDK for WebAssembly. Its macros come built as
Readme
@swiftbrowser/kit
SwiftBrowser compiled for WebAssembly, so that
@swiftbrowser/cli builds
an app's own code only: every module of the Swift package
(@swiftbrowser/swift) and
an archive of its objects, with debug info, for Swift 6.4.0 and its Swift SDK
for WebAssembly, and its macros (@Model, #Predicate, @Entry) built as
WebAssembly. The macros are the same files on every host:
@swiftbrowser/wasm-compiler
runs them for its own compiler, and for a native toolchain through a small
launcher the CLI names as the macros' plugin executables. (Releases up to
0.7 shipped them as executables in one package per host,
@swiftbrowser/kit-linux-x64, -linux-arm64 and -darwin-arm64.)
The CLI depends on it, at its own version: there is nothing to import or
configure. On the first dev or build it copies the kit into its cache
(~/.cache/swiftbrowser/kits/), checks that the installed toolchain reads its
modules, and builds every app against it. When it cannot use the kit (another
toolchain, or Windows, where the compiler cannot run the launcher) it compiles SwiftBrowser once
itself, as it would without this package. See the CLI's README.
kit.json names the shim the kit was built from (the id the CLI computes from
@swiftbrowser/swift's sources), the toolchain and SDK, and the modules with
their dependencies; wasm32-unknown-wasip1/Modules holds the compiled modules
(the Mac-only ones, AppKit, under its macOS/, on the search path of a build
for macOS alone) and wasm32-unknown-wasip1/lib their archives. The release workflow builds it
(swiftbrowser kit, then pack-kit.mjs); the contents are not in the
repository.
