{"id":15662394,"url":"https://github.com/luwes/wesc","last_synced_at":"2026-06-10T01:00:29.444Z","repository":{"id":146460700,"uuid":"606586772","full_name":"luwes/wesc","owner":"luwes","description":"We are the Superlative Components!","archived":false,"fork":false,"pushed_at":"2026-06-08T05:22:41.000Z","size":2488,"stargazers_count":22,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-06-08T06:23:23.110Z","etag":null,"topics":["custom-elements","shadow-dom","ssg","ssr","web-components"],"latest_commit_sha":null,"homepage":"https://wesc-nextjs.vercel.app","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/luwes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-25T23:37:59.000Z","updated_at":"2026-06-08T05:08:45.000Z","dependencies_parsed_at":"2023-06-17T08:15:33.429Z","dependency_job_id":"d9ad3b0c-d549-4b10-99f9-2a3102f70824","html_url":"https://github.com/luwes/wesc","commit_stats":{"total_commits":116,"total_committers":4,"mean_commits":29.0,"dds":"0.18103448275862066","last_synced_commit":"bbf4a527b432fedf87a6f97c5153ee5e2711eef9"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/luwes/wesc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fwesc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fwesc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fwesc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fwesc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/luwes","download_url":"https://codeload.github.com/luwes/wesc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/luwes%2Fwesc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34132030,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-elements","shadow-dom","ssg","ssr","web-components"],"created_at":"2024-10-03T13:32:18.299Z","updated_at":"2026-06-10T01:00:29.434Z","avatar_url":"https://github.com/luwes.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WeSC — We are the Superlative Components\n\nBuild web components from any backend.\n\nWeSC is a streaming HTML/web-component bundler written in Rust (via\n[lol-html](https://github.com/cloudflare/lol-html) for HTML and\n[rolldown](https://rolldown.rs) for the JS bundle). It compiles single-file\n`.html` components into Declarative-Shadow-DOM-ready output.\n\n## Goals\n\n- **HTML first** — lean on the platform ([The Rule of Least Power](https://www.w3.org/2001/tag/doc/leastPower.html)).\n- **Standards-aligned** — Declarative Shadow DOM, slots, and `\u003ctemplate\u003e`, not a custom dialect.\n- **Single-file components** — author markup, styles, and script in one `.html` file.\n- **Backend-agnostic** — a standalone CLI, plus native bindings (more welcome):\n  - **Node** via [napi-rs](https://napi.rs)\n  - **Python** via [PyO3](https://pyo3.rs)\n  - **PHP** via [ext-php-rs](https://ext-php.rs)\n  - **Go** via [cgo](https://pkg.go.dev/cmd/cgo)\n  - **Ruby** via [Magnus](https://github.com/matsadler/magnus)\n\n## What WeSC is\n\nWeSC is an HTML component bundler. It lets developers author web\ncomponents as single-file components (SFCs), then compiles those\ncomponents into final HTML plus optional CSS and JS bundles.\n\nWeSC is not meant to replace full-featured template engines. It does\nnot try to own variables, conditionals, loops, layouts, partials, or\napplication data flow. Use [Liquid](https://shopify.github.io/liquid/),\n[Handlebars](https://handlebarsjs.com), [Nunjucks](https://mozilla.github.io/nunjucks/),\n[Jinja](https://jinja.palletsprojects.com), [Twig](https://twig.symfony.com),\n[ERB](https://docs.ruby-lang.org/en/master/ERB.html),\n[Mustache](https://mustache.github.io), your backend framework, or plain string\noutput for that layer. WeSC sits\nbeside them: it turns component definitions into reusable HTML\nbuilding blocks that can be stamped by whatever renders your data.\n\n## Repository layout\n\n| Path                                           | What                                                       |\n| ---------------------------------------------- | ---------------------------------------------------------- |\n| [`packages/wesc`](./packages/wesc)             | The `wesc` npm package: CLI + Node bindings for the bundler. |\n| [`packages/dom`](./packages/dom)               | The `@wesc/dom` npm package: DOM SSR via Linkedom.          |\n| [`crates/wesc`](./crates/wesc)                 | The Rust bundler core (lol-html).                          |\n| [`crates/wesc-node`](./crates/wesc-node)       | napi-rs Node bindings.                                     |\n| [`crates/wesc-py`](./crates/wesc-py)           | PyO3 Python bindings.                                      |\n| [`crates/wesc-php`](./crates/wesc-php)         | ext-php-rs PHP bindings.                                   |\n| [`crates/wesc-go`](./crates/wesc-go)           | cgo Go bindings (C ABI).                                   |\n| [`crates/wesc-rb`](./crates/wesc-rb)           | Magnus (rb-sys) Ruby bindings.                             |\n| [`examples`](./examples)                       | Bundler examples (departures-board, node-server, python-server, php-server, go-server, ruby-server). |\n\n## Develop\n\nThis is an npm-workspaces monorepo. From the repo root:\n\n```sh\nnpm install                 # installs every workspace\nnpm test                    # runs each package's tests\nnpm run lint                # lints each package\nnpm run build               # builds each package (esbuild for @wesc/dom)\nnpm run build:native        # builds the native Node bundler addon (Rust toolchain)\nnpm run build:php           # builds the native PHP extension (Rust + PHP headers + libclang)\n```\n\nThe Go and Ruby bindings build with their own toolchains (`cargo build -p\nwesc-go --release`; `bundle exec rake compile` in `crates/wesc-rb`); see each\ncrate's README.\n\n## Related\n\n**Built on**\n\n- [lol-html](https://github.com/cloudflare/lol-html) — streaming HTML\n  rewriter powering the bundler.\n- [rolldown](https://rolldown.rs) — Rust bundler for the component JavaScript.\n- [napi-rs](https://napi.rs) — Rust ↔ Node bindings.\n- [PyO3](https://pyo3.rs) — Rust ↔ Python bindings.\n- [ext-php-rs](https://ext-php.rs) — Rust ↔ PHP bindings.\n- [cgo](https://pkg.go.dev/cmd/cgo) — Rust ↔ Go bindings (over a small C ABI).\n- [Magnus](https://github.com/matsadler/magnus) — Rust ↔ Ruby bindings (on\n  [rb-sys](https://github.com/oxidize-rb/rb-sys)).\n\n**Related projects**\n\n- [WebC](https://github.com/11ty/webc) — single-file web-component\n  format from the 11ty team.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fwesc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluwes%2Fwesc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluwes%2Fwesc/lists"}