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)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lucent_pack-0.1.0-py3-none-any.whl (170.2 kB view details)

Uploaded Python 3

File details

Details for the file lucent_pack-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lucent_pack-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 170.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.14.7

File hashes

Hashes for lucent_pack-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cfd574f5552806682718534946fdac76b2b7935ae9e20a2d727e56758fe9ae03
MD5 25667794e474673530d288ed72992a99
BLAKE2b-256 67bc744a59d9ce17951e4f573de0d7c59197f2bf44b185f9e45b208da9aef0ad

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 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