create-swift-rust 0.9.7 → 0.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -465,7 +465,7 @@ async function askQuestions(flags, positional) {
465
465
  // Fallback pin used when the npm registry can't be reached at scaffold time.
466
466
  // Kept in sync with the current swift-rust release so a generated project never
467
467
  // advertises an ancient version. `^` still lets it float forward within the major.
468
- const SWIFT_RUST_FALLBACK = "^1.10.9";
468
+ const SWIFT_RUST_FALLBACK = "^1.12.0";
469
469
  // Resolve the newest published swift-rust version so the scaffolded package.json
470
470
  // reflects reality (e.g. ^1.10.5) instead of a stale literal like ^1.0.0. A caret
471
471
  // range already installs the latest matching release, but showing the real number
@@ -811,7 +811,7 @@ export default function Home() {
811
811
  Read the docs →
812
812
  </a>
813
813
  <a
814
- href="https://github.com/colesites/swift-rust"
814
+ href="https://github.com/multivrs-space/swift-rust"
815
815
  className={buttonVariants({ variant: "outline" })}
816
816
  >
817
817
  GitHub
@@ -854,7 +854,7 @@ export default function Home() {
854
854
  <a href="https://docs-swift-rust.vercel.app/">Read the docs</a>
855
855
  </Button>
856
856
  <Button asChild variant="outline">
857
- <a href="https://github.com/colesites/swift-rust">GitHub</a>
857
+ <a href="https://github.com/multivrs-space/swift-rust">GitHub</a>
858
858
  </Button>
859
859
  </div>
860
860
  </div>
@@ -985,7 +985,7 @@ export default [
985
985
  }
986
986
  const readme = `# ${projectName}
987
987
 
988
- Built with [swift-rust](https://swift-rust.dev) — the React framework powered with Rust + Bun. 10x faster than Next.js.
988
+ Built with [swift-rust](https://swift-rust.multivrs.space/) — the React framework powered with Rust + Bun. 10x faster than Next.js.
989
989
 
990
990
  ## Scripts
991
991
 
@@ -1006,7 +1006,7 @@ Built with [swift-rust](https://swift-rust.dev) — the React framework powered
1006
1006
  ## Learn more
1007
1007
 
1008
1008
  - [Documentation](https://docs-swift-rust.vercel.app/)
1009
- - [Examples](https://github.com/colesites/swift-rust/tree/main/examples)
1009
+ - [Examples](https://github.com/multivrs-space/swift-rust/tree/main/examples)
1010
1010
  - [Discord](https://discord.gg/swift-rust)
1011
1011
 
1012
1012
  ## Deploy to Vercel
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "create-swift-rust",
3
- "version": "0.9.7",
3
+ "version": "0.9.9",
4
4
  "description": "Create a new swift-rust project from a template.",
5
5
  "license": "MIT",
6
- "homepage": "https://swift-rust.dev",
6
+ "homepage": "https://swift-rust.multivrs.space/",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/colesites/swift-rust.git",
9
+ "url": "https://github.com/multivrs-space/swift-rust.git",
10
10
  "directory": "packages/create-swift-rust"
11
11
  },
12
12
  "bugs": {
13
- "url": "https://github.com/colesites/swift-rust/issues"
13
+ "url": "https://github.com/multivrs-space/swift-rust/issues"
14
14
  },
15
15
  "type": "module",
16
16
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  # __PROJECT_NAME__
2
2
 
3
- A [swift-rust](https://github.com/colesites/swift-rust) app — the full demo
3
+ A [swift-rust](https://github.com/multivrs-space/swift-rust) app — the full demo
4
4
  starter: blog, dashboard, API routes, and the Image / PDF / Video / Font
5
5
  components wired up.
6
6
 
@@ -12,12 +12,19 @@ bun run dev
12
12
 
13
13
  Open [http://localhost:3000](http://localhost:3000).
14
14
 
15
- ## Build
15
+ ## Build & deploy
16
16
 
17
17
  ```bash
18
- bun run build # → .vercel/output (Build Output API v3)
18
+ bun run build # → dist/ for Multivrs (default)
19
19
  ```
20
20
 
21
+ - **Multivrs** (default): `bun run build` writes `dist/multivrs-build.json`,
22
+ a self-contained `dist/server.mjs` and `dist/static/`. Run it locally with
23
+ `cd dist && PORT=8080 bun server.mjs`.
24
+ - **Vercel**: import the repo on Vercel. Vercel sets `VERCEL=1`, so the same
25
+ `bun run build` emits `.vercel/output`. Locally:
26
+ `bun run build --target vercel`.
27
+
21
28
  ## Structure
22
29
 
23
30
  ```
@@ -17,7 +17,7 @@
17
17
  "postcss": "^8.5.15",
18
18
  "react": "^19.0.0",
19
19
  "react-dom": "^19.0.0",
20
- "swift-rust": "^1.10.9",
20
+ "swift-rust": "^1.12.0",
21
21
  "tailwindcss": "^4.3.0"
22
22
  },
23
23
  "devDependencies": {
@@ -10,7 +10,7 @@ export const metadata: Metadata = {
10
10
  const CHANNELS = [
11
11
  {
12
12
  name: "GitHub",
13
- handle: "colesites/swift-rust",
13
+ handle: "multivrs-space/swift-rust",
14
14
  href: siteConfig.githubUrl,
15
15
  description: "Issues, PRs, and discussion.",
16
16
  },
@@ -1,5 +1,5 @@
1
1
  import { FontStudio } from "@/components/font-studio";
2
- import type { Metadata } from "swift-rust";
2
+ import { SafeHtml, createTrustedHtml, type Metadata } from "swift-rust";
3
3
  import { localFontCss } from "swift-rust/font";
4
4
  import {
5
5
  DxSlight,
@@ -470,7 +470,7 @@ export default function FontsPage() {
470
470
  from <code className="font-mono text-xs">/_swift-rust/fonts/</code>. Use them when you
471
471
  need exact control over weights or want to avoid a network round-trip.
472
472
  </p>
473
- <style dangerouslySetInnerHTML={{ __html: localCss }} />
473
+ <SafeHtml as="style" content={createTrustedHtml(localCss)} />
474
474
 
475
475
  <div className="mb-6 grid grid-cols-1 gap-3 sm:grid-cols-2">
476
476
  {LOCAL.filter((f) => f.name !== "Zimula").map((f) => {
@@ -564,17 +564,17 @@ export { heading };`}
564
564
  <CodeBlock
565
565
  filename="app/layout.tsx"
566
566
  caption="Local font CSS · inject @font-face declarations from the framework"
567
- code={`import { localFontCss, Lausanne } from "swift-rust/font";
568
- import { Lausanne as LausanneFont } from "swift-rust/font";
567
+ code={`import { SafeHtml, createTrustedHtml } from "swift-rust";
568
+ import { localFontCss, Lausanne } from "swift-rust/font";
569
569
 
570
- const css = localFontCss();
570
+ const css = createTrustedHtml(localFontCss());
571
571
  const lausanne = Lausanne({ variable: true });
572
572
 
573
573
  export default function RootLayout({ children }: { children: React.ReactNode }) {
574
574
  return (
575
575
  <html className={lausanne.variable}>
576
576
  <head>
577
- <style dangerouslySetInnerHTML={{ __html: css }} />
577
+ <SafeHtml as="style" content={css} />
578
578
  </head>
579
579
  <body>{children}</body>
580
580
  </html>
@@ -23,7 +23,7 @@ function swiftRustVersion(): string {
23
23
  return "0.0.0";
24
24
  }
25
25
 
26
- const GITHUB = process.env.SWIFT_RUST_GITHUB_URL ?? "https://github.com/colesites/swift-rust";
26
+ const GITHUB = process.env.SWIFT_RUST_GITHUB_URL ?? "https://github.com/multivrs-space/swift-rust";
27
27
 
28
28
  export const siteConfig = {
29
29
  /** Marketing / main site. */