nandi/vflutter_ffipublic Fork 0
main
Commits
Clone
git clone https://git.rickub.com/nandi/vflutter_ffi.git
git clone ssh://git@rickub.com/nandi/vflutter_ffi.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

index.html · 59 lines · 2.1 KBHTML Blame HistoryRaw
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago1<!DOCTYPE html>
2<html>
3<head>
4 <!--
5 If you are serving your web app in a path other than the root, change the
6 href value below to reflect the base path you are serving from.
7
8 The path provided below has to start and end with a slash "/" in order for
9 it to work correctly.
10
11 For more details:
12 * https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base
13
14 This is a placeholder for base href that will be replaced by the value of
15 the `--base-href` argument provided to `flutter build`.
16 -->
17 <base href="$FLUTTER_BASE_HREF">
18
19 <meta charset="UTF-8">
20 <meta content="IE=Edge" http-equiv="X-UA-Compatible">
Replace V with Nim 472eb49 nandithebull 7h ago21 <meta name="description" content="A Mandelbrot explorer whose pixels are computed in Nim, compiled to WebAssembly.">
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago22
23 <!-- iOS meta tags & icons -->
24 <meta name="mobile-web-app-capable" content="yes">
25 <meta name="apple-mobile-web-app-status-bar-style" content="black">
Replace V with Nim 472eb49 nandithebull 7h ago26 <meta name="apple-mobile-web-app-title" content="nimflutter_ffi_example">
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago27 <link rel="apple-touch-icon" href="icons/Icon-192.png">
28
29 <!-- Favicon -->
30 <link rel="icon" type="image/png" href="favicon.png"/>
31
Replace V with Nim 472eb49 nandithebull 7h ago32 <title>nimflutter_ffi — Nim in the browser</title>
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago33 <link rel="manifest" href="manifest.json">
34</head>
35<body>
36 <!--
Replace V with Nim 472eb49 nandithebull 7h ago37 The Nim kernel, compiled to WebAssembly by tool/build_wasm.sh (`just wasm`).
38 Loading it defines the global createNimFlutterModule, which
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago39 lib/src/backend_web.dart calls to instantiate the module.
40
41 Deliberately not `async`: the factory has to exist before Dart's
42 initialize() runs. The file is ~12 KB of glue next to a ~30 KB .wasm, and
43 the wasm itself is still fetched lazily by the factory, so this costs
44 essentially nothing up front.
45 -->
Replace V with Nim 472eb49 nandithebull 7h ago46 <script src="nimflutter.js"></script>
Render in parallel on web, via a pool of Web Workers 4506a58 nandithebull 7h ago47 <script src="nimflutter_pool.js"></script>
Add a WebAssembly backend for the example 728acaa nandithebull 8h ago48
49 <!--
50 You can customize the "flutter_bootstrap.js" script.
51 This is useful to provide a custom configuration to the Flutter loader
52 or to give the user feedback during the initialization process.
53
54 For more details:
55 * https://docs.flutter.dev/platform-integration/web/initialization
56 -->
57 <script src="flutter_bootstrap.js" async></script>
58</body>
59</html>