The Swim frontend runtime provides foundation frameworks for building massively real-time streaming applications. The runtime provides applications with:
- Modern Foundation: Dependency-free, 100% TypeScript foundation framework for Node.js and browser apps.
- Shared States: Multiplexed streaming API client for continuously synchronizing real-time shared states with backend Web Agents.
npm install @swim/runtime<!-- Development -->
<script src="https://cdn.swimos.org/js/4.x/swim-runtime.js"></script>
<!-- Production -->
<script src="https://cdn.swimos.org/js/4.x/swim-runtime.min.js"></script>Install build dependencies:
npm installThe Swim TypeScript stack is compiled using a custom build script. Before building the stack, first bootstrap the build script.
npm run bootstrapUse npx swim-build to execute build commands:
npx swim-build help # prints build script usage instructions
npx swim-build pkgs # lists buildable packagesThe default swim-build command will compile, lint, api-extract, and bundle
TypeScript sources. To compile all libraries, of all packages, run:
npx swim-buildTo compile a subset of packages, include a --pkgs (-p) option followed
by a comma-separated list of package names. For example, to build the core
package, run:
npx swim-build -p coreThe test subcommand reruns unit tests. For example, to compile and test
the core package and its dependencies, run:
npx swim-build test -p core -rThe watch subcommand automatically rebuilds packages when dependent files
change. For example, to continuously build the host package, run:
npx swim-build watch -p hostThe doc subcommand generates API documentation:
npx swim-build doc -p runtimeTake a look at the Contributing Guide to learn about our submission process, coding standards, and more.