Skip to main content

Lucent-Pack

Pack a Shiny app and a WebAssembly R environment into a static site.

Installation

pip install lucent-pack
# OR
micromamba install lucent-pack

Usage

  1. Create a wasm environment with your favorite package manager.
micromamba create -f environment.yaml --platform=emscripten-wasm32
# Sample environment.yaml
name: shinyapp-env
channels:
- https://repo.prefix.dev/emscripten-forge-4x
- conda-forge
dependencies:
# Minimum requirements
- r-main
- r-shiny
# Any additional packages required for the app
- r-bslib
- r-plotly
  1. Build the site.
lucent build --prefix-dir /path/to/wasm/env/ --app /path/to/app --outdir ./_site
  1. Check results.
lucent serve ./_site # the output directory

Development

Requirements:

  • python
  • pip
  • nodejs
pip install -e .

# Browser runtime — required before `python -m build` (wheel)
cd js && npm ci && npm run build
mkdir -p ../src/lucent_pack/static/lucent/dist
cp -a dist/. ../src/lucent_pack/static/lucent/dist/

The hatch wheel hook fails the build if the bundles (src/lucent_pack/static/lucent/dist/) are missing.

CLI

Command Purpose
lucent build Pack an existing --prefix-dir + --app into --outdir
lucent serve Serve a built site directory (python -m http.server style)

Metadata

Release files for lucent-pack 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for lucent-pack 0.1.1
File Interpreter ABI Platform
lucent_pack-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / lucent_pack-0.1.1-py3-none-any.whl

Download URL lucent_pack-0.1.1-py3-none-any.whl
Size 170.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8289e78344082c76b24797716476b9350ec1ec298eed88283e73c9d536cb55d3
BLAKE2b-256 checksum
How to use checksums
c0bf183b19d02d3bfc1f7e8dcd1929e9a32be97da5da3579275a56e2b10286b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page