{"_id":"@hydro-sdk/hydro-sdk","_rev":"465-7377d6eb9812583ac73c00c2818e55d9","name":"@hydro-sdk/hydro-sdk","dist-tags":{"nightly":"0.0.1-nightly.464","latest":"0.0.1-nightly.1","alpha":"0.0.1-alpha.0"},"versions":{"0.0.1-nightly.1":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.1","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"gitHead":"904020c15bf038802b51641e00ea3fa0255cbc80","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.1","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-Ju891qVz8ititoE06LLD3j5yrwrR7CwAgpMP1vm4B8RTSJlZ88oGSevKDLBzkj7ts2vzvS22oXT9axvWaB6fAw==","shasum":"79894139d7e67f6185029b73b7720675dd09cfa6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.1.tgz","fileCount":1322,"unpackedSize":47056910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwF1YCRA9TVsSAnZWagAAPx8P/RuhEMld7liHKhrF++1N\nPN/fbkBUPOsoMB6WKlrij3YbyuhwlBsSCJhdPWYPkQmOIXhzPkNNuoikQhO5\nCt/OHWgMwe8GHpwoJUtrbNANf35jnAG8aPhzY1HOABOkx/ebNoUAkT/7ikVJ\nO+/SNYLDra3jGwL7Q48mFtv18xTbUhY9HJKTL1JVtYbGa+pNdmGPfPN4Gs8/\ngVcqA+wBELYtFXB5EAleSY38pieV0hEbdGdXo+AkKUlHo5UPby4fVnFn2JxX\nzDVqt1ASIM595CX21rR9tpbHjJDJ0cwLHLRDr18V581bRCjqphFKxdtHtdWo\nBEn6aob/OSBfqVZ22tvrzoUXn7fXdrm2jqpU3p0dB6qkA8k7cndgfMiDUqg9\n1c8i4lYDGBKWc5x8JKwqnavEdF0qdzOyvHNU8CtJh9O9BAEmwJCx355toWuF\n8FDwEw6nsqta37gf27LwTIgxCp9QxcC75I7o84W8UQGjkywNUCdhFr/ycfKf\nffFnrE7j+SUgEnhQwm0IJqPM8VzNbfXAICQtVLe+UmcJNX2nM47gf5sytPAu\n+fU3/dkBEByYPu6uXQ2sKxPwa0+qav2MSiyOEUB5Cg2oagXyjqNWrpz6L/5S\nn7uF0MDe/vR4cb8oFlY8arWgGzp5wiqgFYweEfS1sIejTJiPlJta7ZaLDjot\nlKup\r\n=P3/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHBYiKC0tWcO6DXIPLObbIfVT9FwKR9bKCxtkE90oK1KAiBgZFvzRJs47p314lOk0oMu5eAfmvKGzn/QVTRpdJkCKA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.1_1606442327476_0.7603713778607939"},"_hasShrinkwrap":false},"0.0.1-nightly.2":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.2","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7c6d78d74c58ad62453ea95cc16d1fd15340a47c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.2","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-X28iVc9TUyJ+QYdJh1UpUjHc0OMuDcvuozvmrkvshForczreUUEJKye5mntpb0sV49XoeUceAGHtXXKrAFZrQw==","shasum":"fbc8d447bbe05e765f7eced5a59bea0cfa4ac196","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.2.tgz","fileCount":1322,"unpackedSize":47056650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfwGBPCRA9TVsSAnZWagAAH8sQAJCw/1kWtv7Fz+LqtCtG\ns3RPU+KX1cTz12FewdE9bbdMqFEAPpc55TKAs3OnAxLSeA8Kpws5OfIxOL1G\nw6BtNV44ZfvXE679Fqdy1+rS4yaNlYaUvmNKEm0v213/P472DW8ZKAzbyGyZ\nyaZ9ti2MIj7YSCYrYKhKDbTMoXd1JSEhFt65MDDNYviIvbhPPH1ZSzmZlIW6\nnhvX/Vud5ofDYNGjizk9ccsBCM1jr1AfZrCb5NWdxFq9pDLlpcoPguCg2eIa\nNsEr/apA7EChFZDIqSw/cZUkNaLltUVK0ADrAkMfB/GqVlwj6Pj205in/VmS\nSOhNM8hxzFqHGx9aBVvXpHYFQVp5D/kfwWLSYdla/6AAWofWb0UobPqCJlP/\n8+OWIBA5Q3INJRARfCFvgSFlJc5NERZ5vF3uex65jb9s/j18rMeESN56onYO\nz7YaS3M67+u/Hcnzoftc+hU8bvN+Qtn9XcnMCorEGjO1+j9QlpN2SBNKnD9Q\nKL/T6V3oSu8KMHG94qW+Dy+kV8MHQXoRJYBIgPxIC+P7R8NA7dm/sUPuGMUj\np1wpuE9rCp6yOqRcXQmHe9Yt5J1LkD6hb/v4y+/qAQjpzFvbxexOSppEuCnm\n0fRdUhMhfz4Zolckb2BonNTEfLpLBRG9V/aFGxzS2fFZWGbDAKf1O2l5qM8k\neDoC\r\n=82xH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC+8jMoJd55qOr3XVI9cZuNahnTilyc5dCPcLHvpZ9QbgIgAqRUiFEEnfKUsRXbRXvQ2DbcrblEpYFmAcXsiNXtIxE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.2_1606443086799_0.4958060475284891"},"_hasShrinkwrap":false},"0.0.1-nightly.3":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.3","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9f2c5fb5f4cc1ff897491a37e0af5ca270312fda","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.3","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-6ulJeC+e0sZInGUkKqndTx58p4NsD+BJjt64+PZoB11kc4/70EBj1un6fZbMpSAWLROvbqK0TzaOhsoPlH1L2w==","shasum":"e2b90b06a319b3388956596e038d5f3f0a6a2b81","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.3.tgz","fileCount":1322,"unpackedSize":47056650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfw+KuCRA9TVsSAnZWagAACFwP/3xEtQwQxWPK/pJSH+VF\nIlFki97SS7pH0PZcZXOEV6TsaEed/laP+PFjhEMlY14+nwjYJt/QThSMTICK\nvd+19EZar3aNG+WXMI1IJwSjH9tn9C9nDRCaHahQKPtcMKSsaOjNw4Rbv36V\nE+kxiDxGk/Ife0hQlCqLAMjNpxmH4jCAZ2sS/oTGR3eR5qTduS/xeDXDO276\n5IiqPUB2JEQmcPj9dNctpdybBBTHbXy9YVDbSjCFcvnY/RltqOCdax1/SR2U\n0npOYBmQ7uekwMyYtRCx5jclvCitNPlIDbRe8WPYQwDaU8YpHj1C39iFvxuz\nh9n/u06mIHs7RlCFSobs7iAzsyvNio7ezvNYshu/kE+GWh2spxSqoyE6X7h6\nLM69s2xPWM35tYMK+klHqUnNXDUyBXMbkQ698IzxDCZfSJDVq2ZbTkJkDZf2\nyoOQq9E77uRmuSzug2A4GnYscmhj6Ta81omwGBAfk3ZHYl0WbobOr269AL05\nPncP+kzcPBBzwNsepjbSoSFlR1mUo50c6Zr4Yt0Win93XHkMlTrDt1jxiDaz\nT5Q1fMEnYr1u1HDdYOLpEGY0Zx4CiqtBluDNnuDEMuTzLo1qcXak1oOZTBzB\nqmEY+3vVvN/jwamSD5Be0rIBxF4OD3hyC1wuhVLZYfPQTtC88HYX/0y4rhGq\nCOVL\r\n=HzUs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAYE89JD16Kddz7DRSWKJNaSy9MNLqaxlCxrq9PKMJMAiEAkabJwmpDterJxf8l86F71epO569VbzkGBTgmh5neTII="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.3_1606673069299_0.6157362480459818"},"_hasShrinkwrap":false},"0.0.1-nightly.4":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.4","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ca5893d513de50ca66483e0da6077493b1294bb5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.4","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-/4vOAkPvTZ+fqyaAobmkaINxXRL0yL1tBrFsmcPeBfVHBtNxscI6gxU2yB/dU35ECP98AXipl+fS2xgMEzrvYw==","shasum":"00d25aaafd2957990238ba7bf3001b9ed03be8fa","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.4.tgz","fileCount":1323,"unpackedSize":47057058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxWxUCRA9TVsSAnZWagAADesP/2k7in3W1AeAHUYIuuo7\nNEtfdrKj9mPnj2dbcGcEF+cImCpqhlvkqcrErWuSHR/AbH4s2lBhIZ4lm+eE\nHY4ODOvp0Qf0CP8CAAnCMOfxDaqNw0fr/UxEAu8P/8jxSjTV0VeVHPOhEwhK\nP58DBKw7n7CM5yT1Xl/87GXJP6sem+DWwsYiBcb3MsoYTQbOpC+71tnrgtj+\nhLXFyCIzNjXkQ5I7t7eM4MndXicP2cABPtMdzii88M9aaFdCZywxv4blZsDX\n41uH8Tb/mMFoFjnZCo1SUf7WcbxolwuJA7z7P0/WKmhkB+T1/bolRsxC9m62\nA1KbBwQqXXdcPmMuiiDo3dtykyGAwNLBWsT5jyyZ7eWqmNLA9J+0DRNbJ8I8\nknpZex2SFasH9vhUqfshL+BhAyursf+Z95jAeZPN5HxIalQfPmSzckER7DSP\nwdHPzhZHpmK6jzj06UaZEAgCdZAfGLfAU4ZcmqBjj4IN3obdYOZ73CBAud77\ncwWcpjRRcPCvZ3YzguAX/+idbXxvfde2MGRtMCbMz9d8RIh1XMurRK9IBPdm\nIRHb5DEwy/YN63kWKBEb/5M5rrsgT4nyvxQm5jrlqIXamW0rT2IR0KhlaLN6\npHRRB6nM/7GxiUQ2GzDfATY90rcym0Pm+GgvHm0u6lousdDvuysrPSPPUsqS\nJLMm\r\n=OC18\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDxNToSFtvij22eoOfqYve+PEmY5vHbpGyj80gj1CQTpgIhAIMnVp6r+mE3HoGjUPqLo8uop039V8gePgcuMeoZHUf7"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.4_1606773843813_0.7005107315143206"},"_hasShrinkwrap":false},"0.0.1-nightly.5":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.5","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"30f8088ccfcea9697da8a26cf3a7104c3f2be5a2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.5","_nodeVersion":"14.15.0","_npmVersion":"6.14.8","dist":{"integrity":"sha512-saf4sgpFNlEFdytHK2Tw5R5s/QglscNVvoSFZaxkloXfmO67XezD5aTPLpruQpH3e8THteipVRHaNaB5j96ZmA==","shasum":"1261d13e2b0a3b01e266e620a70ae0d3bfa931fc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.5.tgz","fileCount":1323,"unpackedSize":47057058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxZt8CRA9TVsSAnZWagAAsFYQAIKiZmI2uum8wQUr9Rq3\nzZmLtzMe3ORjiSaWdeowG0pJJ+fAVkAsvRXg4xNvjap2CEes0l1Q29D1LC73\nT80gKZ3/paYgwVKkLESU9gQUQTJ1cclIMZQP+Fim3J4ScN/N3OYMTo5V+/6T\nShvPv+tU+orNn8iZ4AMw0w/mC++8rnTOE+6pY3tdF+wXjrRvaUlrZR1lei4j\naR+HzpKFEk5Q6Thu/9xeFOVjq4prOhrg+WaIB63UhSgEcYZzzJnp4i15ruzj\nGvk4VG20PvIrDa5KCWVtvnOs2EmlleFFSMU2yOios8g0/pyxDcZkpUVg55xM\nxzBt9lmwyv8bIZ3iZg508dCHNzRCRtiF+Rj3sN+xZmFA1lrvuFSgskq8/5QD\nVVECsyJH8OpFVS87myHl/WXUDpa7Qw9IaLbZIsXynRI80ZyH7599vMXsq57N\nMSTkeUJFI7ixROQaQ7+kfbnByuo/2Ud4Dl7GpyU+RSshHSyEdGOOEnsPDk0C\n6i1tYANTsyCz1PJB5uL49RiV6uBqIEEeTlu+tJZRNNJFZR1Y26VR4h7Kcbit\neiINFfJjzqzlquJLERW2WmN4KW5UuMvap2+MFVytVkJuzUV9ndlCyrikhFV9\nXVsYVtQ1trP5nHuJisHKwQLfVmVMDb5+Yj683xRWFdBNHF6s+afnk3Gh371Q\nGIBq\r\n=NF8B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBALRAGiJ1OeSx5bfnQn1z0Mt5GW7q+/Isi1Sc208PjqAiBmXbTcxQ4Vl/jgALFAlBsK2b3ONhLLPphiAVRzo7gYxA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.5_1606785915304_0.3658169055201359"},"_hasShrinkwrap":false},"0.0.1-nightly.6":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.6","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5e77443ecd03645c32bafe5c1caf81f3bbabca4f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.6","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-gE/tfsgTElNj8p4p8HDPjmISb9DvP9MpFQ61zTUyW/RhQvGHMjCWS9l8GR56JqZYvtgG5NI/xWqrIy2VaW11XQ==","shasum":"b93d88aa58a1d1cb8f9867a737f40001576ad8e5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.6.tgz","fileCount":1323,"unpackedSize":47057058,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyWTBCRA9TVsSAnZWagAAO78P+wTptVWZcsv0Vp9DelIG\nINscqN8XrBsxtjtmE7sCMM2wkDGO51xQt6vSYXrzow+fp2myH3TCnq8KblTR\n3HgyctNlfViYRpvRDlnqpEJ7hDQsn2pi4WPR8L8Fj3Q5Z0SeJSj5zJykEvEm\nd6f8cS8qNi6iiT8yqPszuiSSV9hETjgenDgd2xXKmhfh1g4dRE3ZTTm0Cllg\nj5iqgzy+pzazqhDpBd+AzKpnWqHtGV6HAWBGYpEHQiGOynffWQovv4W34p7P\n1yJqUeVCFepfpYlxhZjDsjwOyo8tnx7OACxcCd3NzxGpLoeQQmm4cinB6gxz\nrIr/5gXTpb3ndZ/EZUFxISLiM6IY4DsI09FnoNh+4ukTGwrfVDiJs/Cm6ngf\nm29BCJlWqngoKY/4DWo3mZK0DeRGgWkzVJ7dROOPbE39vMaqwAUcXXQvVPZP\nCSbx/LYhY6Kp+lwwzFYakgqCYUl3eI3I3sGelezvs143r0LUzCGnFbEGDbIU\n2B6UEuqZKIT9K2YbAKz0gdU2NrC0vE+kR4LayQRrN9nVcrCplXjcxdADJU8P\n1sAakEzh3quP0X9wiVIrxyK1Xtn7B+MAxQbTLDJ35Ec4L5nry0Yx03Tl2tMe\nbjmg8DZdafT/TW6Ji0cQ4Vikoe9JErX2CgJBFlpsGuVZfhc/XflVcCjfvBfY\nL+fd\r\n=qPd8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDWMv9ZvYK7loPEHuAO8+MzGex1fpF0/2UgntF12tNuMQIgRxPhUoDQ7CSJi623N8NgmXDQ650AD7/NjLi1OhpjQ9I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.6_1607034048639_0.598298980927269"},"_hasShrinkwrap":false},"0.0.1-nightly.7":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.7","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"^0.0.1-nightly.6","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d9795522ecf30a4c233647d08dbe7e8a4a78a386","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.7","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-a09xDPUM80nq592LRD8Sszt6ZJ6pc3JT7KocbGBdzQrOOe8zfUgCDoDHeB+sx3Z/PKbrR7mgY1kbtIMLACw2fQ==","shasum":"dcc84ab1659ee124119a7be5a91d6dfed63c4ced","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.7.tgz","fileCount":1323,"unpackedSize":47057052,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyW65CRA9TVsSAnZWagAAfe0QAJhwx/Pku40eD3Q+hzvi\nXTT7tBFpAFjn21uheQ2BkENzlHv7a4OWqZNMmFTTVlG4SS+8I3qp1LV7EVD6\nWBxTgxCWZvXcZsDvCpz/gilLrLnF06YoTMolDaIoMvoCpZ3KTFgdT2KGua6u\n2wjYgJ9MjRTUytb1qgePYSMWNmWG0X1HvxBF1cvTRq7jiMCgdyrnVhB6dsq/\nJQDT+1vir5FHQNz6kKL1Zhgoa5qmeZg2I25AskKpcqYkiO09M31GIOIo8/RC\n6u1Rla6Nwr80O1Q+7lxbZeXLqeYUSX8YkajJPecDplKiT2Mi1SBYnx527xA5\n39ReiTy+yVioQJ3/xnqHeuE5+ajC3WuDqY8eBaRPtgt1LhdTUITxWIk/CUr2\nyjOQFDrSmsZ5qM7SySD9H1VGZnaoewbqrbh9hEZto4bjjFtw2Q5OaCVL+E+D\n6YSdoRVe5oSks+WOsmj0YgY5mSp4oJnsOOunba46U6mVbWJzCLOEHAa/Nju+\njGKMi3BMNlW+5tnquSNcZ4OJn+/d8Dsci4RqDiWByyD9iQ9KeIJAJG5YWnmp\nAYUaja9OMPzRn5GE66YBVve3kNsl9DhU+pIUqG+cA+VijNUqw09pTq+5gX5H\nsUUJl5vzXvSmhxqaAc5zvtsJ7yhqtxViXGJcTMr9AJ1Nbo5EZ9vrg/a5dLj2\n6WM9\r\n=ksu2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCoYa0LkcwujTNWHW1BzXQ5VMi2k1CR6E2ghIWsTaDIdgIgMFSaVDS1t9KI0bJieTEVWmOW9wsGFj+bvD+A5/Ill2Y="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.7_1607036601215_0.8367203878356853"},"_hasShrinkwrap":false},"0.0.1-nightly.8":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.8","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3e752626cf2cc108b90267d30c6cef3bfec30a15","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.8","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-z9oax3WKwSCo+B2mFFOuYfaDjK2CuCtjxusshC0ilK2A5wrhIRsdldJHAJeA3HZllaeTyFfUXvGjBf7EMDhkvg==","shasum":"504405022d5c49f6235a10eb9e3fc88971033b36","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.8.tgz","fileCount":1323,"unpackedSize":47056715,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfytPECRA9TVsSAnZWagAAEmMP/R6JUjUMDfRY/sY/MXFo\nHfLFFT7LQ7xHp6Iw5W0kK4v8fID19DUhsrgiUHYjxResnuh6ZE78SUXdPT2i\nDz+4PeKMr3cyo6ydYNGk6cgG1RaO7KsfhrLWSPpZK/lw0l0UuBRpJtundf4k\niVM6PcjBToMCQoYTvEpf6x4sDj5ehQzhQzmMYny0ghaOiowUdT8VYRO2++7p\nkRjzhK2eE94jwsNM1e4g4ySobGYplja4RWlaoD6Cd7/2fCjPnXnqish5RFz+\ncBuVttWO5/hKHIFsK0lDQOvwdjXEYC9MCTfkK+inAnkHtUbYxiMay25lprGM\nDvDbrkzjvY1NZtj4w8QgnlR27YYBdUawO6TOzIw9IMkCrxHnJV3oOweOrc3Z\nNsD2NPf1Ex2XJZUYpQk1zPqd4t4ms5t9xe/mEiaXj+Hi9gj5wlELdFA0wo+2\nendJPIwD6gR0sgHPURO+5LmwNVsUCbZlmpXwza1R3KkLeQQsa4v6ERnDa1jy\nXTNtq0E7RdztherJMGgn5/DwGwlQseX2pkOCMWIKz8HAH+fs96OtyhtAcSSk\nsLRfLxHFQTIA8ao/PSyAT31OpjANc8EGPjDnf1ahXBD6uNi8jW0qK2QeSWzm\nzjU+gfxVhlKyG5Ms3goh5ULTyYe0cUuMtqQF9rWcss9Zu8eGckb+gguG/aEr\ntl9h\r\n=uKKK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFcM4bhCijOM/SCc7t+YNMvNte+MnpKvVT4kL4GguJzGAiEAqhHXubSCw2D6up781pXVl3rAiF2Ufc6ppkh5DfQJChs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.8_1607128003264_0.719670921333549"},"_hasShrinkwrap":false},"0.0.1-nightly.9":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.9","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2c6cceb8306400c0ab4adfaac4572e56f8eb1c07","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.9","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-WrhUq9ILO/FnGabKEgpa6K6we367W5yNOWzVe+PrSkXGfn/f7onw02CEl/Dw4a4fPLYadLdoPtSVub7mN3i8tA==","shasum":"42b8699b8697b1d8dcd6ddfc768d6efcb423a723","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.9.tgz","fileCount":1323,"unpackedSize":47056783,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfytZwCRA9TVsSAnZWagAAUO0P/j5gER6n1KaKAvcb9x1x\n/l420WN12qXS965nMPSR1ENIRIv0ArMUXASc3YE0DWnUNr5wVEvOr/WD9yZj\nBO3A2ioXsXHJam/4SMfVJlnlyBt9QePnMEgd1MUD1Z7RxRG+RFDtcPlMu9Gj\nP4YXhUbFcwKpdeVwSgk7b5jfi/BCPrm0qCZ8rBAyo/H4W+pSTO6jCmNwdoZA\nt+gRHjjBohcD7LonGKyjtcXa+o6pM1HxmIQyew0fToH8375EmVgsFZXkrL66\nXx24F5Vh9F1NgQgp7JLiVaPheKro2sNQ0mUjeiL3VEKOiYPLG7sc3BilN8E/\nDtoa4RyeVfdMYWsmtQX8XWRQXc/q+Agnw3e1MGyzqBUNgM9e+1b1PYW5ADbK\n1ncGhHzlajGUE/KX5nqGOFoRKYihLQ07Z8proA+FEDdnU48SOXY76PQEy1Qk\nWErxpIYdAFRKN+nX05MxDWqB+SrmA1q5gs5g/rn2Qfi7w/1FYQm0e4uRWKgp\nBaJDZ9uURMioWUvsSFSuVhxXiJRFZ+gPFbw1K5Hsu39bo+/kNkPvO7dSS7+Q\nNal4vylq3KGxrdKmSOKZu1SkJIJkI+Bx0hIICwsJxoWsjYlqXWtSrn0S8c+S\n7zVSgC9WqQsLCuMwiSF/neIcz4y6goBwXwo9zKy4WL7iWKbwxTLhmlphONpB\nk4vr\r\n=wF8G\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID7mVA6tTwh35/Jbb3S7QwfWtGvIoVglwHQsU2q2qfO/AiBwyDnY5Gk63Tm097X7fZT7Nmy5XIl6x4pq8u+jDwGsKQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.9_1607128687194_0.9090452247000238"},"_hasShrinkwrap":false},"0.0.1-nightly.10":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.10","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"36a9966c3be55472266b4a80e58553a5f4b0e58c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.10","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-tPWElj03KtqVvkvR92PFYpNLhyUg0nPUmMz6rpJZBgSkt9sPYjsEUh3x4pN+GtSw5gJVOKSSpEimqrvmC9F2xg==","shasum":"93f130c50add5598f7e69b853e352b03cac54dd4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.10.tgz","fileCount":1323,"unpackedSize":47057386,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfytdDCRA9TVsSAnZWagAAc7IP/ixZMlObFF3b4gDWHNsA\nOIXLyrtOQnfacrfsW7xL/ZZu4uN3ICYkyQqRQ8yi4SE5yup94lQlh5o7uyev\nPaSGo02iMl58SrMwkYI7N415blNSR0zMJur8bq+M80Z3IKqO9TBVDEqt+D1D\n/VIzLQGY5FPK6vWxl+fH5ipA+73ETvA0myk1zrKfVpnL2LOhGuUFVDPnio/u\nAwheLUTysyMhuMnC/s7z7de5cFLH2mPd3uBzECsoJRO3oQ5JMy3R2HqRLhHW\nlcJN+A9P89Wjx213Rlw/j07ZH4WtzfOfJ55CwS3B2Rf4QjkRUFbag8PwGmId\nUSzAlkBYHXa3rtoesWMcbIx+VjEar2ZKZFLpU9epjxWmNi2QuqrEfQMR5YuR\nzDiSSGU261e4zJTXoeghz4ba0Gnj0YnBeQOqxmvIkI9iWL4Hds9K9IhKo+G3\nTTi4MeypWdN0VFI1tqB/5iXy+DN1dKuI9Oh0JkoqdHTJazwE5A54jQPYdPXk\nsZnfWGg4eJ/4JidYDqIxlgFdyxhRJDKylEYZ4lFKOTiMjE0MRaGMMu585BRi\n9eBJMVwSQ4vcCLYpHtaCl4ObzNcpV1fo8lpsWmJoaw/x+z7nW6uqEYDrM++e\nkH8y2AzSwhc53fPq0tR/V4YnIEwkXYWjwMBaesI7FkC2keLyfXij7uBc2qMa\naaRw\r\n=ysS8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDofLk3+ERkN8cYJloC04iO3slMK8KnDe9UKWjM4pD2vAiBhd+GFSUf/zPOa66BUfVyJRARzfIiVIv/eeu4gMsDkgQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.10_1607128898556_0.908970103602019"},"_hasShrinkwrap":false},"0.0.1-nightly.11":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.11","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a856fa30e807d6de5c8baa7a93693f54edf5e2ec","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.11","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Byq52OBLvcONKEZy5RqsbLHZu+MdlgazbhWbstYABKGo+p+sxYbfKbVR55x9IXTq6CsxTWzpFWudiZrKz5x2EQ==","shasum":"dfc7cec2b12284609e7701d82fb2e0a3368a3bb4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.11.tgz","fileCount":1323,"unpackedSize":47057453,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfytoBCRA9TVsSAnZWagAAfUEP/3TH1rtM/7DSRCHgHN6z\nEPvv6weri59hYfeLTEm23aRhrafqrURhjAC1g8eOwNv0UCHkXNL7duaYoA9s\noUJS9Yzf0i1n3flbbQ7/hPUubMnSuJx6UklXiHlndwLgZ5ddQGpAz6DSMAST\nkR5j8RJjHbOjNtpRwvtc/zzGdQoBCiA7abl/fZvgM4wUehaSAuoFI/Ywn/rx\n092MC9r9p1NU27xSpARNuXprKDeuJAQm/V9zdV6D/RJIitUDmw1nWkDEbBmg\na0uA12SaqZxK3AJ9tckB1AKB/Hcx44+kPgUwySswoG3Y804uMGe6d/ezI7CK\nX5zZxETEbT4t0498GRT/cEQjv5U9vJqQX7tBdzSvLkIOpyWoXNDR7Pc0Qj/F\neR2Oj50v4AaoUln0/59zpb43+phXclZo7gLVf0xt7jeZo/OO8jU9f2+C8lhn\n96R0oFJCkjqQn0hyhWJiMV2iWMvWOUvGG+DHFCox+kYQu7lvCU0zfkuoTCDd\nFHSccVVTH7CO6QcmXzh19+Z6tBGUC6E6T7MZuSydwm3PV41KgFW0pJCzx2vI\n6eMV74UFLcO7KfMl0El/x8YT7BLI0jbWaDFwLTuy/XADNbECx0q3+i36SsUy\nNdp67qn2w/Zu3+55ZfSEhyonj/2girZLren6YJX2T7re+8/fwohcUgMHRGy8\nwNNJ\r\n=AuRB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDlMaCHSl572AUCEZ+vBRj2e6/RLSgg8f3KykBM7q8uxQIhANe22cbrTosjm65irniDp1ggDHzTpOdwJjyh2Y0XCgNE"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.11_1607129601084_0.49860699631080996"},"_hasShrinkwrap":false},"0.0.1-nightly.12":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.12","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"64ef224a252ae82b221096be6b4eae1eeb302eb6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.12","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-W52d1FnoApn+1d9WkeQCUusl4YmcB4DjGvC+5Qbgu747QsBlz1Sfw5e4xFqfA4nq/eaTcFw1lHYkPskXNh415g==","shasum":"570566940ecb4fe0ee663c40c65d271e0b23b19b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.12.tgz","fileCount":1323,"unpackedSize":47057516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyttJCRA9TVsSAnZWagAAQeEP/383jcn8XVivGBDlH2Dv\nFc4pC55H961utFfR9MOQz2qgmEI9jUcXuFqrvqZEBjkkT23XJvrLRjZspDUU\n3LEo8eykW7VrDbNiogIkJA1SGH7Maq9tn6X7euTBeinioAbhqmOsMpLVRh6h\nL32k/6VIqbugD0dy/JaTlKL2tYLN1EZRJ/1Ac9sxKCrRj1mRTRDtio/GuBAV\n8EBVflgibJZ9sSD3BWFk1DOjtzQxIvsKV7ifriMNb6eB9jNRqg/6IslPnkmc\nujLECJS4iCNIHtYUac/YegfDIIBv94QmnPxClxJtiag3ha5+XvsmUefGt7hE\nMbdHzjmoRjWQDRmdeVVuJxnBJiOcWqEr5yOiGr5idPOc0FSWrebgZ3HqtRFn\ntdQb50oayj/svdsLOLFWiIkOMYtdbqaeQ7y7Oo6biWY+TFqFZ5wlcKmUHfbx\nYl9yJJ/+1SUiKmugBhXYD8DaTNK6YgSx34Oy0lWcfwGJC02nTeBQGTBLXFnY\nIpSmNggVmwQvCvXbF27ZVYah3J8SdtXOyrXHwzmIYSa/37J7LqBkrQQzUrwh\nOsybhwqNdYELFQV+nJ5pY15HG6AYSmDtNwptEg9bQyO7ZTiT3rPQAqh7CShz\nZZ9hXZQIufv1VxaRAKpqV9VFttBJpdCyQLWxHG7GYkJPyTUrXnlNhZE+MKrd\nQQ17\r\n=cDVp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDEOQGYfXXrf0s3sOW17PXWbTmKn25Vn1c1sdVzvnHwQwIgYRqD5LEvl6wHrbKgqtCsDwFloYhu1gP5URsUaLZfcJw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.12_1607129928598_0.23435254047469023"},"_hasShrinkwrap":false},"0.0.1-nightly.13":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.13","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4375f0e1b38c8887ebad06f1aa28919e0b8a1e79","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.13","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-JQ3Dpa8NgfK9ked30dOGHvHgS/5j2DqMvwqF/iprGwc+1828KYYO6lvz04EA3JG41Ca58Swb4b34UJPKlI6Smg==","shasum":"fb37b991cb7182ae04cad0f93646f782255a7391","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.13.tgz","fileCount":1323,"unpackedSize":47057516,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfytxbCRA9TVsSAnZWagAANRoP/iSbrkfoLBrn+p8WGVlG\n+vUlJ+o948UUQvlHOqCragvaudTdZvhA5WXiwVy2UluOrFv5sIl/Eyyo4sJH\nBtm+dXqimKRQGLiZJGzwQqX/8CU3QgfWpEdhUJwo+/U0Ke2oxcYAakcaGnw8\nppqG/TPIGOgnplDMPiyTN03DJGS6/wgmtWQT/Um0rIE8QQtf0V3mDAJnaJug\ndxAY8wl9e//oGOukTxXI5pY6vNcgTwLG7puriX041+5hc8YXA7YD0p8hcv94\n8TOt9a1Th/GscLCbDgmXOgpA0QIaA4nPmO0TiUgxMrDD0t3wNXb5/w07nvCI\nd+Jfl3s7juBJEYJW8wDSllBHaArMZv79yBZaBZxXDpVYsAwSZmSEdhak37CI\n6GUrdX+19iWH7LaVnhtidh6ACMeAJzRvXHR15Xu2N+/Gv56vBoNOLRPib7Hb\na5QehTzMLZPbW74tEJ3dddvr9G+mFvvgzaHdMv6kpWRGuaN7kCnRsAF8HOTL\nmg6VPksXPgrhytACHq29AAWJ2OBtZyoFMA3ZFVt2SULxY60ztBbhqpiX540C\nqjmZGbYuUwa3iN2OnrprIbFHBYcv8HFkkTSieNPZeZVEGMe9JaJM2OjbWe+9\n2PpkdLPzKQPCe16PqNzk+DRN4KHjh/G+3KL6mHa0OZQktu9x1RIw2NvX8w1i\naqjw\r\n=0R+g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCQNx6E429IFJHGeTyds+xtbQ4MCM8BCczAHkQX2iG3DQIhAKG7Q/ft4b5ptps9zzLmPp1NCFmXVxwKhZ6tnwyKEu21"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.13_1607130202654_0.7270789887765903"},"_hasShrinkwrap":false},"0.0.1-nightly.14":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.14","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"898d3e537ac473e7ce7b46dcd79edecc8047ccd0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.14","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-0xbympu/dn4bMEC5aa11sPAIBXKamuXtm0h+SCDhG2xFyPg/4MQpthAuO//3pusZ22AArRMQuamxtBLK1dtjJw==","shasum":"03a4f4485f2334785d6e1a1deba9726adaffc049","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.14.tgz","fileCount":1323,"unpackedSize":47057535,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyt2+CRA9TVsSAnZWagAA2fsP/2wHw6hFscO12BRX9f3e\ns9k+jU/gA2XWcW39bnMFQjvQ1C0jT9dCH6VqxCYqa98MRhohyMzOBQa0gUCC\nEvsNuUlHKpQ53T7Qr6wd6hvpFAsRO9g8AlZF9KtC48sLih3A2P/ciCIHzX1X\ngDX9t105p00877HYUdaa8zQ/z/XmGTjibvAVXYTf6+GjPjf43PPDZ6n2MkwT\nHGuo5XfNwSm+rKyjSYGaV0ElXwTY0Pc5JrrexyTySDxXJhQOk+oSK1fHd3Bp\ncjZagpPAcGNqX1+ySewAgBt3SKGkzxikOdfG/m3xXES9Xi9TTqeqzmUQ9pPn\n6zv9+Nbtzk5bZKvoF+Jj6ZRjB59AhQJYBSjTv/RA39jz0rGsHDfT1Tjyumbs\nSWEh80QWaBg4Zdy1l6Rgszn+74vpfFyOj+RThusRuVfZkCnw4i1Ee1FBnwcl\na/J6fa1vrNgrBtiK6L/CE0TT3tFZCWO5txdp5fQqa2WV6KqrJ30PhDl53WWz\n+20wXkVVLylcW3MOsYXftapEjDkKGWfpcWJm4l9Oo8MuTEQ+r+h/IEhfhqg3\n/CjO9zdZE0cDaMVPAb2h/ivzeenbUFQ83B47jtS+a/sMxQc3NLoW46sZ254m\nQyKAySuUW0Gmgu94J8cFacJEPd1V7/5WefVVHeyFL/gBc0wm0B+eGRFPFnsT\nXA8V\r\n=TIC1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB2e9ncWlJJmhBTy69+fjWhYD7i8HlRaabO9Hj4dsHxIAiBecmnFnJFtFL1cCkIh1b7FgidMq/rSXM9OErwWiUSUUQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.14_1607130557702_0.34870367404164426"},"_hasShrinkwrap":false},"0.0.1-nightly.15":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.15","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.13","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"59abfec29b5512b05b07a26f728bbe59b2ef341d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.15","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-n/No2DoGZfubMwqADT56QQJCwwg39kbI5TWaCypwKg8FoxjEVOjGCrL7ECwWfLdvXRbnyfbBm+maGI7F2RCEaA==","shasum":"32c7900e3c8b1c6c905e2205f9f5bcb531a79552","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.15.tgz","fileCount":1323,"unpackedSize":47057545,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfyt6+CRA9TVsSAnZWagAAapkP/32zGwdMifL1qQ+Jtpjf\nU57E4XIcJbIDohclNpDumgUdNsSpGVjfHtNXK5hvcovvT2NJMFntCO4BGsCJ\n2qDjQYvJUoTJ7RC6z8bL6727P9XAAoG7RIgHv6qsjooeEm6zZMlWne8n9/EA\nJ0DP3zVOOyRHnR+5UOfDFE4tNtNXn37jSf18oYV6EM4m4G39KjReyZljVewK\njJcesJrZGkML9XUZseSJ1dCygxRJjM6R0YVEh4yFp0cBUcsqKZ1BPYSVLiEl\nveFDlhn9yUH8ujbzAcVR4zbmX3+WvhH0RtSkErBG/nCkauw4SXGBNLLscVpp\noTrPlfKiVPH3045kwIpZlyMPcklVWmhCej6XFzyvF2LzyxBnV9N4K+Mv6RDZ\nBiRS+K3HmJgneyNPqgJyb5RndIY8yv1skLxgOtW8u5cNJb3qanNm2jSa8sop\n8kIQFiFMbw3X3v9aJyRxz7w5zgmEGAIexbVEJ24xRPtJnPBLH0QFL/mXQxOP\nH7CzjZgXfrqqjnoU0qzSOCtK8RMpydRvPQgWmt9iyP70+CIr3C67cOg02jca\nPfqjKEW0PEDlL1pkdJli/abZsuzZ8/LVy1LRRbCCNry6JKYsbm8077oqpeAm\n7HH42oEXBUNlqVsjK7fwOxcQHSdbJUob5RIa226m9ky8xGQwoPtqF27qyZHv\n1647\r\n=nvGM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5IGvNcGpHwDE5yhI+KkJCf7dvFo7/hKt3aOutouTRAQIhALQZ52RiGBbaKFbyyJu/cLzih4zSe0dgUzgJ6nf3lPoF"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.15_1607130814078_0.735586142591798"},"_hasShrinkwrap":false},"0.0.1-nightly.16":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.16","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.15","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1104afbc372881f92b2ca1e90f71b8e2917bc614","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.16","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-+4UdKSx857qowWujUHdfPqEEhI69fe9yyokuHEJHaSZ/KgPnH3kBgeR334wNb9mcTaJPGT5/2N3FeuJzCgAgJw==","shasum":"d7633a75820faf680c9a09a6d7c816866c0c4ee0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.16.tgz","fileCount":1323,"unpackedSize":47057547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfy7f9CRA9TVsSAnZWagAAUXUP+wQM1f+qwB1SNp0R1ji6\nZ25xeUWmhZv/Y+NRUHijsRLkwpP1eGUhWVCI2l+4io5c1i71w4FtMeLJz2ga\n7VkgVziRPEbvLMkqSBEYTWuDztSVXNJTqGXhuuJUCVmgbEaYFU0MF4C/DwUD\nUvhp+C8XYE5CR0Oj82rQgxeMFt1MBhb2hW5Q1GpQsU47iIQwavlKtMJY2lth\nSfwQ27JHFmNYy2Zc1MtjaEDCc8jUTKMgSYirkJzfjOpjCeWrBA0iiu9lGBvn\n41Q6aP7MyS91rTJ9RwaYEtIbi7n/vXMfwKhrqYKM82p+oem0kRuwEsm6TjVY\n7WUqKQVU1MZozDA5lZBGFgJCsGn5TTx7iMPUXePDF0Xlv74fupfEyf+4G5mL\nMRoNskFCNkGVPqD14n4kGDQxT4XOW2JNofwo//az71hAgNkWuqa+LLC2ZH1J\nxODt/Rn7NDnHvCMyvDv7laZE5ORy6z2vwtnTVzrWi9wLgEKoyMMhXukHR3I7\nauqg4IYWY9T3/Ys9L/HE7w6pplCyNXXvKuhGz5FZgWlNwH/zqp93M8BYrx03\nJUKWnux185qWolwFoDN4jixpWiuJeIpgoFndiyDYhRu4LnTN8WUzCbCFlxb6\n9fZol0dHMt48jKNzJGOK83T6WT+RwAiJyBwkQC/+fF6N9OooKKpMBx2kCOXu\nw4Ea\r\n=bLgB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICrjAINQnSLBZH/sBEEAbBfq1N1rVokxe/Zve9UfpDH2AiEA2X0z88DMkbULLqDon6CA47H0GG4LgzLsmpNzwzFV1Zk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.16_1607186428822_0.652446507012507"},"_hasShrinkwrap":false},"0.0.1-nightly.17":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.17","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.15","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b2c73958abc0d3f2a44872f64978c7ab66e7b63a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.17","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-s8wP+fdKsZ6ErFpCjOpC+xpXMvdi7qQbAy/yV6nKuzniLtefSWU8SP3qlAguqUBqknQXqNZU8cADXtu0I4wQ+g==","shasum":"b71d621e920225d73ea93d636a8cb87d0193a9be","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.17.tgz","fileCount":1323,"unpackedSize":47057547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzEhsCRA9TVsSAnZWagAAOQUQAJMssDXhhWm9813ZoEbI\nLAw/Q0CFRlFROL3miaW8VKUk+HvW2e+d4S+3NJOHFQUmdFMli+KXNCa0aD9w\ndoPKhsAVgIxfZRFkHaRAuTChprRGX7zb8/iK8mxXBKAKY3fAAJSFsJW/w8+g\niBFdvumCuokozehnkYhnK9w92G/FAW9nu9Rz9xyrKZJTNfAvNZcnI0Vb5pun\nxc6cxEmIRgndvrjKa/d+4NyDLose09Fso2xEyQy+NZ/Wlz8YZ8exzGomxHTW\nE2csbNsQJZ1n/fjEaZHa81hf8Dwg0EGA7NXTvIcOrlu1adxPfZb6xiG5Nsqx\nwbqV502rwQtdK8vTEHiwCDJv9FtxKsibUsZf8Fxlmn2i4Eaa8Y0jsKvyvkOZ\n5FEhHDtPNS1QATwGfWzebHq8duGb0eB6yphvHxAxjmilQ7MSwbOQwfkBPQXd\n3fGYr8LTI/xxJwXkqRLlylZq1SFQ35aTuvh3xdYVqebGOowiY+wUYuvECUWQ\ny+o10EyMYzsXZU5BYPwpWsJhAEQay2VRbTrfe97D9uee1cwOL1mdnrP++eiy\nVgo1bjrz5Wni6mnI/QcP4+gOq3h79iAPz1P8zwh6gbTbDKZ/oyaafTevh8Zx\n32m/qpL3+3Z+KqPdDECCbj266l4wU7xoCzPt6galr9yjQ5lxzrDgoWYwNbqo\njLob\r\n=8Aur\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB+9vKLwlOGWERy6NO8Ox5uiRMLs/3MC8r+VY2Cf43v4AiEA28hFEjlTt4RLiwWIRnSxUcdMBPGFAH34QoOtO7iyCOU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.17_1607223402489_0.316154946464835"},"_hasShrinkwrap":false},"0.0.1-nightly.18":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.18","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.17","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a089162d04dcbf457f44da376b81fdfd60711ea2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.18","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-a/fxdUlAujP78e1kZiMO3NM6rzod9BHDGOTxk5GuMJw5kBR0k+FB70sruPuHcn3bSJDTJWGl7yzjVl+vAc6S2A==","shasum":"6ab28445442658105a8f958dbf60b1ffb2376451","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.18.tgz","fileCount":1323,"unpackedSize":47057547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzFClCRA9TVsSAnZWagAAJ3EP/iyO2RVsoPHJwWUrgK1d\nkJ4Dm2mnyLDsNOeF5lxJujPvKHeUmaM0bmlnmQWg5FooRgAuRV/KxbYRl+vz\ns+B/4xCsVdM6keYsAE2ebfFTD3751CG1ldZsExbVq17z5Pi8Zij3oVzciwdf\nUjNArPSBgrE8iD29ypltJ1F8arFWsiMZZ7PXPhfsV1LSWf0BBqWh02Khkv/r\n1wPvZEFrJPm3GMFp5rR/bOI+9FrCmisXU7bIyXXOuDx4uoybZJP0HqPqVob/\nfqCPVrD+3Qz5AjSk4N9Xa4gy4oA0irTKWyfK8yN8YXKqCTLHWwQEcxNY2MUI\nuDMDJO9E+BxH5UfwCwqxFJY4JP6bauMOTY7zDuXEVw5SooYuZoT9MZ12PJWt\ndIc2FtEwuygYLRn6t2iMPAhaf0wKdKVhzcDYujf3z2FprtdU+DOsvV/R8Ain\n8Otr0Nq5B6GZSV2RJ/i/CvJpgqTzZ4PQ1WwQMv7UQNAZm49f+1ASCVK8l2EQ\nDQgNupXFJKzGJX0sFf9uvgA2cWgliVsAfuGvr8LGoEB7VvmB7tZpHKBBWtC1\n2WpWFRSu7ATeGlVmHLCcwRIbYCXEnYGyAInqM1pOCi28dZt8F48RtuxTF6da\nc7qVYEG4JHkEpKIjAyZCz4NDTyij68aOaHJfvdM9kW5tle5EpJyh1UvLLR/U\n+Wzp\r\n=HNr3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB5JXQceBBkS+ps4ShsfhTlBvZVLkbn+6tdz+Zt3pnSwAiEA/ObnBzomfQ/TuVA1UB2HOBQ8naDqAvkeXW4agApvgns="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.18_1607225508409_0.9656276013341099"},"_hasShrinkwrap":false},"0.0.1-nightly.19":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.19","description":"A new Flutter project.","main":"index.js","directories":{"lib":"lib","test":"test"},"scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.17","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e80e9bfb48f33aa61e11cfae06777bbb3d9dc9cc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.19","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-4CFCVQLVXLJJ5TX9m5Iz0ryrWFBJjyc/TUk+aT8b+EjH/r4L1YI/YMTw39zy+u8ADH04bFj7L7RvxDu6lf8YmQ==","shasum":"efc823b4b9de77f27efa78ff1aa76d4578132338","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.19.tgz","fileCount":1323,"unpackedSize":47057747,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzFMoCRA9TVsSAnZWagAAohEP/RuSw8rf1/2YgMyJ6IYa\nrkhcWaeuMR0vtZhapeJTl9Vq4Xn4kenmYXh32Api24PnVr8DjZUHSSwt2JK9\n+MJfBLoUpTPeEWlLroZXLF+CpjLsXYIpYxslNX6S1TVFAiNzCA5V0r+7Rujj\nW4l2Z/03vY96AW+ittHXAHCygNYoc4KPA1T93Ypyi5RE/uCbhxMBb9WIooeH\njcKMNITA21fDvyEZwEq1yKSE5WO+b9nYr1A9EYz7qXW7KleSS1uyEMywSlD8\nce0AVAYQMPfuWPUfuep+lXqaf63qY6CMnhPeMeDcKo6uzv/PbvzKNxwuACio\nGj0RtbL5wWuyjgVhT3T6yNW7+Q9ceAXLYJp3J6Tdr7hecS6KQuxsJ68jltqV\n2v24h7w4ovkJALqhvQZjamkyTbgBgdtA6rXdRnaFUm+nhBmOkbwotRm1wIcJ\noFbQTSrxk+YeBFLudLTO3HMGVyVn5DG+VBxZH6LTNvUQu0ytjlWU8g6IU5x5\nYfiKdyqnybJaDpmNQ0rpEoTk9iaLMDmoPARC40Q+znQBs1LsLecuYYekDOhw\ndjf+EhWriKVabiYif1fXpYHHauKXOVVrfhhzcvp3zR8a0kAK7t2wJjeLsNak\nGo0zDpCeSzKrXsUj5+Mko3TrK4xaRmPoo5RaN3sdRDWY54Y23HzCm4UAMsVL\ne5jz\r\n=P0+m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUY40PD/5Q/7R/Aoz8tmfAXDmf0q+OdQotTRYJ3gJn5AIgEM2MsBxH6sMP29OGNvkvotPJOmtxcljuETHiMtqacAQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.19_1607226151255_0.9938029311602739"},"_hasShrinkwrap":false},"0.0.1-nightly.20":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.20","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.18","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fb10ea67a0623696aa43bb92e918d16e182611d7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.20","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-6UtxxNRgbSqfjk/cAuga/tVTCbEf5T65Y5qYF0dXu96RkMsPBq+PIluNUP/Akvn7kLqCALTZdK0EQh/4n1jRlg==","shasum":"f994ea6fb4a5b74cd2f68018f7364a6f834c2a0d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.20.tgz","fileCount":342,"unpackedSize":5921787,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzH0OCRA9TVsSAnZWagAAu9oP/1wPDg5tr8OK4Nqrf2DP\nccxxWzXy6s5dQv50HdU7qv/COoY01YIcPS3X3j7+nWIi8dh22Qbyqa0Mt/GD\ngznV8tgnnhVUY5GZcFH0jmi7GwVOXClgOgrLwonKgzxo5/5pDnK9dR3I6Yqp\neNunGiskCIceE4WL+CvvRqe762PlpLTBjvwArDFYWn6zYDBPiiVmrC9fme18\nsx0C5GzqeZbRy/NqS24LD+gyiYyWn0O4PCpHR1VCDBuS9W9iPwPIawoN1pdH\n58tePJf1wvW1wbObwQe5D3r9w2JrLi+aleW+GbrphsuINp1UdzoNxAQYssU4\nvtw6LqaQH2v6IdCJvBMUwt6h6pGKcJYew2VqHmnfGMlwvxBbszqw0ApPc14m\nLZq0k37LfmMZgZWMONjPLIOhYoUeCEAg2Xvj8SqEvz0C8+N2LtguAqFlPB7n\noG/mNms3XMIq+F80GZdXRPhS2wXX39BKUHCsu7UJ/iWcqIcL/cMyj5x2xo+X\nX4/sTAXaNxfZoKhsgxce/lcEvN8DtC1bE+6DxHhUnwIlksCwcKD87lN0LqGH\n/O2uO4QQbEAmWdcFIxG0PlzcjfJI5F0uJI8wIrgn+Pa6h5RE7GmyATv2l7qq\nvsfEQp43o7OHt4eZyIsXSayDY7H2D6qAm72d63PSA0V2f0ZSsoV0JwViAsxj\n3u19\r\n=Xejl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCoQUYKttgAqOJ1yemK50sib7d9UhfD1mBCHYtk3lAFtQIhAKWGj1CBJiMZXJVR5OC5fK/ZvHtXv9NeF7YIHa4zgz+5"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.20_1607236877620_0.4995584570995213"},"_hasShrinkwrap":false},"0.0.1-nightly.21":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.21","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.18","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b3b6109abb0bf924d1a20e48f2771066bfbdee2e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.21","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-54MX2vTHHvQtx/c9U4Iu5Xc8In7TtaYQtOG5yimDTrf84AnkhU0gWpmbD+grf9x2y5DNXoAnVyjV9ejEx+RzPQ==","shasum":"4ce1f1b0ea59e1190d32c8bc080d8d4ad212c63c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.21.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzId6CRA9TVsSAnZWagAAy+UQAKARiP79mUCKZe1+gzRa\nb4KRYLwweM2IuYgt/KGxhdbdSZ0sT6cdhTG42IhN8sTsVFzE8UB0FiCkF/Uf\nKKDuqdyWagF407nIKHz+WVJteX/4YmVgy6cziw1o7xhJgyGESyvirCQGzgPD\nBFsoTNu/xgYUDWlH9hvCpCVeaZDaFP84vDrOq5Tua8BwS70tnka2nZPTT/r6\nLIpWjRyiS5LyZ5R0lDIWtGQCxNmRt/EYMUKEE70fPE4eTm7TjSi2HMg11fiI\n/gXi53JC/5w0gYn+3LEZ8bqDaGBCRaFkJnc/GxJchsLf+ndQlHlfW0pFQIeI\nBT3hZ/5MZHCS2YMbJVvuBRVjfmspj5tAvIl/TbnJwIE1BDZqd+OtL1eGTDeU\nioReOnk+1D0lEcBicscQU8vCrz3MYZTBdOUvYzTxYXUVRfS6502OupTXaGKn\np4uWwEVfrvhV7cUvdVckfdZSRB9oAhBTycSq1CqTlZ9nnm1Y0FIhWc46Fvq7\n9mcAzEUC/GXh85SN2l89XtMYRkTqnFTA8ebTuCjIzPSBQA6Pcx8NXINztZF/\n2CHj942j4QSpx9UTRjOqu/5oNPP/NQYT9wkcK+GEvp9nH+LdA9lyUDtQU2h5\ncax2Ad1z7XDK3/Ye4G6aKwXwAbrY0pv/mrS/Fy1m7B9MGP6hhfWAIfj9elxc\nuvX8\r\n=WCF9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCILpVNUIIWp9qKNIE23yOAKQF9ehxdfV+jvGYLzaPIeAIhAKQQHVCjWx3oOcChWTuqMB/vzifoClyZJdoU5+bcw4Ot"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.21_1607239545665_0.4759504137867807"},"_hasShrinkwrap":false},"0.0.1-nightly.22":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.22","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.18","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^13.13.15","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f3ca8a6e8ee0f51467d218df3f618dff43e57c62","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.22","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-blpnv4xaViJfeES4EzsvqPc0FH9VJ4NZGoLWCNaiHYHCPKVG1Z4/Sq1MtoRr22aB8ccnNL4fQ4VUfgER0xsOcg==","shasum":"c73e662f924c486542638ec99a1d4261c5e48b74","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.22.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzRjJCRA9TVsSAnZWagAAi04P/iL15j98Sxzx9Tdq3Htq\npJvNz5GZsSISdAoNLjXzWAPrGWFjHDVGDiERnpRhbh83t6+uBl+V5iFzOX3X\nphHBBZ1duxlGFhzHaKmy7QgmuegRg4QLo8cgYyuk+411tB4O3ztxX/ZSa21F\n8BRYpy6PcbNgkUhvvyglCJ+jCvwqp3nuRj08OcVCC7nAO+KaiwhXE9mNm7Ex\nb5HoWDTk/K9Su5GU8ctB8pvEjVhPi8rLxyV0jtASR3lKNHVyVyLPgm3bSOmq\npnguvPusHvzh5lllXXijA7zO9N4tSUcbqGXO3Q7Gc9MC1y9C9vlD5Y40gwXO\nBEvvx2RJdf+304PSrVGh7aaP8ZyFDEjyv8ke1tVU6MXo6LZunQLFZxCFGS7x\nRf29/RXso+jyCZLd/wlLWOjgdr0hFPqI5W6YcJAmOoMZhES1ZKRFjB02ivO0\n2FfmOa4vKHpR6XlqdHmtkLfGDnz+Ypvu4V8chD+50d6qtZp99CZ7lJt1XZK7\niVpfjFqGuWtF0FxjYQ1kcmNaYn+GzrT0LWOPYkH9l+0QQgjIE6KpemFnAVlD\njhIPjESR/SAaruFBRmdnCUONAlnyaE3gBoHOZoVwcWU4LZbu2r0mziKSoBPn\n3Io779u6VU6pbQ/xHNSODv+NdF8Bt43SIhtCnoqqHVSl726X6Iqq4D3FMbC/\naQ7O\r\n=pjz9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYT8BaiWP2Bw6aLc/DsgBvFaX+S9ELkoM2zsrsyWSe/AiEAmjvC6ZRBiuw7LzxV0vunOj3W79Wg/m2v1kFU6iu/OaE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.22_1607276745092_0.11071350497575416"},"_hasShrinkwrap":false},"0.0.1-nightly.23":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.23","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.18","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8bd9aee580fb29e6db9d5c17d4d8390fa3e0ae0a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.23","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-qs5RnZq20Df5biboekZPwnNMZajnl02So1kGrnMLEynPqJHF0qbt3gLfP7CCe9tQE1Z0lvMIvYAbWy/ajACoDw==","shasum":"0e44ac70a30f3ce63c50bc9bd4ee182286f8b0e3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.23.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzg6TCRA9TVsSAnZWagAAX0UP/1BGkW/vRe8AbIqpCRNm\n3HSu0xs/sWaT6U+gIVcDlNVfqCWD3jC1ZEBjfWFzQ2jNuE9et+JtWPnQYvws\n7J7RW0latbzF6y14lOHJvZqQH1DAtS8chVHar0UoPYKFJ9e9NPvZoHTZw3jd\niyIesf+B94uRCIayQAHYMpBvebwXkSX3h74Omew0o+yZ/xP/6TTV//Ep2ZEh\nDcLZtuY53gMEqEwThiOZYcjc7Zn78ZlUG7ZiRQQE+L9N98n6K7m7fOqeSLIJ\nJ+z22cOAt5kdYinh6XczJb2VkBmcrR37yooIvavHF+WObDfoFw+RlMHdcaeJ\nTBchOoTG1pvsZKEIt1+VZo2Dl7cdEZIEfhaaRMzcPFZjY49fZW8yIz/qpeVO\nLV4XMN1LGlRnv9CNcXPhFP7qhwsBoofi3MXBR0HauI71btGPMYmWklOM0iJu\nK0CQPOFCVeFKlT7H2svo6xbymK1ZgFZ8idWw+FnmW6jaNzgau3Z4jQWUPuu2\nnYjIKgNR5zpSg8SQwGflEfd3/FpshV2BdHTQBT8uYVf58cHzKpxt+iuOUEIR\nfGJfj9P97BMlLr7QmcyV6KEVqiKVvs5uaQ4tnj4SjXNkKFAmHtbpaaL9z2xz\nDzVMhtbBJWWzoqSKZ4F0eVjGZT5UxlHHscFl6Bbvmb9qLQGRxOnlYpTmmQ7A\nQyMD\r\n=0e9s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAc0CA7ibJH61KBEc3lmhWB/qqxRxItp6wEHbK4FdLIOAiEAqh/o6DA0HfPMMyu2XhPJ/lgFuE43lGakZrBJnFfvp0o="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.23_1607339666861_0.9227622232555284"},"_hasShrinkwrap":false},"0.0.1-nightly.24":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.24","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.18","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"10e6eeaad18849aa0340cf3b9830f4c87e43464e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.24","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-c25g4dhTX698bFFgIGjd3IIe9TTrrZerdFjh3NrkBHg7RP0fBQNTXyC6cWp67lGLd/Mkm6CU8WQ46mAiqvbv6g==","shasum":"214326ed149deafc56d26d53185a2c6f6181ca65","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.24.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfzsv4CRA9TVsSAnZWagAAzzkQAKEzwaymhs27IQqSmOz/\nvISPGMkWe57YS2rdpjsAFzx1g6IPh/BVAo96fo/AgaclHReY9S2wbNtp8cpV\nMh6feectKpOL6XWNhyIa1cNlz/wjsbEoDAWA3bN9MIG2Rw7j7z4cqS5KMLeO\nNIsCZ+rYkjiTkx1V4BvmAq+FrRhq2Mw9OZy9a4baQV6yr74AdmwVYjFzW9Gn\nI1UPHUsnfxeJ0wEP7m6bNWKiBbAcfA54VRyosPdxyQZlA8jTqK4lNZVL/gkc\n4e4EzFIJsxhhXw8Ze2s8ta6OPV5O0wUSZhQR0aAT82FA8HT3dpt4hTs1f/HW\nJzXEJ2wjuZ8Txg6Uesk82TAWOLImpcmX57VziAF3EUk2ZtpdOmeYH19nFhge\nwfZxEk0QStb9AmMF3Y+yBh22Q+DITu+N29EIQgjpNMENla+iFhFL+5uZ327L\nYhRAst9g2JdNYKpk8nmTcFnUhv3PYLTGVZwTJycR806Yt/Pvw9CHMpcbWo5f\niUaQSIcxoy35j4w+QuBWjADmiqLibpIucjB6ZG3wke4cbKfOK0hnGDemuT8E\nMmXhhJZ7sOIQXUvy6k6M1Mfyl0/U4DwsjqzkngjHgEl0a1AQ3htf0C57Tns+\nKecssYJxJghyKGjw5THWXFkwztCtU4SNEg8gklwJ+mcwcyJ4YmT0zPTgxfjX\nJVZv\r\n=s1kr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4Jhgvmq5Q4aY0xBU/22K8hp2kaOY3R6DGyt/XefujkAiEA3CTn+Nn1RmFljZmqIlDkj1kTvw3DBEElE/8T9VpDGOo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.24_1607388152343_0.34456279557136527"},"_hasShrinkwrap":false},"0.0.1-nightly.25":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.25","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ba3c9d720e74fc5ec26a98eba3643948f41b03a5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.25","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-vRoPtDHBFEipK4u1QAuy5ikgCt05lc0u9mPeiWGobrWANmDWlHXab2q/5CL+TOd9+/LtLRsOaK/8TGOBAAZxRg==","shasum":"2ffc8d277e63c7eb674c9955a83ff706747ce948","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.25.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz4dmCRA9TVsSAnZWagAAocsP/R7zs27zxDpBFPcihaNq\nFJLWXV1ktAPRbXe5RvRbrRB4pPXRikrWrhDFy8rbE3NHrFnnAzfxo3wtZaVZ\nfKau3GuA96x3AvLLsjzaQ/pgan+5DcIo9CfKeY0Xrkx3Yz/OLnUtn/xEIFXl\nsOEl7ZAaCowEKEw/St7s9eX6ciNYh1K1IYDfp79udziMvsLsrZjJNCTRI5PT\n6GrrE6CbeNxuE6mDu+gf4F5ybjPMYA466KeAu5+ldPALaMFYV9tYigNZCzj+\nst8OwqAHejtqbyTxzMXqj/mQ9UYceyQBzp64uUBlKkv3k7r0QvNjUV7EhU5u\nbBG37w514Q6j/scyWiBw7QAqt/lHLyItC+FRPR66ZdbPke1byDLfk3NM8g8h\nP0rSxey3UtuHLeoXDuBviriRH41jHBCOGRWNrPEbIDBv7XGM48YFFPZw1h7r\nxDscBkShiph68A+kRvCKEeDdtVwS70pXuCrJk/HqN5EPR5OOHB6WtAQiMWs4\niLf57JD8BdBt4s5TALERVLl2FRnLYvYVQW+rOtABm0EGGUqbCYQqjR30x9DI\nC0WtkcDgKmGl5InTfWPfgvD7O2rnXe448X8ZuNT7waBlSBmg1rpbDgdnHeja\nr5675kPse5wQymhcBlUoEiEBsu79AhpZXePoDiE7m2PlAVdbddMeMyEMyJHJ\nvdnm\r\n=YnaG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3xGtYNdEBu5rJaLrLYtqQ1wSmXafQX9P+EuubAqKmBwIhANd+yItKUYJHM3JBHZsCuOUlLooQNMYDL9W5E2Y3D1pL"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.25_1607436131999_0.12456492552096265"},"_hasShrinkwrap":false},"0.0.1-nightly.26":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.26","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"685a959a3b3c9a4c374aafe7cef8533958e6facf","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.26","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Z8BiDtq9OMZUzDI/jwrHG1z8uDzu41VxWFQXYqoWP6bMaLBTLMWa7JulWKXqOC4TPwnnOC4mTVbIk19NEn1UAQ==","shasum":"7bf419268d897ed9aea303aab1e00d65142272af","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.26.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfz/qzCRA9TVsSAnZWagAAJw4P/j8vA2sKm8ma6ORikKZk\nxaf4sZjgq3fH5Yqb1nNzDfVV2JA/zkSGuyOUnv7B7oR3bAEpvKTkFV7mFiTN\nP5J6InYSkMAXf3/uma9VPbX5BEFvPHkLcEGPGO2K9n9WA6TII1UgP/9loreK\nhLUyx7G7AoSJ/grWqKkQ+cEFdzbYqiUQyorqLpfgPhPls0RERW7sQsR0W6MP\nIEIznZuEBl1e5nYXJr7Mju/HupvA6Dnpl6Kr3Ld0+6jkvvxe3AA3Zr6euRXo\nlzRVXmy4QdHW5T+j77do9Lg6YsAPAty+bL3TuDfIH665DZMjZmFHq0IbiyJi\nDy+Lsk+K6Wq96Fwj6aXDB/tqOpzBDhdl+30ZUpc/R4YeAgKK1ngreNprCQSv\n0OSdMVHwQciYPRR0mtFV47gRYU2GK2hFNqDvnKkyyd3EwswBHAgzSgJeYvnP\nvN5xvU2i68ax1tvBcWhLw4skefsqLq6M9z14RHtMxZ66QHj5ObFwhcqKrRLh\nOklGuN1sFmAcKAOX1xxJE/Q6S+PpPoaGt06G15lbBCqOInrinoRB6cch/8Sl\niVvKarYQ0Ch3l/XsAjsoScCZCUyK0wTveOEXO+o9pEfhg+6zr4LHXyDJ6QzL\n3SaWa0wkwaC6WyyQoDGK/2k7QaTjikjp1i08OmmKTZ+DZEWVZpJTsrgkNhvh\nymz9\r\n=LiqG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDtoIGYlfLMFWSmaEXBjSydxJbEkrzq69rOt46g569noAIhAIKewDyYfoQaWDIrXwjWRpZi4VWQ5b7iUTkUWqCGo6ml"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.26_1607465651073_0.664623580380163"},"_hasShrinkwrap":false},"0.0.1-nightly.27":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.27","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a6f0a101b9a485cc0cbe8cc3071937779c63caa0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.27","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-vvoJb4yBpyA3TZwAmj8lfvsW7CdqGhzZ+fdRqPLVYRqIg1QPvg6rifutOr4Jc5J1ARMdD9csRVmws3k2qwYXlw==","shasum":"9ffb747a6ab2ae2e7edd2477464d560715afbd54","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.27.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0C6lCRA9TVsSAnZWagAAo48QAIRbeaSOQ9opeC446Ksl\nKI0bzUcx/V5Tbj/Da6pPzgRUhfE7Jqb/E1+Zv7QGMin3fyQ4l9EgZUfB84+J\nA9tJm9ECdHf0ELjAorGaBd3Fqec6Jc34DrrgF+Y5oEvFAvRzkqZte4IaMNAa\nnyx4hkr+Lo53YeOa9JWtZFMDOF5o2Fu8uloYqei4d3o5qA1LRl4HKyA0Fj+V\na6KCv8XWIvE4f3p43HJK1rvIcG4vNJJhgGJPUoo2ECjvqni3+cI+cLZ0neMa\nQS/gnOfdM0embxFqMTJkL5opuk8o5Zg93xTrx7djreE+LpG1YlTkUc2IwrrY\nqg9VXBzc3dwcQAvP4DuR+hCjaD7ffsMhTlpw5Vd3jQsjcIPeOstNfzgoc1H8\n+KqiAaQM22G0HSQ9+bhdOSEbkW8adRSIN2du84+ycIGctOEVlEw4bahzJzcz\n3MQnHI8/CUCiS9Wze8OKU9vmzODM/VYWutvzrmj5mibRB09ubDoPolq93eza\nLMlvjzxtnwRPx3kD6d54RAmXeC0WWzaFnmnzVvepJoO3cao/NcaiAD0/GGpo\nWXJbuX82vLgGimZGtRVNZYUwTb23iSyxgoe3eJgG/uhVLG5cCSlU5e8mPwLH\nSKumwv+J6mDXmmExuIuxLbhZrg066vGAsv+ywrW/BYxGSz0ba5TSyPEgQgMV\nNRoB\r\n=+65Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHDTNwz6Vl+Ji1o6TjVe9fwTGqQrRgw7kKB8yfKEsvafAiB0u54lLRjTgMZwf4vw46UYy572hDM+fKdOHTfsVfa78g=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.27_1607478949205_0.42108765954551153"},"_hasShrinkwrap":false},"0.0.1-nightly.28":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.28","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0f8f8620a21d154d0d21c7729a9199037648cadd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.28","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-yPn46X7owYVl+Mw/Zy8DgMNRdPL0lbr23jFmGH36dgMkreN+/eyWvp1cawAM1J/Gm7CjgCnsQk76ndUZ1a82nQ==","shasum":"cc3f0d6de21858aaedd69c3d8d44bf7add45964c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.28.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf0p9vCRA9TVsSAnZWagAA79QP/ijtbM9EixSFUOWeM5XC\nC7H/MOz16Ui9DKg1kcDBY09GycpcAKcqCoOAsfAIGTfSMZGE24SY12Cw0j/N\nbl7cxK74hQcrNjPICi5kAvjEsx3H9WXPLham3jJAxhajS7U46sl4x/qzTwCP\nQfQbE9qDlP7pke81nmfDfaYA6eah+IO7O+XI/iOV7pxyIJOfCBGvHqhkzX/7\nLnmG7WX6pk83t53GsM5nlyk95zHdOU/qgSwtaQVyPVNMdMwtc8VfVsVbFFaQ\nFdaY8/H24vBCFTOF8zISDPA9p8aZFAeLZyZaWze4wmZH5OaQf54aYABVx8Ea\nkXlzezIfWpgRFCgRmY/biI1eb8r/ZiIGq/QH/G6LPwx2g/foevpprw4guK8J\n4IuipFCEbV64+Mn03a98dWpwstpOZ3Q+hdyFhh6GMfDon3pE84bh7DZ9ng/H\n8bvOwM7UyXnh2IbcZBZLHuY2++C/lA9OLPmY4DyqFX0GD7DUedciwweXs3A6\nCENRpfzuZ0aWlHBKFZNXAGDqDKIPSlC/zb0bbaruvPGSy41vFxx8kM4ciECe\nC6JPxUz5z0po4e40F6q1uMr34jI/h9JheEKq8bW21roLM/PyACbXmM/6U3wV\nulPIdvSwCDA+dZOEmScWt4TSC7kenn8/152tHAj7ULpcHu8v7TDvOk49UoWU\ns1Yh\r\n=wguI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHz8ezxH/c5y/slJh6+jzQD2FVX3lroiQldsAt8z7tB6AiEAxb7ZsSZIePwfw7giDnxm5Bz2EOu+3NskwlFiMbtgxO0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.28_1607638895213_0.30825040065572495"},"_hasShrinkwrap":false},"0.0.1-nightly.29":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.29","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"89ad294e1c23ff9271562ef91a111b85042717b1","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.29","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-fSG4MDHAQYMiX3r/vHGy/pp7CDVLMD//9EHsDjsuw5cTO68BoJ4H30rxKKwnZaM1KAfR61HIF2BTDaHUoQTVVg==","shasum":"3f29ad9328e8ac301a177631f25c1b2cf66164bf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.29.tgz","fileCount":342,"unpackedSize":5921848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1O86CRA9TVsSAnZWagAAPgEP/AidPkcSId3Zn43N0jVa\nABj09VVTJPRteDqxNC/37umT1x+JReE/nRCs6b+QFm9Ro/0rNOKNLj719EoV\n78bUUIHlvd7/hhI5BaVinnIFhRJ4keNRijjTbALQSMuGJfekL2WHvFWYsvpO\nLN0xDfVOa8z67SzEz3z7ZyuyUjlEy0dT+E/yw/IeSG7a9UxgvwXGnnSoJIF8\njRzYlPLzFpe3WJkiihpKEtWIq+na1gXuv/zurZo+qweTOzM8qIM5zWvB83Nd\n1awvS8Co55dAKJpQf3s02GquM9q+MQHxuqCfINsFw4CSxbysrdVixeeNWSHH\n2WyZhJ1UpzUGco55EGNcmuUt83gqowcX2p2dj/tEYsqWqNIdzPKqM3OOqyTB\n5IzKOovYpJJ70hlrz/gvqhaA7TcCw0PBDHKjfzb2R3Puex+CqN1eMekeYJot\nSductFdlw+l0smShJlW+iLZV07mwlPqoOA64uAEOmd4a4/+cSNNGcitrH51E\nC4Xc2DybUfH/c4CBF5XpYuRc6Nl9ONfZ0RNMKTp0RcQD6VXkGGBeyVltdL49\nfwtpVRA4Vyp1nQX1n+V7qojaUsYDSIugTgY58Pfxj8zXrBAEGrChARXaOeNZ\njfUK8B3ka7kxVz7n/6RLK0WJyQ+c5Hn0QLHjjww9HhiW233863Mp7SA6uZpx\nGI0q\r\n=yG+w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGE/RpqVHGd4acqfpMof3X2MB73EYNOd+f7GfT7j1FShAiEA3uu6+KEw7RTg5swS9jyVM+3u1VN6MiE5AQNOYyS1D/k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.29_1607790394125_0.05752617794872528"},"_hasShrinkwrap":false},"0.0.1-nightly.30":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.30","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"75f7c305102d241779b77aac55a8b478d9764ecb","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.30","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-9IYChw3JZZ6Z8QhYLBxLkWINGKkmFOLNMqiTxZe5PCAltLKbTzEi5bKgY3ts4DMOdGOzSeTZO6sb/Yftb6nLfA==","shasum":"2451adc78eca0792e484bb3863c20065c8f21b53","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.30.tgz","fileCount":342,"unpackedSize":5922106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1QztCRA9TVsSAnZWagAA6FcP/1+LVjYQGDpzlrRedX9r\nVDGv3hMyP2op0shb3xqniTkCviralHs2+u38KyIebv4YzHm+xnpIwrWmJ5Bj\n0I+Qf8RYsStF6q976WKVO2s8xUdf++o1EC+NVkvvygM9GafNYIzEz3IDkUQa\n7SqX6F/qhOOZVoboUy1DsmBFjLQxUkuWNa294re9nNVbMSyCtXc750vEb1ao\nwWA82g0ur5v8u8oUthEFY237ZkPGm36tXxh28b27YtSkM+UuC9QTN1Og1kUg\nyoAWRgbAImE8PpCRM7tGCxtjaKB5zuFOcwFikM0Rp8A6tN+6g9Kv0IvI0daW\nVc3j96OETJGGO0DGwgTQjDfm5k2vm+7ZeDq/+T1nxstHhEpwOTrc9nXIHqo7\nEzxGStgd7Tn0MkMoHFcujwnMgA6sXCJfgqkHjcx2pcCM3MyVzgJ8ZLcvFGoU\nSjJlk8kv14cB7G3sXrhtxVieisPZJzZNGxtMBEowm8dfr4T0hRLusXxZNkY7\njMuAY2QIEWZezfJbT6gMNmrpfx/MCz8ljuXOENWCJ6jj1hWbnagZBZ6TgeZ+\nwHddrWnvvK9Ldj8oZUZrf5+8//ABbkmvauemY8Ik9clUMAb/AG/BjqbZC0Mz\nritoTJenP8eTVTRidgTthsqvNanrDzRCCEFWVB88GILm6s+8nDWUP9qgPTZT\ndM3Z\r\n=GY1s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDR6P3LJqgLEDnH2bkgsmsrLzHRK/JRTGE3og7yx7wEFAIgE9rLcQEOcJqWbc0RPKACxVHfc+cvrvl2B9eLmFxCv7U="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.30_1607797997209_0.04731670591432602"},"_hasShrinkwrap":false},"0.0.1-nightly.31":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.31","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d2b5b0c221e740b848d183ec18dba01ae9f6e552","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.31","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-/at4vxyhPk6Id2eLPRyj2+ftU3DrDoGwdtj0NnIrC8V7A8jc+QLMmLlEf+KAYSTQE0dxu4FtxJZW/LPgBLWm7g==","shasum":"ec4b0ffa429c5df73aed1cd37b1e3d8d67ad207a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.31.tgz","fileCount":342,"unpackedSize":5922106,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1RJ+CRA9TVsSAnZWagAAD0oP/j6dEdORbDSxykq/BxCw\nzrYUtjmdCdNXtx45VlMrFC4Yv2QgKSZjFnNUKdHaMDwUIThCzWsFIgJeeFok\nFoEkrAswTOFc1k5D5ps68mgIZpZ8rTfQWUIIPyxwXfGcvnuCJlf/QaFgFMqE\nvMiwTNlQO1gnxLJrcM16eUH1oEUeJc8LaGRZj5vWY9BZHvx+eFhrrB7OdZJ7\nxXU8sg2zP31y1gbyT3c8h14haSF33dS/GQXFH7oB+NCKBz7V3jPdKT7hBowX\nXyCRBZ2GlCIAhgILRCmja4i9FMoJgwrr9PAXMqqC08zQF32KeuzJE0H5hCP7\nMRdJybeDyKXmMARGWZWi7hPUtR4qUTTUdI8YLOY0Rfsb2YMgoPoTHPyloAI5\np6Z+XoWNhEcPoReguKf7C3I8Kfh7aIfs8AN7BPWZxg6zOOw2pKlu4mmFN43w\nI1vi/C2IwlsQe+lSmf23vynN/OkSPPPfxniEp0Eoj98fEuFcvh+xkphCSawN\nfBt/iJZ+CTSRlRadiiN5jIT8t6asPoQ+dRLfP9o4Y2T1jMb/nJf0RoHjzFFG\njenPU8ZqtWpgCb4KpJHd+TKqSE8Jdev0CYknjLjYNZlrudfSQcA1ObJUz90O\nUijHDwhS4QrTYboe0QO24HT+fL/8zVlOzUs6+1TKhV2pBrKLWQYX9Pbx+5VI\npumm\r\n=Ft1a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDwQ2yiLCInabBcLVXAcEfmIbeA4B7UNPhbHGe5aPGQrAiBjtUckGi3zRDnyQvM/ysM3W41Q89CW2T/ToIDY9pDSNA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.31_1607799421566_0.1478291144470345"},"_hasShrinkwrap":false},"0.0.1-nightly.32":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.32","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"283de9518263d513b68f0775b43ec0782e0430a9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.32","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-0KgZPwDwXpCQ+rsyFBdawZsL/+mzJQCuIW+abTJQuxVC8V7e247lq/PCcCMLBA55qoXSPJwAe8DjAppmS/NUaw==","shasum":"2d232089bf16948c63b4e2f7fd73ad80ce599992","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.32.tgz","fileCount":343,"unpackedSize":5927683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1Xl0CRA9TVsSAnZWagAAX9sP/0QVtkH/0JMmGBpbtRxK\n96rveCFS9hSMizIvKWRKNaHebGhy28gTq2oEUkIIm8V9TqLdXrpuKv8cAnKb\n0+w73/g12cx1P3qrhZcHyKgILFnNOB+LRHRIz/r2x5BqNi8NFt4Z0J9QG5pB\nSX7OCMmiGdXIlBxqWNZOtmM76GOXe7lbTnpgPUubrdMW4BMG7gxXZlG4sIEE\nx3vrFJUeaebTMx3U5v+D6l0X3uJnaTmSpw7C1+pAU4ie4+5fx9UPVi1qtZp0\nOAC9euMq8V5feK+YAqH5brXLd9D75sTpPd0/9MNEOWplsvnjLnD1Xj/m30rj\ncbxnHOutK2fKmEyPhXNn+LnFIhej5S2ybzk5BLvbXc0g6p02h2kO6QhqCxUu\nLOf/ASCAgC6zX4JdYXJZgpMA3WFPOIWMS8lCYqpWFnSE72x8XF19cjg1GrzV\nBW1xUglgyna6JmvlzDaoon5KX8uu6AGEw8y11XId1vr040JznGKlg2S3jihF\nxuuqIfUHjSy7VJSo71/0xPvjieCVHcRIf99zP7VLpKnkuLMu4qzx+UIOwYgh\nl8UNTSuV/SIvMGzL5Sy+lQgZ5PYgwq/9psYZ47YIaGrphW0EYY72e7RPFunJ\nh6KTKnHNreBvtYM8xdp2iPxv6xTGUCZKTwpduGPONZP6GYvNcq9pAWB4HKz7\nCVMS\r\n=+3/z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH/WAgGtglGjmgdABj7ScKfIYUOcYsYqRKqR1pc8UqAuAiEA+ND0SPqUztw8FjLwemMc4/xjS02JdTOSyIjmrEOTUnQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.32_1607825780151_0.1851936198473041"},"_hasShrinkwrap":false},"0.0.1-nightly.33":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.33","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7c86ed69061d872e51e5d77403d8ce68d369ba67","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.33","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-RNQWBev1z2z+wAH8fgB9LPgubmRw3irFrdzeOVidj/HeZO3DkvZoOULMVzRau3xWeotPkSG9vwhbY+NLyK7xyQ==","shasum":"587266dc297201bc2bd32fca5dd1592d0707dbc3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.33.tgz","fileCount":343,"unpackedSize":5927683,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1ZLICRA9TVsSAnZWagAAtCIP/0HbuJCx+Fq4twd3WP0M\n1IgQKq6WdzPAGDJIfBguUQSRPwyr+15aXA7wM51DCNSwEAwtZDsHIgNpgiw+\nHTtDE8q56x6XKKCj1ib86zSfgUIn3ou6lZQUwkLloccNv8FD3xJL6cRwyq5P\nICgULngOdpR1bLjygPrVgMrz8opi5oYm1jlRk1/Y/IV+gKqC8qBzx5dseXp6\nUCH2t8cdf556VwGnKHZp+2y0yizQkUUeroRjYV8eVwsFWgQMaA6A3wMvp21q\nZrw1R74+ZFj+SszjlrLKgWS6SgGfwLvWSwiJTAKsxx3RhZkxeWjXd2n6p5Ot\nYTGEikgHu+rq6ozwcuAKp8oih0wHrJMgb4tLKsqhGvPq6Ih+GI3L2Xgot98L\n9yFX1jQrSoJaN8TFRh+vx4X6IxUcDHqW/3apOCQZN5pT16k8650HiMus7X/Y\nbSsSlLVIvRLP9BQ17PsI4HNR57eAITsntjegByXeiAt3I2U/ZdhQA4hyCNjB\nGUOyk1txg7KRRgYzl/SHp76oJtG6C+yjL47E1IBD3Qu3fIoMBQyuWQ2QIOvW\nx2H/uiRFKpKfmYDvLm/GZxijwL5C4wgk9uBimeV5V4xiJ3blHxURc+qMud+A\n/C5VSTvi2QofayFKGI+kH8Bc/rbwbWMPpRKn+SxHliN6F12PtRGbnYdN89tN\nWDR6\r\n=z4AJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFKFKEScKSFeeq69JlJ5w6JLRGhAGnXtKMAmGBD0i5gyAiEAtY4KZZU2kvxP2TcQ/ObXWzk8+pnj1vpUghm5jTlRjws="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.33_1607832263429_0.45368042192865254"},"_hasShrinkwrap":false},"0.0.1-nightly.34":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.34","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c562714644558841534c33a269049d9b9f2fdc8b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.34","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-tl5mvAG3sOE3QqGgA61Ee72U/shcVcSP7nZolz9aGO7LRg/UwcB005rYzic8AlmlNN+n28ehyg03x/ND5bLa4w==","shasum":"17b6f03f5bf3488bc3126b607ce7478d77878231","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.34.tgz","fileCount":343,"unpackedSize":5927452,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1mitCRA9TVsSAnZWagAA738QAIcBUqMdQt8tewtpt8tE\najsdFtrT5FOomEQjyFNvx7d6t6+EdBXK9dG83/cT/llwA+Z+5Vg9ajXAlppT\nx4nEOnv+YbGq3ZnrzR8HqPpCMdcXrHFmHSlxxbUyH30Ff9jKxQf4ocOZgdOI\nHcrhJkhmnXWs4My6k25epHh2dNKSRct9qoArJsyBimlT1LvN9iov4Pzk9Xfh\nD0qV+30Akc0tugdncute25MArO1y01TtZNiezFKG+CkmjFh1uF7qSSCfsV9T\nNeLtUghWpC8ZAmzjxQpE634PkYNhs5EmypOqPLMQczxVau6A+flNycs6CBLK\nEXHT0jym3RKwPEO8FNapXC2TehwkcLuqrHY+VSC2V3iPso34mtG6p1KL/Que\n1MGxhSbimzL0Y/SGF2hiziE8SKxA0vJUdSTANsONfeow9MhGkKoeaQ6RXqUJ\nTCtrUtpQFdr7voWtvWUfnkyihn7wuvr4ZLl/tYoZGMvAk+ZEYu2aEe9lmOLv\n5DAdH9GdRAoRct42/OSGvwYVwOhyU4BqXS/0EL7QxIOiTjh1o/G7+DICAQM4\nogUQVhfp5NK38hdY+R57s2xYqcJ7OnKbmDesqmgEDsl/WOFBdh9cht1cccJV\nAZ6ofqdAeNMmXgRB1OJrgLSg5UQ4q6XjGnOEIk+LmeWplrAzIdItWjdrwCKS\nGRb9\r\n=6FEP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFQjftGfy+tRGi0KEG5gCQbHxsNpelupz5EoFvNgCScRAiBl5Gnvdr+vODr9VjV4j5ub7L/HUkzsusoocDUzv8YQXw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.34_1607887021245_0.13957088590758193"},"_hasShrinkwrap":false},"0.0.1-nightly.35":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.35","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a474ffdb6f524bd7be97fa9081a9936d8d76484b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.35","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Jc3PTXMoVzDkX2auVzhYSYpDiRs5NyDVk3Bm92bNpWHUzsJHU3HXtYkEUawgB4YKEzVrBu69q1sarqLitGaUXg==","shasum":"61041d8c624278c56a40582587a4a92314d0d19b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.35.tgz","fileCount":341,"unpackedSize":5926102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1mmSCRA9TVsSAnZWagAAog0QAJZ3cZ9IeNTVwMV8oQLJ\niUUFS3rTp434mpoSpukDB2RiuiJFzm4fzW3v0AzN5JhR41YfKYuZTS3RkBrj\n10XA2l3u7M/skQUybfRRH33KhtfYL359v55KMI2Tn7MtoDYeFqKEgeLN2v8J\nqBYNjhgxfWKNo6yZrDAwvZC/cH8o5C8/N939D42/QGXK6vOWRwDsu6E7Xpfh\n4CtaFKnX+DzPyq4D4X36HAa+L6wYf+AR1h6YvQSHvupCN4vu/UsXNwS5I/6q\nkbm/+LWBwK89KmIsHk6C3QpIygC44Hdfv0XkUM1xIUqprI7AuYvVGybChc82\nmfm1lf2kx/IKhOxZo+DVnnH8akkUnwUwFOSMECQe9DWAS8JUFnJ5e7gsZtu8\nuHNHEJ/vXi8/9mClCES3MDzqoj8LUlnL0+XXt9v1H8IHDwGwmn6WnD3i73el\nsL28jsnTt04Xb1TVazek/KxRlte53KXHLicgIgE+DmQBKepdf0bIgxPCQMy1\nd0ydsVrUB3LHzFDqrbfJZAP0ZHUHZO7F7SLlB1IwX49N+n9EKMs6Xhhqsd+6\nRKpV4VBg9HWsrsFedrRXtkAVmr6usOZGnUlayCfLnnPfwl/x4Zz85g+ZZ0st\n27TyP18a9JX/s84wuSp+DhPXXSb12DVN1vQmZEHrw6qBGerl3NHMgBHOFcNk\nLCUV\r\n=qEl/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOtnvdfUVtqCSxjkScZkpDuA0Yr0JYsx3DQdYL2g1OTwIhAJNXEmmyeyO6LnliANy4V5ho19DOZYNHZ5LWnfg5BRmH"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.35_1607887249886_0.4418582634571897"},"_hasShrinkwrap":false},"0.0.1-nightly.36":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.36","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.19","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f1be03223f685e877dac5fc2b9edbb729740a1f7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.36","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-BXPXgZrvUpEnPEpOcGZbw9OzIO/a+gPoQjynAVP7fw3JGjDYjElsZXvm78Y330U4t0ywD9GeCLGlD0ga2Ypj8g==","shasum":"2d040e6c93e2825341b25d701871846cf8c18b1e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.36.tgz","fileCount":341,"unpackedSize":5926102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf1mrJCRA9TVsSAnZWagAAmbcP+gMVrWqtTJ4Z3twKmR2W\nF4JIU/vxQQAE6WqDysFjCzZacqaE3UOiJ6RTQbavPD+8UmnsoW02mJg5pFqC\nV0spsF4e66aq4KWrOHbANk6O2SyPO/ri60w6py5a6owwP6Lkqw3J9OLRX0X8\nrisSolyH01Pvl8T/VVZqpm7RtGC1rwkJpDoJKuVxjJg0sV3im+alxJY/3DbO\nkvdf/1FiwLKK7ibGdv7WRCx3fChWCohcUbeArsYGLCKqm3GXbfyWxxa49u94\n8rAEhU0/NOOoL/vVsJ4W10m5mrwtnewTPl57EZt9O8JKj6pwJiPmoIxyS2Or\nDhi6zoSu+Ti6BVcg4ZbRb3qRWeoXkrEG1OWWGVp5c3Zmv70yLV2Hd+J2lc18\nfk176to0qJ1SUs7QhJjTcJUg+U7uFXhnkqtEgBJWmKOcQNsVzblMcHlwWj7P\nAnPWBE4skA/qP/rV+XCuz9bqkZLKqWy6erJrqGE1O0f2DVaudMnV+Rop4xkv\nBSgxpsNhkNDZ17N15YrsvjsHxdw6aPUMWmwYSAdaDi7fEhTiDnwPMx77jAuf\n3pu4VEEyI0oHkx4shrjm35jCO8TstfMRY0KWWRCeMXjRMhg0fypaOFCE5g8G\ntaz6DGwsB7zsX61XO2vzdnp6Q5fE9PEgIlJLzU+IuOeG2R9FSUl3eaQBcQGj\nRC7y\r\n=cd7Y\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo2Q0T7yu20/hK6JYPsETyATxTO+I6EUXARmzD7A+4FQIgYE26thvtDBQoleQORY9dPg50+G4+L0P3GkJGiQywhy0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.36_1607887560604_0.5966286528731755"},"_hasShrinkwrap":false},"0.0.1-nightly.37":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.37","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"316223528dac421e15171facb378f815853db03f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.37","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-nEGjxIISJTiv/VXPjDRYqqtAoTg+jsJD3LZmc5BMH1O1ClFD5FEaQ8juaHL5BXc4xvzqWgJdLwvTAWW/WF9mOA==","shasum":"c39fe9972984c5afb355002171b69ffeb254678b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.37.tgz","fileCount":341,"unpackedSize":5926102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2VZjCRA9TVsSAnZWagAAhgUQAIJ1hEQFXslfEX1zwDUE\n5AftQMUr33Hdo4bSWYujb7bOoaTH/mqjnh9H/NKLx3P8eUcMQTE+Ixia07+z\nLLmLPLn7zXGemEu+S5KkvKwDYIZhL2Ommy5edrgDfiKma3RXj4CjhEE2sMQC\nre9l1vOeySCXSlTAqhR1LYmS80bva74X5iG8bUQPcI/wCwFG3zh+7zQusl2L\nQQPqLFNUDJuNgcXoccbleJjkHpWcxpetHOVJMgXqJpFA6uj7Zuas4qpxYovy\nh1yDR+3YtpXlczCU+lhAxPR87KMWyC/5fk1d25Bw8EEB8tk9gB2iZ8TKxEj7\nzyUMWc2Q0VMfVIHsfUzZU4z1s02yXxigImzm8XGPRMqh7FFfz7eS08vPnwpV\n2Gh6oQajlY4t9bJeiERLt+AcUu+rYQYpD8wxfXb+JKcBNMq8yzTEM2p+ATjA\ny4v0HpPbleGsgnVjtEr0ZbQ9r+FGlDIkXeat8ozNKkiAkcQZyLcYGh4mQcii\nhcp35NdR3nbwIWUkS7TBWrcGJa8egYqc9WiF7YTvBzCOtHfxGAcy1cSEtBIQ\nCWmElPy9au+y1LbLt8ghcCP3arLkMqIuANK9JGOGpBfWqq1FalgMc90wVWnp\nR84WgFrOfE6THhvV32CXGvHOeg9tfWZQ0yBFT1NLZb4zPOf6xFRB2wtOBks6\nez6U\r\n=ZxWv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDYxenXFMIxa/1LfWnKHWIv6kzkdqtO591P0tZMu0sT1wIgClgh2mvWIenQdl063cz6aekSr/uk2xhdgd/JLLBXND8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.37_1608078946751_0.1842576554354638"},"_hasShrinkwrap":false},"0.0.1-nightly.38":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.38","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c67ae7cc48b328834a0936c70d6e3f8f760b0d12","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.38","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-vPLOe1rYeplHQdMfd6QneAMSPEEU+aSv9kuWuSRh8RLfRa/VTPAWUGZ5CJWXOSpaeC40R0z7WBHeL3qyMcwZ+Q==","shasum":"1fde875aa315dd8e8c852eefe101a3a0255f88fc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.38.tgz","fileCount":341,"unpackedSize":5926102,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf2WMhCRA9TVsSAnZWagAApxQP/iOGGuWZWArMEqGZgT49\nPDpRvqO06S9TcD1/2Q/WS9xMc5ke3pJns8fWdIJdP2yl58FtSdnGtedmu8zN\negFHq/VD/LN88tAzi39/snKu2isFSVdkcqE9hWnLoBiLvFnhq0F0d6701kau\n9syEXl3DejPv7CVUsosvZbzJNzuYLwvFUPx12dPbwaW2SahSxiACUDKa9zF+\nI+S+x0oRuFTmPpCdr3mPpkkr5Ytxuht63kAhog83yiVkFytPVKLiL3DbrNmH\nUJroo2g8x7RlPyhHc7qkoWLxYxRSQxZOMKiPt3hBoWsOcoOAn3C89oEgOvAb\nOiydGy6K0HWcD3jV4Sm3mOYKou+m+xo3ZRlzNNznvpA3zFOr/xgoZj0T/HNz\nBoNivHQkzZ7GqsnR2HS9F7GyDoHcYeTDddjabcpXimCYsoTW3j84z8J3MqXJ\nJe77/6WLAVHY7l/Sngm/YWTrGUT0CF9JurE3IYcpOPRwRs7iv6UIyvAFsx53\n14SvSbZElCnifD/f/mcIT0OK+HUKF7/NovMyryPAedbQAqhdjon/7izezi4v\ncMj57B/oN6OCFDl48ZESIEWF9ZPQ2mCgH0k1DC4uiqUw9l3iJyWvx3v+iBul\nMgpKeDWNfWMjWWVAqSFn/zWsJQ5Bv+iGLnY/SPqvtFVtHjd96DQScSuWn7vo\nzLEh\r\n=RDWG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeLek3fqOUPvafb+sj6jm/dPIQrT324OkRL5YD7w2LLgIhALeuEpJ0+NEUwEafaJPCmkNH5RuMJvlzzQ8XMTtXuExn"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.38_1608082208741_0.9988132368242768"},"_hasShrinkwrap":false},"0.0.1-nightly.39":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.39","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dc24825e8ebe43a28b5c88e0fb31811659147315","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.39","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Hxa2SPMin1xWxHTWosWbUWiXW6XMf/nw/BRkMkwGLFD2meiSXvWljXHGbpzqiXalNmIPmyBvrh5aA7Abb578+A==","shasum":"7dc114e47dc4845e9b9fe5383db25b9b7d3836ec","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.39.tgz","fileCount":342,"unpackedSize":5927865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3Db7CRA9TVsSAnZWagAA6yAQAI8upcqNUlmP5prLlfRh\nweYLNUrbOywmHwEJjDvsiyqlj0irlWXWsBRTt0ZHZIHG/njychCJ9dqnv9Sh\nv223kbnpqwtwyr5pbKbM/8ID0vg1agZT44/NLVJOl61JHdPlf5x+8vw0olkx\nYeSA3eIClFHaODifxxUrUfW002BrNO8nnLpDq3ft+48cAqEY1OutAdu0Y2tZ\ninsYQmY9ei2NC/8dCNGL/JyL77lZYxtJcYJrL5YO56E0IQJtWyLEktw0hrNy\n/6B930AqMmwAENsgoyL3kg/CctEvEiD+gK9t1aRhdreHQivRIrKM9tUmkqCn\ny+BzwjFvh+dCnbJhUQslOhC2vsVqMIp8cyfxDSCTiZnzQyewU2yza05LODcG\nReqm1dHpq2fE4YhuTjYKutUKiWsCtHv6ZciP4J5tqgSwPj0mI65WWNnOq1c3\n++W5llDmiC9XONQ2wEUrTUFpkIhDmPVJFwEk3b/e0NK3gMLj2dLGXIrz7z7K\npFtbnWSzrB47fhzpwVOvb8ugiwef/r+QN4r4160i4P5dmNMKQwqRWyaUIh5K\nNjM2A8toJQ7RxfSGEHEwMG3Q5Z8BQfaj2j6WD/NYfQp4BsQVEIBK/mzyu1yq\n788cC9SVnVByHABIWQbErfuFBMxO08pjvvaufawcOCZW3XY5f1LPo5+U6v8G\nMr1K\r\n=wZFX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCZS/VqKdpJnAwJyWq0XURTx1e8N/q3vrGOMJsNkKuvHgIhAKRng7b2cN0be/acOlbiW6bKIz/HBwap9Thn5x59B+E8"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.39_1608267515049_0.4840880159559071"},"_hasShrinkwrap":false},"0.0.1-nightly.40":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.40","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7b64dc81f7779c5c2cf94926f5c942311a1e12ed","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.40","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-2ZeI0Euz23avihvHEzLxqBnUu5d2wR5Og6vWsLJByvO5JkMcMCNnM392vyqc1jkAabTkE4K9a1s0osbj9l+hdw==","shasum":"0739c1831c7a5e501ed03195352045f6af1cef7f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.40.tgz","fileCount":342,"unpackedSize":5927865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf3TSuCRA9TVsSAnZWagAAlxcP/AigC0W5St5WoG3MLSMi\n2tPviQX8xlX0/yelqF3hihYtM9FsSmWcap2yzoDbjDndZ1vJxwLhhWB/uAuE\n3rfiAqBDmXt4mCKc8Gw8rnDg+PLox1jrqb5qnxIj+bKOWJ9+uuh7xVvbwDpY\npg6uCNd+sEXEHdEFPndXH1QxP5ojTvkSEuMjo4MShKlLONEGvwkF0/TDi8NO\nHvNR/kU+Pz4FWv8Y7t8lB06Pk9Qa0VmYfkWhFQBm53uEX9Gf4F0eq/yoZzzC\nI82+nHHdE51HVuA0xdk0lXiJq72wn0Ovc+6sVwIyBORQDnB+kGfKlWWdtlfe\nMo5vupoa4HrIW2j3R2nuiVLYv6/OiqOtd09X94L3Qe8KYvtvhQNCCrOYPBWB\nE8q/cNS14f44ELrrLlrFqsRM31qMQxLpiaQdzgCIuBJk4Q3hyzKTZ/D30Z/y\nQ6Sb3iqmt4x8yilvCF14dVYuEG9iB7+I/NlxJN7EMR91Vo0Pn470UDsJErHv\n9BlL6b5HwqVi3A1cT1nRsBc3sMAn6zA/t7X8hlFMgGme1J1gdBpsxJYa7mfs\nvvtNR+gIPquS5Mt8zJW9oCKiesqGJy/O82eawtMfG1Rou3f8ZobxRoys5Nar\n7A5UfdOuFPx1TUjCXN1n2ASzy64b+cjK0NbMBI3lGg8+2iQ4BJoryuEz3tM4\nY2zG\r\n=JVBu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDIXfqEdqtqFwe2CNXTN9tw182LakZ8BzSZYhf5OdoBpQIgH8ZqQLi2qKWwgswfvkKvYvsXmWuPbOs8vWZEEwu5b0A="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.40_1608332461327_0.07612909564584425"},"_hasShrinkwrap":false},"0.0.1-nightly.41":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.41","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"17a78c369a02038496a813dd82f2d38713070f07","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.41","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-4Doq0gCtJp6o+2GLC3Tfjg8DUDjzXQRaUnMCga/FtaldBi5qOMNTQxLCNo5o942gmFs2EVLAvS2NpyOtJ6u/yw==","shasum":"2ab7068fdab945d681203c3365314765584cc689","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.41.tgz","fileCount":342,"unpackedSize":5927865,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4UlCCRA9TVsSAnZWagAA10EP/iy8KYWuWwtpVo2hB4D6\nbHSm1HRuSrWe2/svCwURehuN2FCUtRXfPNb6YENWCZQIjo69kPqnYeljNfv1\n62OkOhPXdthQDy3/l2+c8eTI+1PqsPFBiW3kPut28+sVYxPrvOM+phyR2YmN\nY0IlkwfUJD2SS4Dagl9G0iTmzUi+G9qyoGvJytrlTUaiK/KEyRVLagfAzFbv\ndHp0f8Pbn6vUA97f5csxsgMvGYv/6Ml6jVviXOB0D7qqQl1ATCoCi3tqapJu\nTxQokpmc6utxhkoV764jOlZfFW9UV0ns3wnZAy1gDydiaiLSxXTKLYC8ZXkH\n/xrxQB96ER3KUz5xngJJJYlDJ5nYD46aQYskWeTC1QKhWTpaS/oPnrP9vFkg\ngtUqYuW9Qe5wnEB9LE0WWhQMDqS3N4JQmRHENxMraODfIABpH1+VA7Ej+9PE\nUg7CvATfMOblE1BhjlvAuycM1sjWrHb1K+lkcEbqF0H0JfD/7lvgg9rrNUhf\nFS8hSgcGepdtyaOYnTjkjZNaZTlPduSs9eSw27mE6eAaWaDcHNjTj+6rdsmt\nDbQDKop53LrUfihODKUj/hvFS3y+TRU7Fy3w1trO4dW59vvB3XYBbP8KKsht\nbsoAnYnwXRKECwUfgP00botsZOPdJq/EBF5CxLG1+6esbqhTRb59ur8L4Lf4\nTFk7\r\n=h7iG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEBR22iZFrzpPzt86MPQWC1chlyO2o8Nbm0u9mCQsTsuAiEA3LRJS4+fnt+gmUJahCSLtGM6DfReaZk5xDZhhFRNcjY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.41_1608599873601_0.7100619797567544"},"_hasShrinkwrap":false},"0.0.1-nightly.42":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.42","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a1c784b95b89f19b7ac43362b4b2eee46188a87d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.42","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Do2HvPWr3rEposcK2658Yfre6wnRyYNAPyBjCx3P46yElCA77SNlgTUaSVIusM6yZMJusVCyCuhdvh1o/3IFEQ==","shasum":"e9f968f1cd26b01b16803a77dd5e06e66b8b6943","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.42.tgz","fileCount":343,"unpackedSize":5928839,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4g4SCRA9TVsSAnZWagAAu8kP/RInVP09WO5gG0/npt9x\nyuUyTLJbRilvm5Jpsl4y8JY4NPkRFKkoGBXeVwOdUG8ca95QsGFPPys4wGrV\nMV59470BZ86LRFz7NNFezQjTemjXpiyrbUwpHzEVm7350Xr2PFGNLI1DXr5x\n5BpSnQNYzQ8V+u7vY+i+571PV5GFeWbzkWPGguR0KVBzLlUwwBWLPVJPujSF\n+4ua0k804z5ksv1AmETCKizGSe+na7CVZbw0EBTERBf60iNmZ4fOjH596cj5\nEiBUduUurFFyoh36bQL8dIOb3bj9MxK5+rSv3847L+lPdJesAsEt7J3X+faA\nZTYojjbpjw2fR9iRR0luuIGoMMuaj8vWt/n41omeR5VOCblTij7bjCym2d/s\no9KXX3ulcybnblNBhF60g73B8q3NkHWDJQh9kJf7+0QT/d0E2rZB5j28nM6c\nONOMCB2s2bckydJNcCdrySogJOGTnYEBsUKhGr9Jnu3sta+svR0pAz91fHh2\naSgbTMLDzGoHQKEW7vyB+fkc65YrYmgCIRduLkyIWQ9o/VmQtYM+sPCqQ+U6\ntrg1oamkOWjDV4KBESjLl5uL5caouvaYd14Hj4owh0EAehiUQ0/6pq9iCw0f\nXbZgD2DPZwycOMT5ByjLoK+fTXopnUm3g+7anUl7XlmOtvGg7i/EglO+375d\nfowp\r\n=/c33\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqoXSWOD52khKJ5TdeDE8rNB6iSh12Ctn3vsqh40/7igIgdNt+D80gbcAq67C2Z7qO9EMuVefRlsM49E0aI+7Ac1Q="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.42_1608650257744_0.21915266179857862"},"_hasShrinkwrap":false},"0.0.1-nightly.43":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.43","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d572e8ae358420577b5601ee20ba61eee8327306","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.43","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-nTtbKTEIx5t0RRMiPU+Sx0TCnrAx2kc7zK6PxzbP1R57tJjVlFOTWDZbUbaLIj58xutgdmD+UcTP6nwHH0WiHA==","shasum":"e1157f2e8bc8f8229585fa014351c51621fb3b32","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.43.tgz","fileCount":343,"unpackedSize":5928886,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4g/GCRA9TVsSAnZWagAAqTMP/jTtD5Javrzi+QIB3MPu\nlXbSI/E8uNRg/qrWjpdpkUkGWqx8PjvplqvupbtQsCoP8/bJCLUkIZiw1HSL\nF5u7dwKRpLyAWqS6CfA19pXyg9WhKzAKe1NkLYgAqzCavKZPTTY/+7wivUL6\n/950u9+5qVmJlMUe/8O0l9siT/wo3aqBb7k4Z6GR82uQ1LKUIDQvZcQgj4a7\nMEVGLtTmZ37DWYAQsff0ChDkxVezNLta9z7QoniJMdEGSAfQ/bqqaMMp1mT3\nmMyzk+VEfKR7y6E4k6mK6s8OD4ZffGWbYxMikMr1/IGvvuLPrkOxi2bip5dS\nFuw+D3udSWmi/RqvkiBPzIQhQa9XV7TR0jfANr4uwrnrvndkRBuBXlDV5Ocv\nIh7/rRDfbk6iDFBcLG7fhH0dGOeufEGTenTgs19rcA1mEpe0d8rCz4sDN4nv\nmOcDH2/27C4Yzvc2hnOH9g9h3MckOATeseq90Em8gPf6cozzENrrr80XI9Ng\nkHLcaA2gmYoHDOm+isDw1L25TtRpgWVz1GOkrkXXXV4hMqLUI+496ny5YTKp\nmpDp2dwnyHlpDBawYAc1VbeXzNnwwEXV3swX13zM/xg8u8BQ1q9NVz78m+so\nfT+u05iPgslePa7qz5HD+ERPq6USJoAYS/LhWb5KWejcwCXALKDLZKgPUv2w\nrmfc\r\n=dmC+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAhnasmUg7bljmPDS6J6S//fKWZW3gv6UBch7ZbQ9jZAiAzPZxlV3pzYj+OjcqmZLvkS1a6OOEPQWQs+BwE229y0Q=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.43_1608650693630_0.4268001369269687"},"_hasShrinkwrap":false},"0.0.1-nightly.44":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.44","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f72effaf055b531251b994e8f88af98d42cc56b2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.44","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-78+N+wefW6Nyzs4HWkr9bPPF5hiIMsErherTXZLtNP0Wz16rHyj8QZo3ZeOd+GG2HYLsr/zbcWQwcUyu4920Ng==","shasum":"72702caf43e6f67a2819fabfa31dc67ef3ebe9cb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.44.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4mbDCRA9TVsSAnZWagAAIJcP/1gt9s4+8c2eF/PFHG4Y\nU/TFaSPjJAzaGE7FX+kN8WG1IpSUIcVSf2KsTw1XmFZ59Bh7C6u7JGQqZqk2\nTrNmxr/8PvTholhSxKX7svipXesfL3tqeFgMvR2PQoDSAoCXXZst856cOehZ\nLrKgu7ho6Me+3hFqWfEIdL9H6pm16xe2u0+cMPs2SH+B3UByNeDpDVup9p8S\n6zOgdGWh1KptFvYxgs12ojDO4A52pbd97KSkCt/AwBkoxTLf92RacuVVP57U\nzZ5pVgb/5T/Td3jfw9nHbp4dQoZVEn+/LtmOIqOaGBhVHzasN0EtOGfoQwv+\nElgGthD21wS9tp1rv5wIsPiakXJMQYebGYTawnZYrtkADw0Ab6IFUIfoUQR4\nZfmGl2vp6zBgGN3JVqs6RJVAidZtUZHFRXTJkC9AL8+YH95JdE1gl5BjBtHV\nCD+gB5F+wugfTBk+CN6MvHKqOToRg6Xyct4Hk4QlCEePcGaleZr/9dX5pDoz\nTaWovhGJPr3R1hlMGQV6GsgFSNPl5P61s9UVB9u5TgoDpwtmLwd31uwBVvMd\nU5KfMLe8rDRm65cPii8J5E2s8jqTelUYSfhBFHThpT+Traj+Dw/9D1ElTYr9\nj/zxzm2kMgByhC3X2pLgLPn4Qd8wAQioeHn/0pe4cfRxLNre1/PtOB2a4aUG\n3YRN\r\n=XzFD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBNEHDYfH62Epcsf1//KMJp5W4u8zeU+F6cO79FxMCryAiEAp3aPiqiGEG+PEs7CJ16v+9o2YrsUir8WrU1ytibYWcA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.44_1608672962523_0.6182693213797352"},"_hasShrinkwrap":false},"0.0.1-nightly.45":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.45","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8073c48eaab4b46f35ae3ffdabcc08e53ff95b2e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.45","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-e4VyrzCPzr7oCbEvshDzBHaqZrmQXUPhGo+cf3HKEfKjTIFkTYybFjxrlDtXm6ZGZps/F6BnWV+I+vFEMDvAoA==","shasum":"225f885452c8579bdb6f483cbf1459c8535cde41","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.45.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4mrQCRA9TVsSAnZWagAAkB0QAJi9iEXfnppZoSl5ts5b\nhGxGOO8+mc6TKeh1+GMctysYspPTmM4gEvB0SS8NNW7/E2+KRd6B/Maok7VD\nKrd34+BEPBRrtTR7rLJigYK26qNW/rG7ePCFfwTGHgfJPw1ApgCFZi4qpAuY\nrkCj9mJvn9QuRFIyjr+rT+bxWfvTmzkmFU2wmKXIxfDLoGmBWhhyrqMxxwJN\nBjfUrj1lGd2ao8D2LrtOiQ3UmqwfDP2pAwM+OgfDSRLLgBBNfkA9pQfmkd/H\nRCvWruyYWZ6uYb3/xJ9O9lw7Mnv12F2cxucogE0TC6HoFKpqUX1GApRy8JG3\n22KsyxEll9S9FwhgH2xEd1bB064Dq0MDqUWy2b1CvGP19Omo3pWK+8lBDoZL\nJA/Hht/m5dw0E+p4ALz9jOdGE/hyWibmYq7k7zOvIKmaZcR/oq4wPJirlWzV\n00ltQoXeJwLIsBXlmshc3sT0aMLfkAfHhLzV11LzC49vqrk0UENzvqRSsXlH\nAfE8/SVRbr4FtXJ7xaWTWni9jF9bAlv5tczsuNnqvRNfzvJaJyUQR1R03ir6\nMeYWTg+R2LYujU0xOofsnAatvZ6i9UBgI8P0Epgb/FFpEqmLapSDws08cPrm\n8t+fmtqkDpxUd9cPTAYXqUNHM9h/KT0HhfbgPkdgXRe7FscoYS6QCNIhQxrw\n5Rdd\r\n=NzDp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCVVIQdxaJRwbjttAuev418BFncsZ9kAWS2AfpGV3kQtQIgJdVqwk3nHcA0fcVECkqrGlX/aqe9GTwrPlzywcmkvSs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.45_1608674000399_0.43176101160081304"},"_hasShrinkwrap":false},"0.0.1-nightly.46":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.46","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"597621cdf3a7a8291a38cfafe89030c83da000cb","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.46","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KwP+QoBYXXh1T5cwpvma31JjQSdwZmwJjhi3I7ZZdzx2ZVxWFKWx/STwdwErVMpcdcv2NhSLceQoyM7trVXDXA==","shasum":"be9687c77cba91ed2871ff370210cd30c3441bfe","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.46.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf4nYqCRA9TVsSAnZWagAAXKYQAI1k//HvTS0HHwk4E1Uj\nQtarq0JZvlxgRrtrMVj//6kQHEuTesObciZ/R0hTFjYkEWH8O9HyUqlCvOPM\n6LsHenzJs1uBXlNuOqBJx04Ns+qCrE3iErAB9GZh/jcILGU3QjkoO7S+KGMH\nTfNK5LFXO/i/TCB8k8pQvzXSpLIPWUNtwb8CeAXkWgp0qlwDsav8LK2ov974\nz8U5beeJszKVhUlf3sgNCRvDa92DfhXUId2cqAgReMLpkZDAj0AsPvTU+Lds\nrQU1GC0h4uSsAqJCihveaCb35rhsjxcYId4szSKqOXWVdQkeN4VRfKGMP197\ntbB1Rk2y2jzja+Up/IUra/UnLLLwYvKktjoLZBm9Usmp8qu7K6SoU5TI9tvX\nYeVMAGxAfqvzuqGLnybPOJklnbMmBqtF4unAlbgrIG9VqYmn+7G0df6OpCdG\nhzGuGBvoNfgpkDb3so1CLzFfPAJrobmprx81KFyyDdL/QUHc10aa6aGjS0eJ\nnLYieTU7Sxuh+/qlVqrbuu3VeDWplTyjlUeGm500V5hHsZC0y+cU77KF27VK\n05I+3iWEgaBGwHYrJUEg2z+lFnASkC3g262XebzUjAzVgo8SK23PxMaBGj27\n5j695vxJoLGOV+IzwX7Dt4URUI6hqEUS/4EuY5NWG304DnGPAp9IwfAP6p2W\noEhI\r\n=0+4g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGBVPhw1vbpDXGgeBa9E/FeNfItWjpPLbspMcWGcwJkfAiBR85EB0RCXR+qzf/HMwk6aK2WU/FBw38e9R2WNnoR58w=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.46_1608676905492_0.4063577343145228"},"_hasShrinkwrap":false},"0.0.1-nightly.47":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.47","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"13ac544ae839142d2f647c1d617bfc78e749cab6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.47","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-P4YVGOI8tHetwtvb5dL+5ey08hJGyDW/NUa5DIlrgodpAB5QG/e7JoliEF4wAA7EWNjeYEL/7w2eVvy0cABsOA==","shasum":"97d9913a8ddf2f232722f66e43c6271e64ba8de5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.47.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5PTBCRA9TVsSAnZWagAAPewP+wSoKCwxJtMVErbhi6Fx\nVHAqcKASsyEZUz4881HpagR8us3+YB2QaKpSEEDBavD+3c2n1aPglW5lcz4E\nJrmZLVOr0c5mHTyjNgLoJr5ZO9QiqakizmvAmyj8xrY1o+1SNP/K7fLHurjM\njeGKUB5Pu8Q4f+HxzvEAzywKogttr0VXyuUJEjhxlLy3yQQuNxof3QezlhIP\nZE4vkNi79nSZ8FzS2PQ2Jc+wLv8BUxn7EheMyLR1rlYVpNm385FPC16Q2JPr\n/OAVJ0aEPphpeglbOefZguGguT87h/h4D+9CIAR+uMYhwWZfqVRcQnP+kJ0U\nkfcOoTBiaUh5Ud4CBb8gnEfk013ubDIbldX8T4cC6C62nk86y8vbzq6c2qaE\nbz/mC24OjcuHaJdnPftVOtiEL9ckJsUgKOlvIS+YIMUOltUHrUllwDoRUCrN\nOxq/v/ovXtn2vsaXd9AIBGa1WOD5uBLI8Ny2iasWRQtdsRQDCMS1aAot+j+T\n9x7MKLiFsUsNzO3WBUnVEu4/N2SfiCwWpWFRyUoIPqXsadxP+5weyi6s/FuB\nP2jklpXelk0ibvnlDZ7ESXrVjne42P7mwvNvAuGSK8jtplN/TltBJE98JN7D\nUiGAEsXhiAPg+cugM9AOJa8Tn+gwON9zGbJR2K3+RA9N1keS21YP3Oq4ABsH\n+2rk\r\n=kfA9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDq1XDZ/f9+jb+glN4AJGCOAnmw/BSXf6tH6CYxELzqtwIhAKWcvh19M5QUz6D8s1wPLCrU9gUASm6pdjBZFqvJMgVq"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.47_1608840384716_0.08442055160533446"},"_hasShrinkwrap":false},"0.0.1-nightly.48":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.48","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1f9b000d93c621afeb9e8a35ab4e218b95ee58e9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.48","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-tc2AuooGCT2prCoknb94EmyLNlPXV3vpANRQWy3dEaVQGPO5ips0W0TyHRKKzdXgMVjw0wqIpQhypIJETmpAWQ==","shasum":"75cdefc515a2446efbacc6779d491c78c25a7fe3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.48.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5/EJCRA9TVsSAnZWagAAYr8P/1qRHG0mPEAIFm6olFFC\nz9Ta/BtZagOAnb+izES9xTq1TwdKv44/FTsP3rhdYUWRb3vO3h2w85nDl7iP\nB1vS/uWiH6iFH788lDejS30Rwm1nramxhrmQXFBxgFUwin460od90/K/Ewm5\nbEaM1MTvjIMxF1c9Zv3d37uWabYQx9YUscZv6oS4quZQwFq92QDyGkgoHyYl\nx4ATC8xv5YA27JZuXFgCV2KnoRGojngavizz0aTs9ZhtktyjndN6Y0Y0HpEY\nY1ITvu52qrwYEM7Uu1WdVBmxmlEOPdjQQaipnnIXkxR4LCTG3TJgWoO61dSB\nVbU3VKaoLkNRqwoBWTJvk7gN7B4OYSvCRrzXCerAtdJQCEgMuKNV2kiAhd9k\n8XuHcvFhKFWJ9VdAIJ8uaFGLwmNsQGUd9SPYNTvu1lbIi1j4SFSevs9Nx6TI\n8nj4y3yAEbgOUrdZmfdmZ4TMaFcodmLITOhyLR+IXMDfCZTGH7EW3jJ+HTUl\nYc//VAUZGq/DXn2wVIZZyX2wZJy/beTKxgPho50Ogyr1CDRHoGxAc72i7UOG\nf/91w8OEF6Xck4yktO++d2v8Qjg1gc2f7QUW67+Xy9X0wK1+U519VqHqhcmK\nwLEIxYP0JsmawIOSWcl3DSTQwvDW40+wzJWY/iiOM3ySnQtjIBbdbpLqQRFa\niqa2\r\n=G710\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCfCp0xLYztjX9TI4yP5caXdnNZGn2zqdlPPPcQej4kagIgbyRx2tj7UO5dDsi/yJcyp7+TG0VSMDoKT9BGy3PRE1g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.48_1609036040910_0.28686353867681835"},"_hasShrinkwrap":false},"0.0.1-nightly.49":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.49","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bbd2e8b527df74ec168ac1edc9f64df6cb677745","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.49","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-sCF7t8GT1Sf3S3A7p37x3c7niR++9it33g148P+jkovcs1Qep4xIxK+1lJTRtof72NiyW2BC5L5+OoWkzLfpRw==","shasum":"363c60e41fcbd56ee31353b0a43e25b5a21d5a9e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.49.tgz","fileCount":345,"unpackedSize":5931552,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf5/JICRA9TVsSAnZWagAAb3AQAJ/O+vweB64BPfiJBnAf\n36cz8n4ooRRXC4A9xNbvwbHmO3fjgTNSEmgD7tkGl5iRl2i699FeECbH/h8g\n3TOfDFUQZvXeVfWbZl8lhf3uZeX9QCsw5gAKJyP0k4V8I9PDAbwHjnkwDevE\nERGG+ewKT+usz/NH/NQ20j2s5TSnAciL0wIvsKdu8IxFOaffpl9vCj2S5oHc\nF1Gsn3fAw8poUuuOskzhsqaJRHkcK1s1IZKumLCF7J5PRroPHH87PEDHMa0z\nRVzMep4+C+y/3aoxQl5UTsnOY5fIbfh0NiFaF4p2SQEqw7xGQtTFxQVQnpXg\n3Id9Ih1dHOESBcL9GrmvQzUTq0f9oLNHmQxQpQqH5pgGwU3PthLZaW+fDFw3\n/QQqiolaWe4taI6oLhFQ1BjZhTSCER75WUeMPdi+EI4RpXQ80uNlcmxv6nPP\n9IpefkUYWWGnS7KHxpjHKS6B4UlbMrfWrr4fgWZ8yIWeWCKEMUNEWbEVn35I\nIbOXWk127KXT6loMbKGlfh13iYM9oJUB+SbIJBKzwHBzVbEhKE/WFihNkY3t\nZtDTGowx6Qp0mbBWx5OMDxDvogniZfGQ++/ecMIGBeX+MXCHofefFB8R27Wt\nWOd4QbmL3wto5TAk5pIONP6F1Rhjp/+8QgabYG2TSH+gOw3EeeGeMudYYoZq\nQJtO\r\n=iZzE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDg5rY60r3PA22BqtZqKrlI2eu8X4g+rR1+sZe5Gr1fHAiEArkeiZL2pBJdaVRcblWs4HS6Ev8RVewSp5Nm6RPQNOlo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.49_1609036360064_0.14051031781585088"},"_hasShrinkwrap":false},"0.0.1-nightly.50":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.50","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4ff84799d0284c013fae3384dd9979100e6cd2b5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.50","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-FLGKSTV+rYUbsA8SiBdANJZwEfVLUiqMAnXoTS0lhI3zkfIip9iqfR3E5bixiqRbQzCXYysn16CwLZe1Xp1xMA==","shasum":"abf4c067ceb5cc694232398e89874bf68d1fb6c0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.50.tgz","fileCount":345,"unpackedSize":5931119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf6AxRCRA9TVsSAnZWagAABdQP/Ap2vhqsjXFswiZ5apyz\nYNHVR3d/O4o/311//LvvWw0qHZ1ivjI88GdXVmbkaHchxf6m7BY8kduyf8gO\nm8utNLPIrBRZwCKHgJr4hSBJ9J4xXOPDBWQ/xD5t4UfFiz00LgBtxXlugzWG\nnH3Lc7wzX+ASqMNBXva9E3E0YAMWitjZRZ4XYyftJ8yAUgWFYg6uoX/6tX/f\ni9ZndRomZsJO76QTx5iJGrZeTyW5dgkLrPdzuv518jIjJa0jDy6F5kvNN7dR\nyiImFnHYLMUNAG7imxlI1npwElwrTTimakRnNI0iqr/stDsZwqtxAJ780u04\nmtEy8V2XYjDKZH49Gqi4yc4ZZx6cGFKABvuTWaScvYmDc1OJcj1VvgFzk9wg\nelErWhuL9ChK1Y8HnCTIXJaZy9UGmwgp5ZbJw1BJaYcYW+gmYLjJA2XPqgT+\nqQTlZMqm3zR2aL2kAg1N+AL/DXcvRWEHRfdIrsc+5wOvaxmt0Q4KoYe/2Nd0\nlhqUjj10MEvjlaAN4tox2r039I9kYXrYhO8VdAtV21Tcx8p2W0Z2J0MYnJdr\ndkAN1qEBM+Vgf8tPEKRbTNqHKdQK7/XC6pO6FI3sG8aAyAsc+9saD2zjz70i\nOI9Zpc0pCkH18ucgJK+2ny1Xqd5Xi8qgFPILHszKfhkDhv9rLDyrkdnuKCIe\no7jw\r\n=WpGG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICvB4mbWsnOLhlBBJ5nveZO+42lW/0IkLJO4Paa7ku1bAiEAj3UsJfcJ49iraZRogFA1sPVAQouni8G1dzwtRKij3aE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.50_1609043025227_0.13213000283831655"},"_hasShrinkwrap":false},"0.0.1-nightly.51":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.51","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d4338009a3ae7a729d9224dd7b803377a88f5c3e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.51","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-+wJaQdu1zp/PqFy10XEAb9Iq02hMkvCt+qLK0uiYO3ylEXKXDf+IOoYqo/ZAZkN40N2h9kG5jOBr+aj/S3Gp1A==","shasum":"8b0f128273cc831ceb236484cc0b993a53d9b37f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.51.tgz","fileCount":345,"unpackedSize":5931119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf7fVwCRA9TVsSAnZWagAAinAP/RylZl7IwbkVaBe6HHMs\nFUpe4Hi2d+Nm4Gqj3nGr5IQwD/GY5MOj6N1m3zNZYCr6I8k9tKbUIrOxAtiI\nsf1K/gMJ+kVURKYCfDOXgv+YkScv3Tf7WbPqFKRAOPFvYzOi53W3ZeEXHUl8\nSsWDT9iIO0rzh+TKmIdfBBAGgs+bwEPhATx4i41TSLNT6jVAB7Ff9hTvWRiK\ny43pE+vgkoddoLslXSAe2VvA8/A4iFIZLJ5w3eLdageuCCkk5GnAXICAuqgo\nQ+cs95lWxhm5ze/biWg8ftEfIFH642nLy+6wT0HTYxWkBLvccxGOhp4LoRaT\nTUmjMBkv+QCdxRuoQG1cSFZ5/948/nrWFXfo+9vAml6iF9c864kysIASlOfq\nTIcD4eAP2v+X0kW6HReVUGKlF53yC0tMuE+d0Sy6kLBsiZc3gL9RfYL6kmdk\nb+zOY2VR4HbW/IEq28TJ51WN0S2FjvcWJKDSs/ALr4ZZ+/yzNYc6UBsETY1X\nbOIoHzFFC/q0IbzuNZdvPP9OJPwVugoNfpurOU7yoWBXm8BbeFUPf4MvdVhg\n/EvaOXCSN19zgWUkSjh67uS2jGIqfwJ20A0zuKqloqC2MZxrnfbhHUgOT9XZ\nCAgbRrpvAlqdcSUIP2PMg1ZjfJM4SDKp/R1o6LVBTpZXWlE6KskRjpi2lMUb\nPKHW\r\n=dwUE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCdIAd/fcwIvGdILBp+hsBu/0rBl3WXzAm/dMLYRGztagIgUcB8fsujMVt41CmMceuxr9MWs5UjvxOZilFCSBETtIw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.51_1609430384103_0.10378937794637855"},"_hasShrinkwrap":false},"0.0.1-nightly.52":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.52","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2abf9ead23b4bdc5531f856e41d653f9e025f522","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.52","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-F/JmJ2omlxnNKz1jGBJVIWg3WeNIpgNa7FkzgsTCuaQi9X8HytW2lp57C1Frr27NgMXT/s1JUPFUCHLUBgPtPA==","shasum":"06ea14945998ba5917426df0a358f756d05df1f5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.52.tgz","fileCount":345,"unpackedSize":5931119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf73++CRA9TVsSAnZWagAAPtEQAJNLvnFCvkChFysNCan7\n4C7bZ322NMrvAIz8OcAvrDa0wJIAuSES54tkmO9wHIyyLDQMJ1K4TPa+vY6E\nWajb9jODqVWbzPGWxZwh0ucARH9E3TJSTV2HB/vIVPyeAAYLedwq5q/8En86\nxXyQehz7qePitg4+5O3KOusqneUtQaPF1FKOAd+/R49timoWKPtT2CTvmjFt\nmRn9W+XV1sGWTAhjKGW9d9zL3hKmJ6NXsXf+ndxrYRnqYj26235/Bx7PJZ6m\nMgfyw0mfFA4z8xZfs7kC2wt83eZCCY2P8SIN51Y0PK0VZ6Io/7dFg/Ea4agw\nVgtf9WaYgfECC8NEUerOZRMH6UD8z8cXKZ+7QZL9HMzt0eNS/qM2HLgJxCf5\nJ+sk//f6Hag2r/VaXQh255U1I9X6Xf4Q+7f68E/z1VnJyL59GQwmLHtLBJPi\nDN6FY8/F2pZK4wcdhIgm5piWwJowL0RuXIKJj5K3sa6nIB1V6m9WHph29A07\nWU8PRlWJ0TsMJW7+keUKWoWFreG32UYwXjmLi/erXwwau9eef8u6y8eUeRNb\npL9kQK9V9TsczM5faNMtSWcYxB8iEgynE4PuDGdufxBaxeMtwqkvcCzdDUsX\nD7efS5Dn83aE598CSqXkilUI1uMsahpgzJgkMd7o+vrTNibkA3BNmfLjdq5b\n5JO4\r\n=Vx6x\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDVfPlbNp5CQWIBPnpytJVyEORWuT1baUlRboKxn0HrYQIhAL5bMOpXoHL+e9SKXquiOYJFSsCMjsYaADZ0/+BTGlQA"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.52_1609531326155_0.9289260777366537"},"_hasShrinkwrap":false},"0.0.1-nightly.53":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.53","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a73b33bf8981146615094fc141330bc98a7f6cf4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.53","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KwiH+nk7e8H+h2GwU1Rfs5eGvkn/n5Eg7/GAF94wyteNEpMkrUYR9NZoCagTMpCgcGLOdyTYKSqW77ppv+v4mw==","shasum":"0dc222f63de0723eee1123fc936b102c4b0b4229","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.53.tgz","fileCount":345,"unpackedSize":5931119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf86dACRA9TVsSAnZWagAA5VoP/ix6CPkmG+oHuyobn10/\nnPMEKVOQAAThSuramkBQParvwb9MSzCYo+AzzpQZHIepPZb1c5d0FcZiUfFe\nP+P0ypRATudxjsuMDbZut1t/dlg8h8BE+c6QK1CVEo+8TkpqJvsNNWj/4Ffu\nTLb5f8rZJFh+lCKigUrssF9BZmACFyx3zOYDUN2op6KYl1u3LCrgeO712z5A\nuAat3phfzqTCJTHMAhh1AcMqat6R9rMX8qioyV0TGDzv2lozzzAMBF4m0UcV\nQwTSoIxkwGnAjlA71vjjJnn37nq+T6+dkF5/FkySeahjgj7m6B4T2HBScx/C\nL865dWYjrD4cOgMY7BhgvYN7GRc0x1x+9aMP0ZBT3CymAZhxehVDGelc7wZI\nEIcZcmjfcheyfhQxi/cuh13RME4Jq6Ctn1PHj1Stc/G51gOIEYzEljPfcjfc\nsqThZJS6Js7Q86DlLbA+4L4RnK5FbIUExAw9zICMwd5aUE+yJIOBM050ZJtw\nmTN6oQmZmXalnVT9+Xx8ZMXGJY/mi4VyTtiF0zeZdL+sRDOW1wXElClNSHqK\nnBq1CIMqQAWzdvvZwm7y8qI450rc/S1F9y8/GLJXjHCsY47xui2CQ6qZzUBa\n/oRPgs/5BWm1fJWOEMZgfLZMxwAjkyUE3FTfjet0I0B+WTQHFeOs/oJIP1vf\nSazE\r\n=ucGQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEez4E5flIE0V0VK2s6P6U8CpiMT1DARcie96I+/HvE2AiEAgagWmSBYGQhuvVi6xwEl7CeTQhOv3C3Twv7WQiVO4h4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.53_1609803583353_0.5901622251527159"},"_hasShrinkwrap":false},"0.0.1-nightly.54":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.54","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ccdf4801b03c29376db3e7c2ebab1ae740671b3a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.54","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Mmtxl2sT8IMWc+XhQW9d7XJhoISe0Fhwo3keMv8NwqsVZCvmT4OYLsxut4/uLioeDZJSaEuVdZRNwHCVw8t11g==","shasum":"86465dfb598f057115e0808bcca236b5d6e09b82","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.54.tgz","fileCount":345,"unpackedSize":5931119,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf893uCRA9TVsSAnZWagAAeFMP/3ouNL14yJsPMin3IuqR\nNigZlD/yoAmGeZqWqrZrYrzv0T3Aap4gdZUzEzX7+2ApnZVnm2HR/I2lu+5I\nnnsy4290CoNqaZWccUaGvfjgl3eiac9I5h0vKn+xL5KN11Wm4HfVC/TsHjiH\nu8rblfFQTdeHDnggQNol062LDGvkIwRA9y8Ron5+1QVrXMnSgb7TO9YrKKJy\nd+Rv8kHWi/BVJ6ajMPB0Ged5gEFGPmu9VxRJKGVr4WR90VSLPbCutojRSH1a\nd6CdvB9RpSQblFB+8zVDeFdzqymHyjwKD4huhweQgqxbXdRfHHgke7D0RF4u\n8PBZyNH7BOLgr2F98JDWQyQzE0zybTjDzK23YF29VbL02CpfJV3tvg4HX9BU\ni2h42hh2Nz/ZhX6xSnZMHU7Wf6KFCzx+kr5k8fr4xTG81ZtHFp4X/oPscjAL\nSed6210BNO/IaPAqOjRcs08aJUW61dhX35hGdPZymTy4ijCgblMcXI3dcFTt\nnKwUur/VED2lScfq83K+lvCkeCMTzvXEN6EJyEyG1zvZ1JBe5CQy1/LIt9cX\nK5G62rjEsGGOUuvE3zMtgqs9rMZf4nhPJWAtI5qII1u5SzojVghf3XwGdVUO\n/4bza8exLbQb6SA5/6HtqdqJSv5YGWJnXn/KcUO0JpkFok+q6QcIAcdvE9c6\nUrnW\r\n=dThk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD0D6BrsXEo8KfIGNbFUns6SvjIaTDw65AfJgxfI4QaJQIhAN7Ru/Yd4RQPVeret9DvkEnRVQqBL/nV9P9PHB8OPTeD"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.54_1609817581839_0.6134896941384991"},"_hasShrinkwrap":false},"0.0.1-nightly.55":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.55","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0b74e50b6510ea004945295dc9323b1d4d593a3d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.55","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-stt/Mj4qO0p37CdqDw/IU0PWyyiQEA0JrIj6UNAUZvu5ZYZMseerkabKuG/DHJ/5NXl6jumPux3TqmzUHHtxaw==","shasum":"777602d1c69b29612998e8400ac904d2d6286c75","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.55.tgz","fileCount":380,"unpackedSize":6023492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf899ACRA9TVsSAnZWagAAl0MP/RIn18NUWlYcUuPWZZuT\nBXrtUHuU1BA6ss6PTcHRCggHX1MsDxFj69ttF02C+Pm1tD9ZAe40bx/mWiAn\nea62vefpXH6HaiZXVgSzmMy25JAo9Tsi9YgbaKdFyuif5JLp3UrOslPjf5Wz\ntAkTSPer+Ko0ddfXSFPWXOJlZLX1JWkWzYvcGjhrN6at3PoNKm7PR0lCf212\n2AeifKTDlWHPBnJScg0EpwCYSW76U/HiWzwy1Sk1FR9LSLYBqWhzRoouPJ2M\n7g+tvSI18z2qtIkf1ipn6EUOqHzmbYB1iFWf6aZ6mVJ+I1UPiMWbJXDnSbLz\n53DfdQbLrFzyOXi8Z4imThRBp+XFWKjpMZjik2lSgzMkX9CVKEh6MhWWXL2V\nCQhCMhXBHmopAF3pTjPPmDvKdm/FuAdbjZiGPNxmS4inRLkCUoffJallsjt7\nit66c4TAKGn0svkx/OSgOtOUFNuqTsVjuTHrYPD+F1YZdQ4arML52iT7GphB\n6WZ/jahnwl3JKIAFb5JVN6Muw/zvidMhq841iG1v9qysPDzaEam+pYUCaCde\nFYpZvWyhs33CyqaYuYRAZDqHWYr7hZ+ghOUzZxeUoXh3qGKYnaW1AgGwfPdW\nd/B+6vqEXofAmuu/ysOuZOR2x6MV/5Ko0Tv0Hfr+X0hiAuoYF6sQb9bhtWkc\nWoUw\r\n=LJk2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCYFsXOABuMVhBJ4WQptTQa7rYUGzVrqjfF3PjgWlj1qwIhAIbX075gaUasEkRarCt5K7uY6ZQGF8e3QdhNFV05M4NJ"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.55_1609817919834_0.43443940564952754"},"_hasShrinkwrap":false},"0.0.1-nightly.56":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.56","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ea977d9a0314d971c5cef99976be11ec687d12a8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.56","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-yA3EaA+byw++RentTn+4BqXhylKqPE9QHsA9X6lWhGoSj0qSeJb9j4XVaqD+Y2yweRHT8u0FC/RUJlXDW492uw==","shasum":"4034a73814a7cc5f2a079ee22c7e673b980efe03","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.56.tgz","fileCount":380,"unpackedSize":6023492,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8+DqCRA9TVsSAnZWagAA2/0P/jzROA4Iqlob3WU+Fg7s\nv2MJRoDFNtmGkOvoCXgLCx0zCLmbC1XGrg8yX6G+krddjFDhfkB0fp2IfA+s\nDRtCoJXU59t7Qwjipn2yFP/DW5/BomUdUlq10vXIrPKTFnbY0H1cYRpSYolm\n89raTNbSw5/nclfF9srUx5bXHdlb0kpOvATSzkq76je0HAgHA8CzIlJ11Ufi\nsjkQ/0xYM9da5Sn8unpnafmsre/x9cBG+T6tngQSA6XZPlkhdP6GS6vydumX\nhx3TYQ9aAigVDrXm9QHlUR+cVZ2WoRQhnQgczDWnjG+qSaWKoSSCTqd0uLVA\nF3kVz5H8iGtj5Dxqwu6mSUAlxbfQ9pcxfxsJw1a+rrjfk21fwpW2vnQcieTk\nc+x4ZLI0FKEdjAf0EOqPdm5Agm/YQaItD0UcLHwPsD3x5fp3DVv5o0xIE7F/\nhBsyS+ynoDsr+OIS9J76P4Y5eziVYI+WL8aFFoIiBWtX9qRMk7Z4wUKYEYZZ\n/2ncnk+oF5UTtRQMnbxrJIVR252B560Ei6lFpJXCYANGjbQ1vOZfUnrv5sue\nFYAmT4eiu1MQHV9NW08yONvJQSJVUsJtOAkVvTwhV1hpxYHoydthMQDjtsmy\nIuBkLpZH4uo0dgb7/9Z8DvsKShcBlCSSwYIYpVVe15ASs7j/vIa8qM2zaZHt\nkRas\r\n=CxuD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkIkOnwGVv6kIb5JVBbg6z8OwMSx21TD/4p7UZ3sztmwIgesQAsheh/FS5ZoznccUlj8lu2ZdZB65VnkRxRA952Mc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.56_1609818346020_0.34592617385819224"},"_hasShrinkwrap":false},"0.0.1-nightly.57":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.57","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"68dea5b8362ecd63e0629566cdd9574963659ee3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.57","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KshVwn+zYbgrcNy7/+rIWYIXWHI/uQICvxO547P6KRvjvQtIOxzJHCe0nqjNNBJHZYq6nfiqtYdBKs7/GcXhjA==","shasum":"836b90fd37a5a0b9f8222d6c3780145f7612f410","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.57.tgz","fileCount":381,"unpackedSize":6023559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8+HpCRA9TVsSAnZWagAAIi4P+gO09jHTmgFfppbJWTJa\nZR0SBppm90O3sYx2b4nYcqmj/3Dz6M4x0VVbVFJT+X9GPRePkyzugCeCzUy+\nCeVgWKDWF6PYEWOovixkVkVZoYyZh3IOx8P3g/wkd2Oi/4ShxIp1YQrJG6f+\nIwkmGIEZsAXeNLk/QWPlMByj4Xe00ND4+rYbKUw/jO0+VS1VNvmQWg+23G/y\nHLCQWV5BfznTIqIdhSunpCL9KE1eQ21c44szCMpvuAIz+6MCWg9MNXZNaOwg\n7Y51mwIx9K0Ru/CvUfI6iEwoanaSaAGnhBJ4mHYtrcw7QAtlB0fBLEvX9wOY\n7y1/IyZYwJI9FoOPZgNssxmoQiWBD7j75RF4OPnvq+YIpmfKMZfs8n68fZ6g\nUFCWknUbD8kqMp/hASbPvYOgJ3w+OYDK+wejEKctAYRMvycUSlJRrbNnr/+N\n4bvYL5fgbxXSBEbE+DVCFIZrkKoCmNUCJ3AiA7psSoIc5ig9Vyxwz2Wty5MH\n3ATQ42+ywzUGbiySIdioUU/vYCtISJS87aakQx53nUVPGlkJXPPxXR5vIJfe\nqSAg1IeHco2OvzN/hQoTzs0zEe6fuM41sLJs216C1KqDHFpuudzAdYE2N5I0\nP+vjHTdZ+si8M6bOAmnqc92jvLOC4Ap6IzqsqxoLGjwTaPk1zr6NCfafg3KI\nEb4V\r\n=zgXb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDr8/LR4AgQo1pU3AQnouwMWiS9SNsfGy45Gz2wp03+QwIgd+7k8qIVdnzGQ4r9tRRoQf/fwOCwpbLRPplNEELGhkE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.57_1609818600883_0.3222175367041735"},"_hasShrinkwrap":false},"0.0.1-nightly.58":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.58","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.20","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2830a2589aceb67d4834e3de0b0a556b489b4c9f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.58","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-KE5xQ4HcOWbKYabPJcityaazdm34GONjeFxrHCE3gqR7rHa7vqM0Iqy/AzQ642/dAEYcCzs35oUSZBvQF7FvlA==","shasum":"9ffea6b26b8cc4a2319fbfc8f2406c999650a09c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.58.tgz","fileCount":381,"unpackedSize":6023559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf8+JcCRA9TVsSAnZWagAA3PIQAJnyqlztyEUS17uy13uo\nTCSPpb3TfxsY2DlplCk5fpDnCHLVGZd+o0F0JuB8XqYq+IKTY516MfAlHj8x\nPQgabm9Uo02Jipr86punho/7T72DGq+BX5z98txj8g0d6CY1Is3vOqFEMBNn\n7micltwi9ANpvFIhJw3dhT0rEz56281C50JzwudphJ27nxOnyKx9f1FCajHX\nFt+F4kjnMcnlMfkWZYmlvY8RuTMW/4HP4XTGdb+WRY8oi+tOpPM/BciIAR7N\nT7eeDVqJIUMQcDDt37OPhwObJh6tYFtYWTx+tYLX0pITGQ3Wa4hB6eECC/5M\nuUpeyNoq8ss12NuQ4LWhuYhNRXCGnWfdVOXbv38tr4feWNLx0yQ7Dg6wRPXI\nhjB7GN/AAvv5WcqYvc943Nfk1Sp3A1XJ3VjFP6c2pjfxFrGgKMqoUIzbgM8L\nn5RpjzlHws/Oj5WpTJMORQBr4LzPV2T7ik9sl3HxzMYXgYW21woDWcL8mgUC\nyFHvvZ5inUiEqROr7vsxWlAOyfnJHSgZIALnuF+oOu31LSJlWV1UhZkgTlwh\nt3eqIsoC6H8AfqhZMdPVEpZETGbd60DqtxBmPbj58iDvxKbJoDSh7cSCy99r\n5OJ6/28dgjlen+hc1wtiT6VTFqpykWN5IOrKyKXnbopGa281QZzAW9y4oxjE\ntwcy\r\n=Hwd2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN/Y0MdZ2FW49VZtnZNmGOiIatdq/oSKaRbhUDDsnBKQIgMnR7uK0+nng+O3Y2dIsJHfix+hys6YcUNeeFRXZ8UaI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.58_1609818716056_0.6344717276162295"},"_hasShrinkwrap":false},"0.0.1-nightly.59":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.59","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6b1991edfd0a2644b1b1fd9b89179e05f8ff9f42","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.59","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-FlBPdRvZoGOuKxWgw2MryAhHkgbPbyJgWlBiXt/CUuoPwcExNNANE+8era/AzBe69OId1gq8P2YioH/+1NpN7g==","shasum":"672721bb404b457963a4b8452fd936b77292dc8d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.59.tgz","fileCount":381,"unpackedSize":6023559,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf996OCRA9TVsSAnZWagAAJ48P/2mIXP66c98SxVksHROL\nwMN8yOLC0Ay25nPfwxVUQshPZnKumnMGV58d23eg4D0vyadz7wUA/AcZXegr\nFJHrRlURtYPkaOBGP/hg4Jd8iQqr9Z2bflCI0nzVtpmk1ZKJdKhm6wDHdvF7\n/nDFjFLC9O3lM5W/0pdm9qJBs+6SwSMUbbScYIDAdy34yf9ufBVLb1yogu27\nz0HwyTC1PvTRD2qvwfcayEoqsro4WjsYTu4dwU4sV05JZ2CBvVdBl4AjKHST\nsA0ru1z+jBs7kPr8SeCoqWr7uMnBzX80cWlpP5fWFa6Y9PjMPTVOHsq3qaaI\neEyKmvNlkyEL2YzxcwB2l4vGneIreGQLNa47s/83ULNqdftaZPnAxW7UIoSe\nGhtQ9SAKDqwwFOeO+MKW1hBg7w6jlSeSJ2BJ0utnEYBLdsnXpNx1jAP8VIoa\n4TudDJM36am0TSv/4b376zaOcshA5OCcVAhcnMefXonLwRmbQ1qPqUZ+AJ/K\nvuUI+OwI+ex8YHCxGFmP0FKlERoiilI+G8vHOvjiNHbNRqueJu5zi8v/pcT+\n/3tbytATnJg56cj2iQENrP01jRzkngcpXyO8PTJyHmhNiSPZoM1irAszKRBj\nG2vrwprb/1/z/GG9fgIVQXUUtYJuMVNTx6QV1NqrbjJrkL+yrrKdc8DCOPe6\nm2te\r\n=1ZnF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD5bgp0XkvKcbsDvcduBRY3xUwESLECTixSrAzNXZTPKAIgD7HJgdU0jPFMuG0ypMQxIMYoM0bapUyV6gjH3hl3dWE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.59_1610079885533_0.4203906122865624"},"_hasShrinkwrap":false},"0.0.1-nightly.60":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.60","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"64883a6e3ead19b5d2c83f6b706da886ac0cfb7d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.60","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-RFp1AED9ktPFQ2I5JJTCpy+2vzLI7SHBku21LpINNbTi2RnEFgHz60HST3CBzIVM7CRGzFmvGBYABdA5EGFU7A==","shasum":"173a5b08a5f90b7233d017e552ae7d520d7ee81b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.60.tgz","fileCount":381,"unpackedSize":6023919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+S8XCRA9TVsSAnZWagAA178P/2rGYMwAbmzswQpcLJhh\nJsD30Q+w4V+7zpHw/z5xd1tMiwCB6KdBXtlO4dhunHJc2cuSMXz6F13+u455\nYmVbbdlJ27/XASrgVzH7idzdFyxZz0bbTNtOWRzf3Jw17l+hxQVtxOEm3Z6+\nLGM3BH6bTEh+IPnT5S42M2NNFnfw4Q+7Y7vOn/TW15MCVupxox+5eMfzqHCP\nOhJymoi4KLM2OQ967wqYHbUb1VloIq4AwTV5KIMeZJNb3HN8PmaIUq+1h6f/\nAZX0YZzHYtsZhosM8qgJQx7d+o3C9MuUAEXIE2oTe2BhRrE3so9V//QnzNl4\nWCW+wSDuuDf7ie6EeTQIbshhzN873sccMgZ0OswBlWKu1Hi0AfEfqTfKiSxU\nlcZYJl/F5XoCIvZuuLMAxtNhyorYbxwQeKj68ZfqEKB78WnPqSCltqyHajaQ\nPsjo0nHoBnsk/vYzM2SiW0dBsCasGgqtF/ez+FTPzIXcEJvEI5BGLk/t0JOY\n5gpQ3s12tFMnovEXTnm+j+l3oSaIIiPPfiWdKIgal+YO00/G7+uCJr3TTIBh\n8ck7pF9GFveBUdm0k//JvO20SimCB4PLVPPCBxt6DFFytjLwr1H8D6OZQ8JC\n8jAkxXh4pWA2bfHtWmzy9xf3vwSIEucrihjhAmtNU/hL2svPLmdK/T+DX/PR\nbGQD\r\n=rfXq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDncVLzBGcg+lIqw4cmFsVvMuC1eBcEWVLZKxq26J88AgIhALk3eG6c2s+P2q3fwVLFI2ioZ9NEovqVzw2GJWyTLNMD"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.60_1610166039133_0.39863802441471785"},"_hasShrinkwrap":false},"0.0.1-nightly.61":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.61","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"07e6559debbbe25b15eeab7189fd7177d43e6839","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.61","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-UGAyPzSgFF2feTiBznTxHpqzz8iwx3yMhOS59HXVMV2n7ehYcTDRvcgqg9fx73tMUXLA1uwxlgGBKNa6QzwoZg==","shasum":"d5b9aa842da3921186836cb039e62901a437bc30","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.61.tgz","fileCount":381,"unpackedSize":6023919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+S+OCRA9TVsSAnZWagAAuccP/R8UKi0/A+dKBjzD89BB\nakIa6biPzoqvfDDfT2G55iSD3FJeYx5qIPoClju/qRB6BQgGGbDiTsjZXI2V\nknZwVSXLoCrsWQiS6AZe9ew30lR8WRbO9XQYmkLm0a6TOCypChraKGIDYQFC\nAXiBQbSvzTZ1a/YkxEXLsUhCYsnq64GTW1vhU57HZT4O0MhpN7HRsZpFS1FD\nL93Lb3hzQ2MHxFnCDDRP0VbR9jkWyIVDt6QB+meEQrU9+qXYCBhwFHQcq9nA\nyaMVGPXJG3vikchPwe2sWbuDWs94mHsqKpnlm3S0bL7JPENphU8IRDKpuk/G\nW/3p9Fndr7WdX/KoFGng/AeS1SIN/HPjrCaIaxtRN6deU2u6iUm4GpjNUhg7\nfOiRwqDJ3h7bx7u8yVFfpKuuah9VCSeLhrI7J4NK+moHpq6xnoyi3pmrCkPV\nHuvjklZle8CxUMFfS8FkLtsKSUownbD1SwanOO+84OBWbCjXKLx5DbnCdOZ7\nxCNQxc6aS70H+aQ3flzaYvYziAPvA66scn5O9C8WdKLHQEe4JV0/OaTZo09B\n+IB5AbENyS3fpr4rgGTVkBouL42QSBqL40ELhyOFWaz6nwD64cD8nAKLt7n2\nAA74RX54fXnPlulNh+a4egnkv8Af+hWtWqqClPrJ+O365cTALXC5DMpAS2uq\nCyLT\r\n=mZuc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCbHeOgDXfWEb7ykgQVHJKzJnpyGPbJrbI3pvKQauOSpAIhAN5X/IgHJZ4lVGOXO7F6uRVJDUWAtl3FLAb+PmYn7q0a"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.61_1610166157516_0.45208340748459097"},"_hasShrinkwrap":false},"0.0.1-nightly.62":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.62","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c3df913771f15b3dfe01420318ada2f9f726446e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.62","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-6zf8t2lgck1EyzFqgBGkjyjP4GsadCcDoYCl4v4Hf0sfaCNcDgYEgJUdf/laKqW7cYesH4g9Y/+dSJUUZ//uWQ==","shasum":"9e013f99323dc05aa99b745dfc711395cb2577a9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.62.tgz","fileCount":381,"unpackedSize":6023919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+TSaCRA9TVsSAnZWagAAqG4P/i2+n3k69MqgNWa0OwbX\nKBf1EOGF0YIBy6t+6FIGzi6qjGDLhFCa6MnrAc2sdsBjrAPiEQppnli545H/\n7SiI+2dXyOJ7ftyDIAVrhxsFcGBVe4IiMAsanJeDhcy9/gRmrsVUEsT2u8UU\nhNjp3tjT2f1vb3L228oFGgyyFOYL8DGqNOtw2POMXLUmWt0QiYH4FlVZvyWy\n1Psuo2TshIt/GUJZRqltO0bErvhlVQ12/s0ueLUomMM+5B/L/52n6/wtp5G0\ntrIncSqI1coot/USEwoeu8k111Vd/ibi4QD476+75Tm+PgOJ+aXroIWM/O4z\nYFvu+NFPIvGMn0veyoMoVafR4iDpeodGq+y6qLQz6gywzGzVGf2yhnu+2lL8\n3Ah/oCnloopOqMytmMRgxXppw/9sW6k3rBLxB02TKnyfJA3KZKY9BG0fTqBR\nBmIxLLTtv9WIQpg6JlmZdnmruV5iS+nDVz/KTV0o5TgG98Grtte/dkWuaAr+\nfu8LWn4eOR7PtwJ5b74wJnVf3A7nc9ZS3fJFdBREh/wldVPRmLIu5y5Go56y\nGLRsXxm05ieZjt7VHATpen9KemW9ou6tOPXtdI+hAjIAgQBqQtOOPv0wjhPH\n03DPzvsU96N9ChkWLy3swjvlvJlmkeLlfkDZuSrlMtFXDwzOYiJEk+QDRF/p\nX7Hd\r\n=2+Hy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4sl+Ru5gH1o02u46LtOw2WXtI3qu1opWWDeitx/V3GAIhAJPB6GnWcnSUeDSCrSaQqPsR5ytw9jDvcA5eezYhPIhQ"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.62_1610167449554_0.1352356656406628"},"_hasShrinkwrap":false},"0.0.1-nightly.63":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.63","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"18b78dc85e3ba76c7071c9269e9d40ae396e0a71","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.63","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-Z0PfRZAqvP9SBauJy4ckS2fzyH3quAZ2nXgTeZ2u6XWwKhBU+TEwKZkup4G0EpDcEJhdg4FzJoHYOayhL+oXsw==","shasum":"684102c72d441993e5b2ad4e63ab099b6bc4f1f2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.63.tgz","fileCount":381,"unpackedSize":6027567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+xLkCRA9TVsSAnZWagAALykP+QAuUy2niX6RONHdcCOC\nax5VR+Uu2RQgk1mCTN5+xNEwEnv2MB0sQxLSyE8sJCflfiKejXXEc2CCPr4+\nHiSgDMTNOpYQUYEDfAhhdPWNeh7o4A4yLlI7Bpe5D7JJV9vFukYeCvN+1DYD\n9aG8bz5gVExMiEnWFvkzkUYwUN+9PHEPN1sIbwjeTrB7TPxMmWRR1FBLSyXB\nVE5mZ74vmFZ2jiE6cJsmWrShMhB3+NlAXbaOZKRjDvo5w8fj50QmVZo9pwBm\nzDzL4sYbnOaFNO4C8+pwEZZ1xc4mM7ERJa5/6AkXRfoECeqtur36tU+pP3Jc\n5Ab+pKGMkt7mPHaCMuruD8zF0Uu9dSGa77eRtA45YshxjFxZnQjMaKx1Ucm9\nxfgjxrHBVehkfeqoLi4Zll2+cFEbu6HIndudMbjqqGixoED62ghj0VSt8yoe\nEiVH0B/urMPL8fsGANjklCo7COM/MfGxQ69EJO2jQhRFjVeaZrThZZYsGtcA\nsI3uh9Sd9UVOtzJN7yS8LADBWf4R4bURSVoVao1BGoxqDDEY92JFicGUKenB\n7KhHSZMl9Ah2zj6bJ7bIdyrvK3ZtptPc1z4IU2bP2xnLrl91xbNn9R/KZYvZ\n+lSG8JaddyNE6oq9YGGcnD35dXdRomyXqxukHCCm/5E9dviLOCsFiRuqsK17\nBzf8\r\n=dkip\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBP9ifvcEjyvlRt+bmqylqfoRUrsZ7ACblXFP72UAXApAiEAw5RPQqBbUrk83FWzHCvkHNkQ9GH6nujumgkvgJa8eZI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.63_1610289891666_0.22695603935636033"},"_hasShrinkwrap":false},"0.0.1-nightly.64":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.64","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f8ab09519513d9745de76d6471822d882494b6db","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.64","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-UGCFpQSMcG2hj9EdKY8SW0p+vS+86d4RVeGHtnRA3RDlhJl9ZrgWUHQBkJmOc8rR3AGzNEl1yotuArq7FnmNxQ==","shasum":"6dcb5ff147e55b093c241f0afead45e4c8d35350","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.64.tgz","fileCount":381,"unpackedSize":6027567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+yOICRA9TVsSAnZWagAA/DUP/2S3YTyacvxjpSsAN5wL\n8fmLMsUwh4qwgQiqvjJ5rDhPGQnF8bU8KAJMHz6GDAehDYRtCNl7C612Fgu+\nohu3UohSXiPyDofuHkJ71ZS1BaF4yNdvVOhAZ0d8GO4JPZ8PQ26low1t4U7k\n7IifN4DwEFvHVyhvfW2csD4u18O0GvxNbMRvT2HK3EniUDtRhY8qmIp7vqQ3\nbnZL8GrWKZxNnBdxaONQtUtkldtaeXW5GAvkv2oLNA9lbL3Yln82DiHgbd3Q\ntjZCjXomRPYUgFiKU2wyr51u8dM+qg9ZyU3+uGgY14dYNV+KyNNWQdxF8Alv\n6otd9kQig3shKWZmJLC7vp7oLqt8nI8NkK5CsxRCMd6i3TQ1KndO84dzoU+W\nQN+smM9xxsZo8mBovKgMQ7ECoAKMXnfpu1kXULQUxbRiKFL4Unfbn1tlitxn\ndU5A9LtbCuCJTJ9XboQaCky2Lp+SJ2+v2kpXwZ2CzrQScdE10KzfwMV4rkR0\nJbNbwqqjv3PrZsOZKf2/7fH0A0PwMhoCQqqDQiHrRuz3ZDGCqfPBEm3D70SE\n3Hq1G9T+A8z2OaTGnfM1DKrzFx1fsBj592sq9swJX9B+vc6aZIGD2YcMB+ty\nNcvYC6UGjPMXG5tYvb3BamTbunMoWV+1jsfvBF8D7MiQvg0OVOJ5IhdImIf7\nbXfx\r\n=Ib2w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoRWPZwRLaKIvNctfCa/NTtqIxHcaZf6/ONZvJZD0z1AiEAoypf/id63rehv7XSoy4uKXnTd8UbUfpZl5jNU4Vy37g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.64_1610294152148_0.0787360785846054"},"_hasShrinkwrap":false},"0.0.1-nightly.65":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.65","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"08d005920aa9abb2a98557ab629673d22ae23c1f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.65","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-R2eLMxICzwv/Vyj2J296JBhYXd3KgVrL3dgmiRYEKv30P1fcCaG2JFtmGPyNDaTmunO2TwnHcXnUKq8RoR/kLw==","shasum":"33de3bf1740e02c161b15ea47d40aefbcaffca99","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.65.tgz","fileCount":381,"unpackedSize":6027567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf+1kvCRA9TVsSAnZWagAAZjkP/2RYKUtIUsUfB3satWWl\nU1XM2UIUBwN+fZMAMolaRBTRDgoLnMYNzh4QbmxBh4bOh5o5GNqO+LuMBB9D\nv3gX/EzWbw8FxVzKBEfG5lORBt0BCEi1IKXyzcOpMx+xcbumICvexyM6NBKJ\n7pnQxwtxDKPIpHOfpCxCESGBlhnLYVxsJip0BdfLtFRar4zST1z0f01YFEue\ni7YNEaGVoFJbODYM5KluqFgp3Alck3KRVsMrNWFRE8EyquzYv+UBf6hLiZ/a\nsiirkGcz6TbIQqssA+ZJ+KOPlGXlcRUvVbzpWy5O00CJuKqAZxAH3jJxuUX6\nHtpovjaadCVazS/5nm0JfPMlOek9a+ynn/gT3r7XLMI5mpHZ3HtPPKt5AlLu\n5qBY8abEgw4NU0T57w0dQ22RkWLBQJOrWKmh/7P3osxFl/MDK05FGacYsnR4\nug6ZKZu1lNAd7aRfUYQBkdex5ps42PoYWxCWQHt/qm6tt0IsPuEzF3mdDALB\nAI05chSswXyLABHYf7MZdH7krBjyp/9Bo3huQ33WdMLQxFLSK3dVP2oMDiBm\ne4BmaKweOyt/Oa1VDswT/jdG7ObScqvcRE4LWq5vSc0pJBG5Zs426UC422br\nXzjdFEigARPgOHIf2Hg6LogY3j+sr6dWNAtVAIbEM7z4uxTrdXzQqMQwz6d0\nI/Au\r\n=cpPK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTMoXbmcHYxrbDOSLjg90sqD1Zw42FNGhZgbVQ/pACzwIgeCJsvl6cTRlyVfqsKvdtD6DmKE+4bfHz6PuqfSp5GhE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.65_1610307887336_0.4318712372948317"},"_hasShrinkwrap":false},"0.0.1-nightly.66":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.66","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"07f5dc0397d7ecb3a76f0e11fd325197772b2433","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.66","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-C81HjM/KbkgYV5VArccS1rZ3yBifLanQszsnLoJuZPi8PBHXS2VH7j9C+gJhMNw9R0jJrWLbdEHNFdYM/gi6+g==","shasum":"0eeeb86ec87f4324dd4bb67bfce360a1560017f8","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.66.tgz","fileCount":381,"unpackedSize":6027567,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/NGuCRA9TVsSAnZWagAAP98QAJOmilF8BeS2kCTK+5/c\nvNteF7JXgyfz8Hkr+6yonauIjnXBfvbvmAF9/CdOtT+wZ6tGxVqsZ7c8h54B\nIvysJbd+jo6hIrBPoMXUw9nN0erkJ5kcyM+vHn1KzgpSWyf5l6D4gN15wj7x\nSJdHMKYEzJN7u6JRtmiOVUtOdiU7ZT2HsjWyKMMiJT4guI+9w4wZVOF+rZYX\nXkyqiV3Px5yOmsSaxwzbqn2oMwUh54CrKRF1mwfndAbghQm5j8dn7kGMQ/Vt\ntebGqOkJxKmfVQqDhQQcA3nrwQ+IhKLH9/yv0r0Va5j3S0JmH/9ijP7PlV71\nqIkEiaV/5qB41v3v8uq1OUl6zRg8c9pvlb4LlTn15NiSP9/WyuPf5PY13XLI\nz7NZ4TKMzCbCGEtzg+HjFfaThaV3gmEee/oLJclTBPd7y5z6qzjYnOTatCSC\nZS6RpQPX8q91g/6+6vXagN5Vg/qDbYbLadvt/gmpq6uugt+Xsnv6nExDZS5o\nMzYe0IahfY+lcjtEUoBlJVvTWozqPTIE8X/unWcWe1kBv0qiZICck/b/yE1b\nzRuDCCTi1xfdGYqbEGaEXvDnOGHdwILgUX3C6Rm9j12pwn0Z6HE+1W2LXlX4\nZ0I6sfE/a6tUnoVaUdCuPUOidNeROVj/dQm+efVImz1hjnWxNg6aFolzqeRc\nzMwC\r\n=h73B\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5hEU80CJYYb+RK9QbzfBpvmOm4Uv7IyFIpLBOM3EOFQIhAOVLDBukunNmZPybS9I2EgRzLebELUPTkzGiDZzaGL3D"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.66_1610404269574_0.09827287674141161"},"_hasShrinkwrap":false},"0.0.1-nightly.67":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.67","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2a7d4e6d77761af6fa91c0a427c9657efb383ad7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.67","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-8Kbqk9Ml2rpT2/HAz3b9hqPw1fgvIFemqK25AnjXea1kooOoUkFiFuXg566/xNyV8ySg8rjpFuW0YYdnTuGgqg==","shasum":"14f2a8afc46ea4f8ce4cbf831663bb2bdb068465","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.67.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/PhbCRA9TVsSAnZWagAAOU0QAIOHQWbyz/yUs9vbJg/s\nmHEiLL6gDW/QkR2K8YtaanB/FRFEUHJgIN05jPoy2XvJQkd35rT0OiLF2Ig6\nQ4qTmGXExugoLfWsBAcllTNfx6uw7PA3msOYqn/txdv+Vc5Gfl/ufPfB/08O\n1XVyrQtzU9ApHd6/lMPJgGfk5ZY8K6slQH+xFRhaEDVQYoe7MgZYNTALsPzK\nYkXkp10HkHrqqLoAglR2h/XZbeqxBRiu9P6XSYckcLD8/nA9D6ddr9VqOMuB\n1LMezoUpLV17hI8iZSrmQaRBlByL3D2Lf70EAv2i1IpgEMQUk0JoyJNZneE8\nNtDRKa4PHAR95EUJ/Ec0iFrHDjA3zQ6zdD1awTZCb0z4FUfDhqLyLdrpQOXh\nmo5pOcLSPypKkaKc7VYh+FmWG3kfQ3RSyCuR0fz4gikRzecmQqWUg8xahB5R\nkG4Pt53XXVMQ8BKFYiNxhy4Vwyz1+YL9M5MqAwYnJfOgihW9rDQLH1U6Mslk\n+gRxFdKxZRN/HyUHfsqAHqs5cG7weQ3fQn2XPlxBKh2cE+kO8M34qVHluJaD\nHVVtAQLEsInO2YelBgw2vksK8OGd24k4yo0tFt1BHYaFTslfVxF/V2/0l9ji\n3ll4gEu3VCYTSs6cDcTWTk4APzaSHILHD0wGZw+B5hLG0ZU3Nuak01ZjZEmX\n++1r\r\n=EJb2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0pkOuM9T0sMb2GRgBlp38OUzpVxdOjd4Pw2oxlH/W2AiEA6hYezkCcLw+UHjvIMw2AqcwYa9hklAsZLwseVAtTtmw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.67_1610414170358_0.9670839473364359"},"_hasShrinkwrap":false},"0.0.1-nightly.68":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.68","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b68c63cb139d27d78ac209d6b8a015fe5d05403f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.68","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-gD9bzsXOw3T2YhyEmNxfihlU805GWB5KYhsPPPib+a2tPJJXzgCei2Ljw6xfYamI1cylVk4KrA/rKRp8XzlFoA==","shasum":"c1fe486485c8bc127efa7aca823227ca49cf59c9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.68.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/TUJCRA9TVsSAnZWagAALXEQAJBRz3LXywYNpRtMaWiK\nkS62877cPxKZ6AmOKIU5YrWJTaVKO3lJR28WmCeml0xaIEeYhYoBqwPUJiFC\nCB7FPSgWlDsn5UL2CigCOJRyzbZP+ced9LytddE0jpFuRulRpvBP/D82/FGi\nt+CKCGQXhqu3H5kDNDMoi59u64w2flTOZiw8oVorpgcXVhSkpBdrn2ecJ1Wk\nuwa/WRCYYw2NL9fegfa305LrE/B8XtDGeANtsgW5lKMdL2F2BRyN0Uxgsetc\n9FhnQTXZ/sTIPrh1LncIVw7GVAW03QpITRCbgSzEPzdAlKf/jva/9/Ypd2n+\nHqee4Igu3x3md3mfE+8Da7Tg+BoRXFJ1+vf8UVkS0ek8Hz/hW6LG5O4Wf1KH\nPXreXoCj0gzaS99nx7dQHloAq9WWvxlPJr6gFmfKEGxpLs63kLkGC6tQNjcN\nBR6VXG2KaJNp6JXUEuVZKFJL6nqcsELsRMJ+qdxgZ/jZVl3SvfNoUpj0Qwpx\nvs0kY5D2Ig/69+yIUy0b6aG/3DeM4kK8fl6yFPndgKMUmW2H07ww+GlD3Zie\nOigGDra0MYgEZ97AJNZOiQ37CDyN1i+t/e1RClSAho2QnrCAqIIwaxaErl8M\nXklbYHVmi/mCtxcch91Tv5JJ7eqglHTpT8EAYxijO8PjsOvjnpJkJOE5Zdqj\n2sOt\r\n=TF1M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEWxqHZbKatJhZuiUdBr1HoMDVZqy5FGN+LjJfuo3g4pAiAgcUS5D6qkGYzLrVyZWpwNzucIOF0NnRAV6c9tpq0Jyw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.68_1610429705090_0.29681333570245494"},"_hasShrinkwrap":false},"0.0.1-nightly.69":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.69","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b5f92777af63e31aac17b2525b0b9766e53b5b77","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.69","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-pgo+f5KIE6SwAzeLWOVEgw8gOZuhWiTVuWsjkPPZOZIlDNZ+G1i0KHOveHJyfvfJiGa5FSfS6+Ws3LixlY3iSA==","shasum":"8c0ef5ddf8155656c6b184686d391f5b7310f014","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.69.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/jkPCRA9TVsSAnZWagAADq8P/1rgl3MvnKsPNbLPndg7\nPfyk6wHN4zUn9ER8vFpN5qXbeCv6TR+vuT8RlI5jGndXAJYujjicIXqN8QHg\nv4Ley+8gNoHGQNfFoMXioY2fE7YHJ0Jbq82FhhQ9G4w9baO7bYzom1CRvcME\nSJwhyA5/80hE8sVE1MLpFdyBqM7NTw0JkX4nE9WmURELKMpTjVO1HWVRxgtK\ngcD1rFKD9/v2b2o0uMntUOYrnKysoMcEyu/6lKZOeHqEN+hveBjHHaIhyKxD\nppG2hXS52cF1z1XntAb8uQn3d6H9m3k67pSnWIBKkGA+a4SX/+Q26ehUUrOk\ndfMtA0WiWNpWUap6ecCZhUlKdTDjDjbgFrHAaAxL8Wtj7qgiCKn2Mhgx5Y/x\nk3pf59of4FDM0zBUVoQ5vVIBPvK7pL5lO75whzPYA5MYqx86XfnPl0RbWV/B\ntcQnpFBU9zXX+FFjux1J/F0gfJDWS2DXBgwmgc2LQSEw+SEv7xK39zgWjboV\nOglDywgFFI9idkTt6m9T2WyqD8vrj4WQq8A4tPgzTzKrjpfzlFdZrGJnfEXY\npyLqhU6lhwlPnkLLs5OsZZyQoC/+2pIDNXeZHKOkCv8By5PMDbvY+QH2/UFC\nXQgV1PE33yFgCd9G9ZM8HeH23krgT1MN61o0iLb4zsSQuUjPrYm2v/QAR6Bh\nW5xT\r\n=RbNd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICAsFRtQbNwcwpnIVKHkxuNnRcpuxk7XLasdo/3b1aRNAiBjvjX04f7dCExC7YKzV3WKB4+NqjbB3asXqQXoNjC6AQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.69_1610496270932_0.26733541481234613"},"_hasShrinkwrap":false},"0.0.1-nightly.70":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.70","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a4b20aca72dd881000e375d065fe8439c3eb93c5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.70","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-twxDLRsp0JlmXut/SZItNsb4rPJODJfDCtk2NG7DrOl4SEdDpUl1auOYVQ3afRksXEbN4jZqA3G6VsIPFvXKfg==","shasum":"2827ace587c7f8219f6fa4bb35b0fd14fb0ceff0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.70.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/kCICRA9TVsSAnZWagAAjMkP/iaMtCLTnESZtWw0ajNf\n+F7bw0SI06jEdKHOujuUzNrS4EgJFQ5Y/5IdHLgG6zhMzq9k+xGiVZQjSzrz\nMf0iCiKW1ofBv+0Jb+Gvd5NsOwRTuGeFDu+JspGP1dby9M7itb9SUB54Dqkk\nP2lHWsrbGAHm1UObujiTgnRfG5Ly6de5qB6Q77BO0dHkDOojg34SuQI5mTEy\nFZAtnjBYmFCyPCCafDkvCCpVVcynN/S9xo/UV6r1+ZtJd7YgDJvHkgzs5ibW\nMQESenGfDtoKt7dXvGRq0B+ZybJjRTWNYIDDXv985NSANMIG+BB9Cc3FqZnq\nGD1Artzgh14oh7t1itHpZH6+sIteuDFRcASmyKz9m3GHGeGWKEy4QjwHEtnp\nOYxONlxZjFOOIpGwwiFoABUX+9hk5ngI589HSp4GRihS6FUHSPusV5dAI64w\n9oQ5wKMnk66SdiQ5pzH/CuMCQU7o/QJbhDpqVsE3B49OrLfT24OsQh14dOM+\nU0oTW1PzILa1IYdNls+Ijk/9rQYhMm7rSLIxAXkPkHqyODHL8f51CW7DnVlf\n362Z0yfSXBESpFSjLmUd+qVYY+mDxIF/Q9RKDbd4Hah3NNk+C3cUZE8F9pr/\njg44YbDB5WhWXVLFH0MlZngaS+IZ+0itQtS/dxc+MtPnExZGKK9LgO884bPA\ndaKs\r\n=1YCI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD5rvIxg424f/5HvNBGdSz+uGFca4HicB07JDnxa+4rwgIhAO7/8R1SDG/Ywvkb+4gfoycTBqiixM+kgK7ZI4HgA94m"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.70_1610498183775_0.024823483212149222"},"_hasShrinkwrap":false},"0.0.1-nightly.71":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.71","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7493b7e1b840a3514a58187d76638801d99b2092","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.71","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-nLtwgSiUzNaGuLF1Vb/Z9wRTXHje3l67cDZ9I/si9cS1NsUA1jBwuKMtRFHQjqnypfRsxM9YKNMNcUTLVo/xKA==","shasum":"b269a2a34d44b7a2e3b9123745388cc6beb2d6c4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.71.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/lewCRA9TVsSAnZWagAAb38P/3riCbd+cz3utRmP+h8e\n+IEN16XX5mRP+VuQz/gU6GesuKJ0rg1Fc6N4wWPWNGXzjkrrhosepzxBKjOA\nv3b+BtCdWxsVpiIh9p8khb3TPq6P9NCQ0magRlitf58eRhg7u+zLz8GlLrcZ\neGdvMRbkSUjdQZ1iFhwQWqNINejqxpb1BnusaEYoyELLrI+fX6MSYtDz59av\nNfJ/Jnlm8fGG9yoT+VVMFD6fny1orKoABbi7Xb+WiP0f2dyxWIWOVJbTOKmT\n4EW9CE/tUOyWUsWxFUzR9zI55kNihdDn5ELxy1upA5qI/tcis7/vt3SwR8TQ\nWVlXHXsyYiiY5oIqXvslgHnxJFXUxm8TUdQQsLidYNq6RseOaBYwxbtI87lf\nrMIMWaqNHsVa4sXBxk7XAPq7UrX1h2Nski8ZwAFt6Mhh3xVd0r2z0/QYbz5E\nPhPuIVGC9+B7UkvXoM1kgzWB6OT3U5b/ESxW9xwvCG3TajytZqVx0TZOenLs\nE4+B1iCkVuuP0kEsLwW9o7KepWuL5hiFx7lI9IyXl8As+pfXvVjrqDRamoEX\nkjrNWWqIfXSxrfl/Vvi0m2QaeweTEkwOhiwHhQIYKmlHcHJp7H1NlQMtJ7pZ\nhDPv1g/h90nOCCo+m4KEkuPjb1m/w+Leprfa84vh6TDpmC6Ek9eUJUlyC7hJ\nVtUU\r\n=VTBV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH4d5t073veE2yTO3IyacDegRMrhoyypzQ80Yv4erA8LAiA15m/B3J4gUFo34s7WJhIsUNyF/hOtHbU/1vMWy91xmA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.71_1610504111960_0.18392300430188002"},"_hasShrinkwrap":false},"0.0.1-nightly.72":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.72","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e22529678f41acdfb372e58695fecb1c1afebf4f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.72","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-cuDX6NBDx2bwS53cyNNaCaSmXQbmquatnvXNSQkiSZVPjC4jxs+Vs5rlEIBHmOr/U9STS8fUgghbDy5TgpBGsA==","shasum":"95ab59ef081ea7c0c7c317bbb842184b0697076a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.72.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/nlfCRA9TVsSAnZWagAAgDAP+QB4iy0pyMU9Tl1gewJc\ndPQRePK7s/Cmisk6yLNxnBnn3mx3VS4vrqls2rt3V1EKwY7ZMstLsNxey8if\n8pLrh0VlkFbMtL3pud+QzUlNwk4lC148CtK4y6VYd6YFOU56y2DdIgzIHXZ0\nIC2ulSkdgtDa+HQ6s2FaLBix5vWnbgOjKajKNoFtxlRk6qzEwpCiKOgmOpQv\nF+KI1gzXzI3Qd8TIkGtfHPE1/M4DmVjAv2JyK1Te2KYYIV22IL/mhtbCTpr0\nG+0FeTYhMHw4NIR/IPh9h1WIC2I7ah+1sDmYGf7Ko8Ifevi57kTAtcEDVXRi\nemv2BZLvfZkDZLaeionfLUHWwxXPAd9TkbX1QF1qiJmF7fWiqIZLuv7vniob\nhoyTJFxtOi5wHp0Op23ISNlFByfKXmT01V6qfqV/kXzDFyuLen9WB9UKJ3KC\nY+2X2JJ5/svVf5xK07xPbbjm74htqLeBNnr5i9hQfUHlkW0qbFNVVYaOafpb\nzlek3rXrU0CVkimnNFG5pUCW+ruVmOFmDsb0syNpRgSm6k1hWhS/qUnsflUT\n3IhLo4SV3MUV19Csiy/+xCcN/YJ09rqCHchyclz9Fde7HLQDYTPiGAyTstfu\n+H03IjpaZQSUFuArV5nVA2G0aWWwiMjPHhfZtYhei29J26f3pS3DZFFOvOlG\ncJZ0\r\n=8+S0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICYKYED63E8ZO18hdtiP40G14t9koHcR6GqiufjYEfQSAiBpOiB8NpnSqrJbLirScT5eqAMbl+zSr3LbcJJx4Ld0tA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.72_1610512735215_0.536109375731898"},"_hasShrinkwrap":false},"0.0.1-nightly.73":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.73","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9caf9891b544dbf9c2a1682e1368ca474aeaf5d3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.73","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-MXHigMMUT4ykymUFH9+gUvJpEp3iq66Dl4qaV4Coxk9LMqHXj903km5D5u/grOLgMCcUT6UlHMYJhWl0I4HGNQ==","shasum":"ea4265d0de81d2f1aff8ea2daeb0dffb4fd98895","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.73.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/6qBCRA9TVsSAnZWagAA7qsP/A4OZTMNd/oRcWa7MjNk\nOGmU3HE4XXcV4aYXeUHMye5L/rpUhHJmLN4GxsFZVeqsSPPAYRMlkd1eA9mo\nSkFHdVYxBGf8boqACB62p8YtoZvlnjKRg1auJSEiZQCscecVgph2DPgvOtaA\n9zNudqJP9fIMM+7LeRGPNcjeuwLEkfTtdxnAJwnG0JrR0qrIx0S7i8KLFlux\nAUQXplYHO5gTpDm6aq7ubX4i3e4lztuc8sq8CFmgRs4j//K/3mepMWBf28vy\nkv8IpJ651mlavAH6Sac+cpEDgkQ2LvV3K7x6+S6mYgK8JlEdJmiu4af01bbh\nYfg5WVU6zYKw1Xd0MZJIR4QRSD8ebUpiTrQsACiOARv9zkVAFjRixH5twWWY\nMSt3AC9xLDwAx2ok49xOE4/Xbh5+//G9wlg0VBYdZrim+p51nEJyjiuJazDb\nKIlibQNTPemBMN+1FpY9K9a5CzOQXUWLl/LNzSZbNaP3RFfmJhOXWfWcsR+D\n3lI2+z2r38g+Xw/RBughWcJ+O4+6WL2yhMkvNVPsJMJZ26ngiU19CmAVdHhf\nFbo8yOhzecaJlaeVfB4t7/DWJjhdByZKQgGPeKfIvV7V9SgQmCMOxXmQrQl/\n169ihXIGKMpObkS+33D5w1ef4ZNRv/E3JTWrtuDamxGEDX959cRQTMrjB5Pt\nf8sB\r\n=498+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDodqJGvc+GHmj4qy5SwW3dNjYIvELkNevo1zpGfp79vAIhAPKNYuUZcGZyb/ZcHKMhE6Y6LMX0x+LOGrXjepfLAmHo"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.73_1610590848728_0.09798650845546564"},"_hasShrinkwrap":false},"0.0.1-nightly.74":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.74","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"67f3e5777442d2fd26a32eba9370fbcc3191266a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.74","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-i/C2Sf4PNhPMFNYERHGxJGIfEpuDj/gjduQPKvKi4HyLdryAMhJBm3JsdhJ7KK4S+0qkDzj9E8LmfLArjLRPdQ==","shasum":"8c9f882346c65868ec7bd77755ae052336ee97b3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.74.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJf/7ljCRA9TVsSAnZWagAA5RYP/2jUmmuFEiMjsMKFPvI2\n5AODzQrbTmrCKLWjWKNMJiFrF1/uU7QHXGDFmcueDuWYzwzw7lm5eWJ2/kLG\n3nmXyAN17M21u7jM9+YZvYfwHtxPrduuTXFwq90W4blGSAzPzWM0QOwoOkDX\nYrCr90hfMNO8pz+43DJOJzW/kRMALaw187bvT52frW8B3AKKkILTGwu0pP+B\nmgPwJ9YQm9dif8YfEOSUTQwDDZ5M1wNYcODAq1aB1LQh8gl60pLkOy7Lre/O\n1yKs6Y9G3sgJrvzkbjLrMxWydCy+4rJ5oGlEYbJc3eRctr3ht4qISbnRjf2D\nAW5Akgc9Tbhf1+iPGusRcpSzclZtxtkk7V98jcgq3GA7VGenLehlOsp3+kbx\nVMIlw1q1wOKP0vyrGItv/dMv8UAa2Dt32epgC1knIvllk1+dIhiSb6Tpaxh/\n8VL2arCQ4ZNmQHD+LZWcgWS/Ls6NOs79m2jH5h0G2LitojLTgc9FebSFOhpJ\nsx1vXOdFBN3Siqh6YEK0jqwO69iHgBW/8mFpbCi0pDzCRCWFD+FxJ8Hpgwzf\n3625f9bRCwD2ORQWOfsHhFFwnB1pg/k1IpGfFutLKZ8ThXdqVqKQVvhhE9Fw\ndGErQUiPLnYLEL1Zvu1JVC7FuMb1eytpHNxlEWFF/bk4W6vhEu5YejOGIDsU\nNK/3\r\n=JmVh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUEeFgqt6KAjEbJvFyfsyhEdxMJg9Ei1pkP5TBsGChoAiEA9ZQWxmQVAJsmmGbPZHKjD2mzy28EoX8Z/KFcCkFwFVw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.74_1610594659439_0.5880042991069792"},"_hasShrinkwrap":false},"0.0.1-nightly.75":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.75","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6345568830f842c944a5608ce5af99521fc07b75","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.75","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-vFLnUKegDBU3Qhfy75CbI44wWZNtclHCrarho1+5clRKDF2cjyF68Nu1/fj8CDT6av22+conXmcHbfTwnu+q3A==","shasum":"08924ba938b9a92fa999c1f44ebd553d6c52c12e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.75.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAMddCRA9TVsSAnZWagAA/PAQAJa4dVFIjID855pRWZcF\nrjJQXUWVSORSLyfo7ekLXJGXLh2xWKLkUONrcZzo0/HZuQ6LTmMWCs2JWRzU\ni+bJgWH95a37cXhCgek8Ruw2RqxrL5NlYv9ScZjBHn/VlK2XlQOVTnszDY2g\nxM2nr1yPdHy8w6c8cgLPiAG2VvbpgNu+g4fj14+NWO/MzIOVhtphYBGcq5Ew\nMx/6FNiEovn2NEbKPxKSdWNg8d5WeDXqglNqEzloaciINRwdWvaWmmzUedEa\n02JdCKJpsuxPgq1PEp+DgtboTZiYHZcYEnbvcAu+QQbEpT0Odv+zVUyGotq2\ns6OALotnE3D/GN5dLafyefz1DTL+W69gXGm+vuo76Y+aZAUNUAVTMn6dWBNN\ngMyVKwYYApT87FjfSnCUr4dEC+548lF42nfL+ma2lCKjy2X/df8q1Z33xRJk\nHEuPzh1Wlgvom2004j4n8Lw/n2nw3uwkb4qfnRsEr+XPHagRT26t5B9MVq9A\nXjH65Wa/Ln0aAh1Qf24P6ZL2iqS56stQRGH15yIx51BrrSfO2ZDvtdNiSc2X\n9+X6LJ+Jidd4/wO8tqqY/d9hkyz19xdClxZvgaRsUvC9MtRvMlgdbtzNGrzF\nQeYy8Fn0CCnlEw44L+nBcQ04ykjJHL6ik5fneRdf79g+8Ev95yXmUtj0/LWN\nXjPw\r\n=2y7v\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCHzb76mxcvbb9BRTINjUH4yw6LAs8QxMXVHL8CDgVxkQCID3cLmP7xXBf7nfobW7zlYU+DE3fbC/9e5Jc5LdiZ5/k"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.75_1610663772914_0.4858398304286393"},"_hasShrinkwrap":false},"0.0.1-nightly.76":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.76","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"70120aeb56a31bca2f97f5b7e01e55411fdaa130","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.76","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-rJmU0bT0MPXNwprphGBHoe0rGKQXETHrdrLwk4g/RmlMtzNeD8e4VLKWfDr1Qk250ooHSYX2D9RszcsfB02xfg==","shasum":"035de031493c3859d05cf0ac22782fc752af840f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.76.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAOPnCRA9TVsSAnZWagAAhqAP/iBXGPmL2yJmiAeVoaFo\nAhiK5VVrYpR+4GmysxXh9pbxfO73mTEpy71KfvFVZyjXL9GzdUtpLkwNAXJQ\nX4RcVKCJUD19xrC0aHbm+7DvuedFmLQMRtaHAiwVzpcDg8dO3w0nte8XrM+l\nIlEJin1WCaFOJY2qLZSqF5QhipmGX8PWuigWlOnWOO4pKwx4Ypb1N7rsUjND\nPEcO5sw+jt+RGQvdIT1TYdHSbEQoue31ruLnfA8KyPQ+n/ZpWPZMbHu0NSmM\nqDTFSkkGVkWo3GKvh2p3i0yBwMGFjsA6P7nW4RrfjVmYpR/Md84oTT/CjyAO\nd6ASRzCF8sbQVW7XGyLTfH56Ac7Aay2kyctCEgtPyhr76rOdsbQZWqhpVM4D\nwzJ4ilpjySE6sGOQg1UMBlONIOasfG2zJz/qnNFiVV0MDv2Yz0Akho7GIPU3\n4nD0Mph9Gckmy/8A/jqoCwoEVuvEQVbXR2Fdjgw60GRIeurSDtAZXFP/q+2o\npX29OGcmYCGJktFpC0icLp2MZVdD4e3BEeTM1LiL359i0OOqBA8ggvLRkLlt\nUVG1IxmftVZ0W6NkmQ8Aic3PFriY6TJTa/JFjPHOV8hSgHID/wU3MNRPm2tD\n8dktS8zw3xYyXvqej7u/0sFZm7IHkPpqugYdz2D+VNJnERO7mwEyXW9rRwxB\nYwGJ\r\n=CQ3S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQ+0gk7YNlgN34/W7w025LnsGXb0nV43eHVz2vJnZIyQIhAM5e9g22I2cZhxOfRjrc/kOtgah9rQnx9yvVOi2hOvk4"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.76_1610671078987_0.7745162892980526"},"_hasShrinkwrap":false},"0.0.1-nightly.77":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.77","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1778a52117381ab5a4c69d101ae8f1ca865b1acc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.77","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-aVfcubAwNzHFq2NEu7QMns6+++oBofF69C+CQ7zYFFZoKfawuLOwg/82V7khCQM2bx3Ys83opX/NmaopVnHtcg==","shasum":"401c31dd58d138ea8ed95c66729daabb33431dea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.77.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgARJuCRA9TVsSAnZWagAAuZQP/3hbSONeaN9usi4+0Y/e\nEB8spB3DyIsucDa/KWfltwwMaC5o74+NgpBaKXYtUZuaSJPpBXvIanuuiPxB\n/35q+cR6JKzAydMfURuCOlvIWlJ3e+1z+mhDPhRoOUbINwSmzauIPoUI+zPW\nfOc7+HyZrJ6OQefahCXahDfXLqLK7T6MLM9yyBXKpRNzbKsEIgIT6MKKaAi/\n58yjG+FEphHb3mkGy2snQWvJsYRu7uxSlvPeRIQXO8m14erqA4HxZHhH+AHQ\n/sIbph5D1JySkQlQvvs5s3Mdk5vPhJF2z1abfTnDcANkp4qKNhwCbIu2BGKN\nSJQioT64g7S+5UXnGu7TRfzInSwcYSY2QuPwSUjBz3oOgO169szS2XTsRH8S\nBVZMWVkoLXiyUv4pn5Wic8k3Q2MHo1Dc94SdNAO+UpClAvoFJZkQDSDW5LKV\n6785/A0v3J8N6oBQrFf4IdmKmqul4BixgpYJs0MrJxEnFIP4rKg3Re7vE0kk\nPszOMykcKMjrrtTq6gSqEEDnkxau+KlqtZ/tCuJX06ieKwIju9suP7EiLe+t\nCIw15jX/2hph1ANn+zlG69iNrPbvlQVvuzOPuPSBF1zARrGqE5MwXWNTwoDA\nCk7B9rpopuDa2OKSJ77A68ykNv16Fotwyfo1DjKQQExF4EomcuTrtHVq7U0v\n9kY8\r\n=DnVr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHQrUezqHjC0pa02Lsoy7xGa3vLn4ZHolX0Er4u3AZaBAiEA7hmoPxKfb0uwv9BXGVLTFqoPz7Rj+eedG+NeCcm5Jjk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.77_1610682990284_0.513760947442111"},"_hasShrinkwrap":false},"0.0.1-nightly.78":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.78","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8a5b12d7fecd451fa2ffb76f95fec066bb993a1d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.78","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WVIltdlQKBGyFlFfZ2cFv7DMZdroD7rKOAaDEKcn0f7PMPNmwUpYaCYjg0HZAqXByRPgql+BuL9YfC0u1lFayw==","shasum":"40698c3d255da3bcd4948d1e157fb47acc577dc1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.78.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAmi5CRA9TVsSAnZWagAAujkP/0rxV1iexgv+nUZbvUlW\nhcLt+10pDhIwZ3Dzi7lL0B/6lsZ2tYuz+WLEi9ESCRSWCpJ59DqMrMKKWOVl\nlMIgdL6G2v8FpYSodYQVir8u/K2V5umag5mjzFLv2mQnImSfnaJVZGxvZZ7V\n/fMoXoMLGvzDFYgxdcqtiUoii1qg15o059AirB0xT/rPgg3Z0M+xSztskKzI\nzlIHsE372hveGrjDtjAhoPRiWP1mC+d04uL5JxY96Ry2HmMetfMYqX0SwYAw\nVqOX4pQJL+/63ssfgO/HbPuS0hmzFmfMiQz3FJmiMw54XkzLjnDyNprU7NTR\nUcOPpMGzFbqZCY6FtAcOU+Ipvp2Zjq2PjTf8NeVgqvQqpvQ+oKwF3x/Ktnla\nmrvnRT4A5A/MCjT7FJlcAuiYXDivU15ixYRyseeVK3mhlL2jWSbJlziz8lqO\nTIxLwFFwf4hOOfHYwxyFji910nus/s+k980hKwk/snB5/HbtjzVmTbHo75ZK\nazWbB5AwPuTMii3sO+bVbUXiLpM4RNjBQiJiN3loTrDMbdlJEakq4sYkiIDB\nHPexeHumWFLt9TXJsFM+9A7kxH5qqj+VtlYtKHjZ6bhUxQMyzRqub42dY9n6\n0//DS/PON/tpqSvrjEI4VHt92yWXPTUEA9u3XFJuoiNi/VNQZrgvkm4esOG/\nNBQe\r\n=8vjy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEMWuPESH9iDV6aIL0oLR60wvhsSfNSum+AMfGFkk0A9AiEAweeRzdUiZ+oi9Etmp4Z1ovsHaGfV6b4Mr0gT/sEdVY0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.78_1610770616778_0.075762829339175"},"_hasShrinkwrap":false},"0.0.1-nightly.79":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.79","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b01156751c2d0d05e9226aa0a5d6dd7e18223801","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.79","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-duwDa6voD9fI/5JHM1qSpUErcoajJgjFyXFdxsOAvrZNC4jggGnNbwzWBQonlQkI2IRbY1c3NR1bPwb/zoNEuQ==","shasum":"7c55bd4ac2e6c71054e8f6e2f23653cf8c087c94","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.79.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAwEuCRA9TVsSAnZWagAAd1QP/03Y8It63BwXbT0dIL40\nRBx1L12pHwkfwRFeYgKAskqaHY0dMNXz9Ednm5iejdipz/3k6/VzZ0Vil0Mf\nZriMY03bjo4XpB/t3VCKDxlkA52Y4GMQjeMQIYxS0KFM83T9zTWfqYfQywix\nPo8vy4iRI4KrecRYTpXgdzO93h1isZpCuxCENs4+NoXv3ne8fB2bPWHuLNQv\nrG3Ccw9wsodMV2scnNvy2Dw0PQU7QGNAFKTmKjsCKR0BM2Fa32nsShzCPc6I\nwTdIHa51fmpzhbbjDTXoG7WCrlU9yumly5oubB0L4Y//Z89bsUR+Z6+RFmI0\n1h3Oe6ROnc/p93pphYs0q/Sv5I8TiGkrIENxdD93sUnVujv7OgwBggY3qb9J\nX8cGkYY8C6KGHOhQOnc3c1TtD9Yxv+YEjQpIfOxk9Bi1py9leCfyRCyvFuRo\nbkQsWYf2tv+McFvHBBBhlCtPLTcNfEjCp9nNY+YaQWfIKawHf/tq9ttvWmdn\nGs8VcBbSoVR6SAaQwGCeiPkwBBF4JcRn5izepoaHsMcFVq6hJOt+LOcaXx0T\npbFyVPCcTJhzeY/WQeGRA1IhFYyZVkHBDtTD+iaUjz4VEtwnciISSmnF3SqM\nkZjmEUaEJmqk2LXhfj96Xbjs8xRSyZXvJ/MchgyuBLn0ojKNpygZ+AhJZcqd\nqXGx\r\n=WF15\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAb43TKCR6noPyD9U2D0hCIo4KjxUpy9WTkkwtdODyXBAiBSCwffvZo6rTiQIO7/GIfsuMkj1O2IISo0hZeelOkhTw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.79_1610809645576_0.26506763869567407"},"_hasShrinkwrap":false},"0.0.1-nightly.80":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.80","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e82a32254dd09d98306e547d21752f9d6a59f2be","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.80","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-1nwOWGZ39vPRCf/DSUfJ0AaVKfKPSVuddvnzvLzZvs3B76fcnlaQV7BNdanxZwaN624xBXnz2uRhwkBl5AkWXA==","shasum":"d56d1d788ac637bc847013bbe682b7b69abeed75","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.80.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgAyp/CRA9TVsSAnZWagAA3nEP/36eSLDG9oPFGnIeoFBC\nYUYfkyypAfe1DojdTUr5x9O6Yrnhtq1XciXWsZMvEVmF5B4/vnum8aojIzjm\nP60XXPztkljg0qhfCYkiutH7gJSmcv1VkbTewvJkJ+nrw88lNG/UKJeeNlJ4\noNWVSBk6oiTLtXlyiH4xXqmZGRylM3nTrUyeELKEKMShyC8Gm4aQTNzpk3h5\nH40i/6CzQa5UcpR7mogk8nsdTavG3vGrD4yZxV98YqepLS/CRn2GdGERAhGu\nQ2mqYvbbkCmgoPcb8+Ozypq0EX0IdpJRZy2t2Wl88u+KMRwGoQ2BxcvWWhxt\nFyg9js6/FzwGowkTBqEwd9YysIVIXPJgf9/gB7yUmn076ajOoI7xuD1DXOW2\nOzSStmtnEb1eQ0FWwtqglxquWD77ugAIqwdt+xt3McwGGNX3c8PwsGwXgHTE\nYDqNxHzQYzrdsbKYo/olMO7dnwFwP8d7FylJ6ThjMrDNv5QrltjaEkp/F9W9\nEQXJ6flLxt+VKb6MQ19ko0ck90YJ3PuKw45+E9l4kSMssgcAGQKPVGoa/kCc\ntY8ag7GuH7dwmQG1D7RHKmZV7ZrFq0L+KqTupg9ulnXo05dJbM5Y4HJ9nzmc\nnKFJOQfc7l34fLiogtz2jhtvua9KvbglXn032x9mfQZnwRFPK4kTKu/vVJWS\nuDfr\r\n=jrPQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA3kyT1y1IQezvcEy4NN4/bCZHGyFCgjd7uMdNbiSeycAiB9GpMuoZGS9Iq7PRW+7lnTsEr1vg+32NKx/bcKaDgs8w=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.80_1610820222876_0.009169385448077882"},"_hasShrinkwrap":false},"0.0.1-nightly.81":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.81","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"182de4e0a47e2ede0309468e8d523c5ff4a96f18","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.81","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-yzJz9aIOQPfWqeYgO6AcpdNNcxLHY2/hlT5TZ/QDXezY2HSO5nWaQnNfQ9Umx7wvvFZMNPXUiTD5Gx7XJ/ZVlg==","shasum":"a63f9f67dec70ee5ff3b3457c6c72dfe786c91ac","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.81.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgA0zFCRA9TVsSAnZWagAAwFEP/AhZa3IS3qwpbO/mAZmY\n2O/WH0GvpVS6XG+RfurG1Ztse2kY6MIjwUqBgXG4ec90NGeqqqIYnQAkS//1\neMctP4mguyd5fIqUZapbV31LVZuH1thCe1bz6hyFQavYJiMKQry8Tawd0Osp\n9qjt/D12gLhlIBKJuJ6FzGVMh9i+IHHZ++C2Ka64PyLqW3OXo/PtniT1vdm6\nroLabaYlGRnBsxgtYQiE8MTmIv54YxcdlxdDNHvNJlkAltEz5Vrj6ZeZdlUH\nqA0RemYHjDbdlK6EjkjZ+DGv1r9/CRMrUh5ZkxFGghsrK+z25bswucnjMKlQ\nroe5826N/ScoFzL5rt9KoGwMmi0ji6ynagC2WpBCGt8bUKd93v5ONR8u8oyZ\nOKkA4bWgtJKcjEIhwHWAOnZjFg/4hDbpZyg3Jwy1h7mp2NH+0mt2d00TV9Qq\nfkJ74kNncLg2y7Zwvq68Fw7/ci8VFAnVCgA2XSUdK9YKzPBSUSC32aFGydzT\n7qhbkPQ1DN5SQpwPsZKNKqpnS+SBB2x0oexc3ALVWcIIU5KiMs9930jPUkqX\nUe+oQagUwVY3nzX9cwE8NNUh8l/7mIfPjTfCnDRfZfWMYlKLhXa+mVBUjGby\nI03dI1yOLBatZR2OjT9UbNB6bSF9OBfeMknJ5E44zQGy1GeRq0121UnA1hJc\nHCPr\r\n=zhvS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDCDWOCNzWNeILrt8sGV95rVQCWGJkkytafz0fSMETvgQIgYUEughs1xJ62NfJhfSjTt8ndEk+aqFZrq/UTo6wm6L8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.81_1610828997126_0.3558284181888087"},"_hasShrinkwrap":false},"0.0.1-nightly.82":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.82","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bce476fd21bb3c7e8f21bb1af84840bba347c38c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.82","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-EiAd98zAyV2GVSe77riJSVzedE7/msqN5jHNh23/48w8kDikFNxp2utA2jmA0S8oLWeteasKg2RRZMCFS+8PjQ==","shasum":"4fe38e864fa959759ca283cebec0d0754a2092f3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.82.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBEntCRA9TVsSAnZWagAAX6IP/iz+TfbiM3FjSp/K3K3Z\n4DimoDRmU8DZFenbj8dX6nO3X2HcZxt58PwLaRaS/EFI38TdCulIojqI0DWk\nHX/L55ovLxYHX9+1Yq6Thpgf+BpuQIZxMAl0UKrtuVDmQPjEUfzGqEZzaLAL\nIaJGU0hNVAWJTAI0FmJrlxdIC3jpjrU19foXGUGIW1UU4HOjhv84fbod3F+r\nvlhfcL9rIgoUObSsc0BLJPMgs7gqV2SifEcpppAhFzPS7NAcUsKErM18dcF0\n5qdXKaYXnqh6YWCx6dE0RQGLdCj5+mUxoamXOH3dUNg0xDAYkMlYayT8BN7N\nbqNrw388t0gFa1pHXOg6LZCAQoZJtisncSEfGbMAcbZAq0lXU8WewPU/b2yc\njAm7U4OskG4o/XOCZea1AImBGzJh9VEmCDGMGoOG9PANOyvQRKvwWtoHDUcM\ne6Bj+wa9VwljpcvOwQ4xc3GpJihj7nVF+FNWNPJpu8owJBTMv6sc1FJC1aTh\n9IX4JLSkFpDYmDcve0lOoiDDlzt2NpQoIDzmzXicqvODDqlH75gpQXTB2BRl\nSwbIJhcJNqDY4SGsmqI6Z+ZG9qSRdZP33x9zzTBmJ+JNcW6cdTAcCZwV296H\nZqcT2ssCWHCxOQ6CZG4RsQdFIT9nBotJWoT6MeREG8Wwt35ngwtiq1lUxPIK\nHP96\r\n=DsfF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFI8BKtblKoeEprdbMPyQ/3JtUWogd50EUViKf3VPUcSAiAaMgTqld/udq8rAeNLkMbAh7sssbhn7sziBxjZ9hQ3YQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.82_1610893805103_0.0006130085355811055"},"_hasShrinkwrap":false},"0.0.1-nightly.83":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.83","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"064ac067381443b1df90592db133a1afde934dab","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.83","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-hlgO6okcXbI7xFL7ZpXcMHSvxpf9WBpXPvzJu2O+nHak5Nt5nbT5EE7OzZGmV8Imxu7ITUMytmLHaon0ANAk5Q==","shasum":"85cafbd3e081947a0dc9a710eb435bf3479ce335","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.83.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBHvxCRA9TVsSAnZWagAAJnkQAIxLnNUtXdNLZzPGbMBa\nD9xiUY8UXpkPeMg58j0NyzKKonLDl9E7MgSLKfQx7dFO97SVUdDsqWiHktuT\nD2GtUQW0GcM0+7ubjNDFB736WTctu6Y6IXsJQunRwbsk1LELcUTMJAP/ZrGq\nmaxDSdmNMS3oaHfjWiTQcoBvEtOKTv7pkPrtZ/cbQq1wSd8ihEqflEzU0qVd\ngbrmziuwsmqmncdVanHOThVa8XXU7AeKR/rxdnTSdvhLyrsG+pk35JZr3LkB\npdl/1Bn7/v99K8IAOjB9vtef6RCMrneD0R1gqThG17ksQQ/hE6aKN+GCorg5\nrIj009Y79RKdbUc/5V0ggt5kGLtTiLqsM+yJHo175izBjJcnp5OkmBPad8uR\nJx9hiIJexS6fNlBSzbumxkDS7uzxT+VfABl8BcRaAxsr/nsUuzHvYQchxyGw\n2XSZ3wAyOAgb9hMGJwdOOGMt4o09GZnC5D/Rbuaw0Lrvwb2hfLSnAuZKBZsD\nHH+4f1lEOiPRnBF8Rp3FYz1DwUCkGkopugljjTwGQHYyLiYw0/vyU5tFdmm+\np3gAq/1FnX7YmZ5o1OFn2BgDVyDBVXNoxUQc7RVMXcTsVMYzSULcfJh7UVlO\nkI9Tpb4lPGxQ3BcgbCE513Nw46VTL5Agm0dPk1Nquh5WUR/wFAkEXk/ifv/6\nnhfK\r\n=bwmd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICejJ5PnGdWjI6uq6se6jIuhiAycTdPRR2LuEQZkCAzZAiBfbjqrVM+Y6MSAUgBliLGSHO1gsinp79+QPzEfU+k2ew=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.83_1610906608909_0.6117337945107517"},"_hasShrinkwrap":false},"0.0.1-nightly.84":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.84","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"23dd51e6159d064f2c298a10cf79469778ed6a81","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.84","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-461kK4apSOnqDYT8yVqbFUlcTx/NiZZoPlH8QTRhNSWMEHkZR/EVloUTBne/HDAylygTljrw5hWvUnW9hAG2zw==","shasum":"34b8cfb3b0309ae455c26d627f8bd3f0bd2de914","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.84.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBYaUCRA9TVsSAnZWagAA2p8QAI+y5REKFZp4Zw6+1AT8\nufnXlVcKjCvnTWOdr44GBsOY5LUOPG3Ueq03QKmRiOHW48HmhwsxSxDSdFvh\nY851WJBlZSBBHQzhtKq/9PCgaHFFd7wiK54QJcKzLPoSCtLvlRynTE1UTahr\nqii4sp3U0crHNj5rpoM2TVFSVJ+MxQulneZOV+CBNUJTit5/40avx8YkDSBa\ns6qEdsP8UJlgTcusZrNk/GY3IYzPjZtU447SxEx0QB/DZ7BjJUamH6hW3OZW\nGYBGQyRvr7NJPpC2wjWSUDZpkA+9NPclXFUf2GSzIUpuuTv0cYkSslf4eAIS\n/kWOuWGjLRWWyfC+ZjvNsboRrK23TtBF7erezkt8fvvQ45kWYBS/nF7nKz+I\ns/uQ+01sFos96YldA75n/6VnZbLI4lFM0I2cIwIDYoYJyQzO3kbaVG8DkTyE\nrHdW8sPEPn2sEIGV+mi+ReJiBqVVd2NkbDFwHC+9k9gmGxEIMbIZBrD2pOGT\nZ5nf9AP1Kk5K2joN38wjftDidT1sQmuL10xu5R1RdlFpNQEf8ORM8gTUtst/\nZr4FdEQ14N0UqxjHdBm9vBbPKjIuvfTEuJ7hlX8Vu4pynPXJkod+z2Rleolp\nmYx2Z6LyxsE/AlSoFk4B/ivceNdbeQ5uN5lhBqnmh+OWM4OIb4cPv4/DeBdR\nVDcm\r\n=5XNy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICR/63MMZTDYWepoPVakPiwoHFVfqvVMNaUMCkQ1HRiNAiEAsrW3Q/QXIyrp7Jvgi0yWeePkCdSMj5Dq3qWNieAuP28="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.84_1610974867477_0.03559256483661666"},"_hasShrinkwrap":false},"0.0.1-nightly.85":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.85","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c17239572af7c57e9e0361a608956a8f89b9dccc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.85","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-8P6aQbodcE7A31c7adiyuKPQ/nV795feGkvCVpz6CKauB+0Fwf61j3qpSYMX/BNtGNN/nQhVFWnNKL5KJmK9ww==","shasum":"af91a978a2a3672bbb11fcfcdd307fd0c2ef4d91","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.85.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBg95CRA9TVsSAnZWagAAjREP/R6SYruSjEQElRNnzJTf\nxQZ7VI+ESUmnSQlUzLviqPbAndryOQgjtj9t1XfusvKG+is3rDuXeHK9usJq\nzStUEuC99h0sMVSlFkEY3pabsKOB8Y5HltYyd4kziTDD+aQFCTzDBbjaOcWl\nRJQnSaaxb+Ld3ZLPHPzMMVk+P6u3EXHREIoQVub490LLQ9uVK5A8cv8mbFFt\n1ToHJkp6vgMXZlYE8KbKpHZ9WKuI39ZBnKgfmKI+URqA8f6OqQnaWFzCkxwF\nyo0HbBb4jiNjMW9MwwX1D2o+FB6HdRHKliPUWvcse0ZN/KeahWLkq427YHbr\nFWn7bVWnatlpuIHmBk0IBF73Py3Mc8ROHTwAxAJBPmbyvhzYA4qHB8DfFPwG\nZn1ewFL9l0itdaoZGyUnJ9CO2OBJ+K8/Rc2rQsiLPftzQ1PTEaRQ58+dhdM+\nGtI8HgGkK5zrFZT7QFeWGFNA9NQSEhv7tWcUZu35TZjVtQ5LCAGC3X0ki/sw\nEWcN9faTmPbWZKi0rYjufZjl9OcEFitVm8CLAJAE6Qt3LiciZA4SFDTGMUpj\n0nRsdiceFEXw87mDUkuo+CI35dloyJVdLA7D57p6eYtQHvDgpi5FMRIIkvli\nxWc5jLm5Ak5gv7aBhMvmkAZ1bHVdj81rylNRnBTpd/9PvWDOMyV8PyL6178T\nG5zj\r\n=KzC1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDsr4AhFV1/f7tEkmjryoYkeJUIFF+sy3KUdW4EwS8EiAIhAPS69AZeu0V7ntpSFj6nlxbumByJ1zjdrDTphOXymPAM"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.85_1611009913295_0.22070060245974554"},"_hasShrinkwrap":false},"0.0.1-nightly.86":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.86","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2e72eae6328e418e15fb723bae6ff47e4c7d2bce","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.86","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-FChuxy+cV0NI9/TJYs8Th7m/OIwg85ARS68KEShRog0LUUhEKKrpCj43/T8fbnEZudj4628cfIBXu12SP9TrOg==","shasum":"4970eb5d9f38958853eaa175aec965f52b1dde7c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.86.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBjCvCRA9TVsSAnZWagAAxhQQAKHP+St8WZrTV04K4Uqr\nYit6Q2ERpk41A4N6wrD3P/DKRiQVTdkBileshQmNFCD1GjFTTS9JD5iUzdFk\npYCTCPozEZOgJ8Hxx4jEnfjMVLzCX+nw+UJXu6zHSppcGjiTjZAP5KhN5BWv\ncOVDKAo55k959jdQi6T7R2xlT/c8f87a06lp37utD/O7AYHpqTCOZjR8yxhv\n6UhHzO1A32fHE5snQ2bnezc9DMWe6RD9C4PqcFWTBYcICs2Qci3zmrH/8WgY\nBtnR2S4rig+IBDvsF4IlKztMASQjRFHUKKo0qDh+81dtm9CIPCzLGuBWeYCB\nLGnejlbyp6DCEQ2hqDlVLje4kXurgZz4R+kM1lk/zQhn4/xTIBhOX/vjGSwb\nRg93iYkLeKT51Jb1VDQepXJ/nicCdbdkxU8LTR+1d3iG/P6JgdXwgPBXM4tm\nHvN52Xn+Nd2WkSIWO5xeNodhSeZUpdpcaXLoW+NRVHVJYoQCZ0S8R9M5YVQZ\nGZ4vn/RiDcFWZsxFIBxh474ChPnsKkWnJflvOGYqOLet5TW4XY8jt7xobpSK\ny5VdUeO8nFRctwy0hWN5oexV7Nu45KqhqKFha12K9WRdL/s1p1Zc71sACqdZ\nZjeSgUOpvp4DMiCzlS6rMioFJaVKzSXjEiZ4+gugLBGr6UFzNclyzQ6hx3NV\nWVGZ\r\n=UB3F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrG8ItamUSjG3cDEVzBipjieXmMJy/djLLa66FjDE8BwIgW6wgQP0pwpaGjXhF7d0E8sZm+eIB/tLMz7uf31DaQ5Q="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.86_1611018414975_0.34599242634661853"},"_hasShrinkwrap":false},"0.0.1-nightly.87":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.87","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"af5d390124f8cc4a373f0d5319e0a754505c571d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.87","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-3CAPHmze+v36NId/B/Uum+la7RTfwLW6jec6Edw2vmShL/9+OGPoGOfiX2AHwv8JSHQ6JCK1A5L/Nt4is1FNjg==","shasum":"96dd93beac9774e23344e63b17d84269288dfd66","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.87.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgBlz9CRA9TVsSAnZWagAAH8gP/3mHiY76xIZh1oErUDmG\n9fY2jvXzAsOgRJJK0XowBJ7fQ5MxTqTXCzdAbLUaH4N+0joJcx/urUE+lE5+\nfo3XIzm+s3DDW//fRBq3Lo/gX50gJStfb4KAh9laDbba5YSCg+u7WuS+/RFR\nL+aXBNGchOYcvrXGEnr6arzcEwSNKtboztwmjTg2O+rdK7i4b/5SSFKTaSfI\nyCKS+A88KvefnvYOysU0HeqPfLjBLY9052MgtDsx2BSe6SkmruChyWB/o0sJ\n4mUciRy/oyDURBKCmr2L0gAawS9MvaV5KdJf685NIJ8r8qveDxNpgYCYFz6O\n/0tdC4VrcLgjN0tIpSZGLI7+WZZ0StTFU1Dce4GJLJRPtZQaiqgM98lSm+Yd\nYrDFjZJOhX2uVVAzN6CFAZXWAGKB0jquvcs/vSycRPIYGuyK9uLAjqwT4BSB\nvRlz6+SFf+LCltf+u90qz4wT0sRbHfprhFkTxmHlxJMIPUczrU4cU81Mvxzd\nUsTEFCbhEtOnjiGMMrGbUaMa4CguyUrkozcrQoVGmsQIvZAU4eUZoGhdVbDN\nQ6Av9l3VNPqjbXeuGeXQlcaOgLtdqvDHChIIuY0GtRAIqO3g66jBCAe5hbhR\nPAWsA+P3p1BozjwYFEq0cUhLGoup10DLRwZfIqciXJ4RngOI3G7tOhBJccMK\nLf+4\r\n=Qbop\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETCv+vMm3nA2yRz6x7JlfUTcU3tnIcNWUlN5BKijMhtAiEAzOBYf1Eqi+M8lDgaZksn10Cu4r4vrpp/i7rlBGcVUHk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.87_1611029756966_0.4085330653996597"},"_hasShrinkwrap":false},"0.0.1-nightly.88":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.88","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"adc0d08cc84618929857795347921df3d8358432","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.88","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-SQ+Qs3PPObr8kAk5VqiHRN2RkDH6XhQXK0Z80jQ/7QqAIyRelme/GQaAPavKNTxm6qNyLYEjqjAzi3qzgJDQ3w==","shasum":"de081feb6eb6dacf16ef1d484d812ae7a7e97c16","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.88.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB37LCRA9TVsSAnZWagAAD/0P/2lJeGprDuVlNHBq+/Mk\nfVESaDuNKhcsCHFfcmYnRvGWF+nR5oG7wmSV4qUZDnAnvP28aXVqAiCnXCnz\nq+q37TkPF/WnChn13wTJcMLBu4LIWOsw+4kgfUipjkXObiWbsIZjVmR8d3w3\nabr//h0NBoeQytgSP2Yshpjtu4qx5SFiiXTAOxcrGP/49EfGfFLXtzN0gbs3\nZXaFzsrfxO4ia/fr5x0XSOHrip+zE14SODFH2EwwYQ7asOUBG0tLPHiHeEEN\nzbyGPnUf/cz32HPSTfrJCd/dYqww5tDPMvt5JS1VmGCfS7OneyPN/0PuiDlD\nvAC1MjwZmkb2JtmHOQEXm/QIFjOBEEFcUGx/5/ri5RucNJHldNfkJRpdke9y\nMYSGITbRpQBReORGGovS6NYOIUlVWlmnk86FtJNChm/8mvOoar9a2NABNeHN\nZNi9FZeCrnq6pVu2jaUgIaKl14TvjwJLJnDX5xzAvsONVASgm5BQuWKUQ6vj\nUNNez2NbVcbJ/qB0HGhQl6Ywzxb5znlNOUWFLwnjdgPQ0JlcHzPTWWfvQ5jK\nGZd0Ap93Dag4+pgYY5aQ4CL03LFnmJRnIWdqDIho7tvgcuu62u4xq24lHjEE\nxF4+qcG/xyxghr/M4K6JOikG1KWV9bbrXzAaPXKyhZQEGBjk+S9LJhpCPEW/\nc3/b\r\n=rNJ1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD/EB91bDoSjrHyOBVKgG2jQbupDKmoZnqTonJ4CKll7QIhAPDLmq9aJjVazC9jXL2QGc79fWN3kjUk9+oldAqN5+8z"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.88_1611103946970_0.6472209014869674"},"_hasShrinkwrap":false},"0.0.1-nightly.89":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.89","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9a3da2845c4d30f482a608c71a146a41fd79a783","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.89","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-rlumwIs+ABMb2STAVS2J6x11r6nQiU36aAEwm2nKDXIoK9BbqExQAWMmBEF3z2ofOrvZm+ZkRiIdqog9QVMxgw==","shasum":"3c3cb19e9e4fe5dc605830b11f27b0a99517bac9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.89.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB5dwCRA9TVsSAnZWagAANbcP/19GNnEfeFoYsKRzaVMB\n7l2k9Lh0Hd6ObyC8rzN4Q/3UAEgvQMFBdbHREgcmaD+7KDtUT6BgVJty8K8I\nyjzSqEBP+0NEhJqp4pRQ6072bVg4Xv7N+cZS+pY+TdcUpT3OHdRfuee7gMW/\nV2Fox/dxa/eFi9rjKFJZ+JFFg1VHDXPDyP5gbR3qNuN/FSfimrdSLDaahNnU\nZH0zUEw8FoQsyUYsRgxTzbBKHjfWGNANvbrgvsINxo9CVy4rZ4HGLmNWv9SV\nZE64/iB90NjIwSY30mYGDNhLjwuQPq9R403NlGQxb8wE0vq4V4YMzbW8UeFY\nitQ23sHJGp9Whq1bM6/dm/SWl5H1ovxiP6X3T3OArFTf8uWpqRpdSs0Yj0DG\nwDEmHbtxrzEcGpw5CZ23ZAMtB/1jgI1U0qv0PUv4c8ppqH/hZEWr8weNYvre\n62aAFCWUCkFVp4+HyTkoq3uGLnfjxhjMqy/6fn+YREkT0LYRSvgHVNU5kE8L\nVWckPPA39zXu4vucE1PJfar7SD+nzvIfovD/4X3d3cHGo7/Z/JL7ix3YyBlC\nZ5xBKIjUjJRe+/uW/7jei1pElAsxW6x9PnMZ3ArkDIgRh3cwIwg9XHn3aPJg\nPAULjKVUmYq5TpKPZ+cDr7QgqNOT5z0hNNA/erh52//u+HMUYaHlEbi3VYHG\nQDDM\r\n=SA/M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvG8wgcd6vjgZOebVhZnzDBWj3uBKXtXQ8Wsw94VC+6QIgEVmDeUuizFaxlU4Nw7BKEbwWqghXQ+OC3Mz/5fZYzSA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.89_1611110255613_0.5458306040539842"},"_hasShrinkwrap":false},"0.0.1-nightly.90":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.90","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4cd290cb93e423bbce9f7d9895cafe41301ce708","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.90","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-oMUd5VSlbKnJjCzIsleTHMb2GDVRKVX2zBeHcnjFAN9MfaxOcVOKMzM+zSd3L3YRevWB5F4BVWzcaco3fRTtKQ==","shasum":"70448862a13996746bfb68e16770ae4b454046c0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.90.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB62OCRA9TVsSAnZWagAA83IP/3mO5HmfJT0M4C3jxkFF\n8Jxt+mpGle/FNQ94MVK1n4lP84npnjiljoGKJQ7GhJnfrZtwW3qVc3E3kmDj\n9C/dM8eaQ+Oz/MhsqjhlzjLFp3p+DcsdhPBRFRVaO2PIVe/7SIz2zTncFM9j\nucBq98aKcYnOSRPJahjT1D9QtfXb+9LVreoPcd5SbMTcpMtdPOugk1OOhPT7\ntZTe1hwMGYFmPNiTF6LR74qJJtd975fpISTUSv3onjJcL4BjvGdOnatAuhsn\n0sWY4OJUj4TXcW+1syBbR9hK9HiY3HYhnpaEZk9F0XxHAfBVHnRMj4yQQHcX\nqGZj+hAE478oo5TXjIyYhRpVwu7FESs1/RzSX1woPASEBUcENXx0A2nun3v/\nsmdesyTWuidxEYzaToZ05FIFrDFGwwlYLhzpdNiU+xWU0YYElLNAcDXk7oNo\nQO5XeKzJdiUCS63rxORfRQQZlMU+jgbThZdUf4cFvFDa+jp/uIxDIHbDZNbV\nhc9JTNDmgwNwRExhu6xRfm+pd1xehO/vF5436/1woaTLAaFnnOQ47RQkvXSY\n2zNJR6f+6S83Ih16Vd7GpA3t7zBCOI8GAblYB4bghKLmV2TjSkJTtuIdbddW\nkY0hR5CEl4uBGj3bXMnbrPb+Cd7NQ/IGjrQureV4otT/AoEvNROcjCEMnvi4\nc+zE\r\n=wRSt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG5WyHxZfd/EJoni5YMZsUQjWudybGw2VGMghBfpl3K8AiEAsDANvDr3RkZUNwUmGnx6JkAeGO0FWuGanDzuXNixHbs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.90_1611115918054_0.9517417003210531"},"_hasShrinkwrap":false},"0.0.1-nightly.91":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.91","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6df0b6a49ac696e9be52675f1051f383edbdd9af","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.91","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NFnZNGgrNkPd+grggeDRST4+B9CV4eEaApapkz7lOaG4yJYWEI2W9elDJeMmkH3tNLgSQ0TY0Lw29R21URHwEw==","shasum":"bda332dd069e93643f35580be5898db0e3760ff6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.91.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB668CRA9TVsSAnZWagAAFykP/2rQE3nw2i1SMuFFboKU\nJce+ZP148s0TyBJozuR45+K2C1T26FpGftK6piZQ94IY28FDGMXSmpIHgAI0\nhgVl7jbFu3mf++VTBIBIREBAc8jsD4ScmHC2LYTwvLJlMayX79qPTvRIDw3q\nLZK+X0aNCVuCUdQfXMJoJzvFGMO6d7vgoWU6INv3yPuDXgOspRyWgYdXg4Wa\n3mWw4vc/lOU510n9vE0Fim5KOYoNk9kHnm2KdJM9JUmGK1GR7Z6c8QK9Mh/9\nQYhjT6Xi+8SJneqa+dOP75+01aPIt+CDijS3cR295PEaYs4hugMncKVNd8lj\nqmZ4KroweZY4+nceF4mYkwZwUhmxXMlfxPteQlFFyykGS4inUSA/Sau7xq31\nnAyrA00ggXDjKCGpEzZjwl3DdFOou/y8Sh2ToLZ/mdYxYE3HYDJourBqwoh3\n4gRFGXEDCyW+n9xpmwI76AibHBYfV+stzXRJ/PRGjBMQtBBolILir6ZpH1uA\nr4yDygd0PZJm/O4cFW0CPYSqZXw5jk424CbQWD2bT0i/miVhkOviRkdqqYwj\nPR/mvMb2cYfhPy8ghEvo73UZrYjVzvCgOtwkRPgCpSHFeqtvQlh8uyOMDGvO\nxqcz4toUm9AvLa/H0ev7a4NgAeogpOSn5zywg8pWQQgrv1gZHMFicVBN2H7w\npbMU\r\n=PUAv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCxkYBOdw35CIs5oT6DjCblgEke1gsY+phD4HnHCU9HcQIgQqPL5+m1wvsiUtTD1SR8r/PCCPFcPpyEp2LZKAc6TDA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.91_1611116219846_0.8419295560227595"},"_hasShrinkwrap":false},"0.0.1-nightly.92":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.92","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8c7ec41e6d6815a9ce5bf42f9f22db05c0b3b360","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.92","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-+0q60sHLS85SQRzLfzoguxiXM2klYLVx5q/b3sWJ3fVmUlBKDcqzJAyaqRsSzHKBpaxPk7AMGctwljyeKq5/mw==","shasum":"6ad7dae259a2db5ca5e2a40bed6f03bf786ae052","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.92.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgB6+3CRA9TVsSAnZWagAAleIP/A3PMHCRLRu89dB6zL/Z\nZ4i64SKl5tJWSlBZMrZxwSAGwpHC1//F4Rp92yHjS1Ou2N2Z4pocLSRvjRoa\ni31QG7b4wk2JsueQ88F+CrtkcrsTmVFnkIYwVDOfz/M48Vn12zgQT/oY34Aw\nt5RHKrgfpMMZftdG5cq6Gzms9zBnuVLom8jFWY3EwuPi/OJce/PS3MtDSBay\nC7rtMUo5wvkNZ72OMlAF1+H5cIwjgyJJCyXk97ckGlX2dvtXMREQy3B406Jy\nwBnZdQEZQBTi46/L0LxiGpxX/hngHxJVa9zwyjEWqnygt256eiopox1siA2D\n3BthjTGAXuSuW3tw3uvdcBVv6f7b9F6GXUdtr2mBA49WZPpoGlL8fKWIN+vR\nhhV0YMLnUUJ3ooCekxC4YC4yJSr7YKgOHwnkI/gNhNDcEhRgbIISH7xayVQK\n4QdtBwj5MhJlTmxxIGG023xxeBmOaVr6tx7xjgm9iscpGNTQprlDP0AcJfxE\nXQbcTF7R9F0JrA4CxmKM56woePKEbhHAdQ1i2n2dbGu9JKpez/UP8i35KVDB\ntACBWxdzEa53dSxz7KTTYSSu4UaYF5phBmYG8uWy5JQ9iGa5Cpl/FyJgWYt7\nFKfneek8lr6Ayk56lU7X67cG7l8mEPVWVgUeoSIKV9G0J9f+Qh5dyGfHW3iL\nac/C\r\n=JaIT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF43jPzpjVYCo6jS3Im+vb7NHwhDOp8C2E+wvLM6K39NAiEAjUvY7+tEBgqA9q/104oDJ2OAcVXHlKiPo7NJUSn1GZc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.92_1611116470692_0.6995231257105692"},"_hasShrinkwrap":false},"0.0.1-nightly.93":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.93","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"33e56a6cd33ff7476d48cd97df0025b2d3dbb581","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.93","_nodeVersion":"14.15.1","_npmVersion":"6.14.9","dist":{"integrity":"sha512-hUKGWqxIQ80IIUHDxqFrIvQDd8SFbvtzf2uOl3VJM7wy1coLsL8zTALcsg8X3nLU1NYODQ3Z38aNg4HjcZgcow==","shasum":"7ef006a36f2c12cd0316428aea19c50d7ad3e43c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.93.tgz","fileCount":381,"unpackedSize":6027337,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgCOYMCRA9TVsSAnZWagAAOYAP/1zs97RtPT/l5i0IRC2M\n950sS7jyVWlFe1Wpzn78y9+4cLTTeFz4yjT2gp71bM8CZM3P2NoxqmVlen7y\nm+ehNWI0JjJ4DKM+SG4rUOQzIxuK7t5Uix91GwanC2o+yRqX7eBOyJ38P3kF\nemVNsDocRjtMtDj6Kuf1FpGhb3rp8xo8Y4F67j6zfaa34MZ+cQLaV8xPOmyW\n3+CdQe/BYIjSQw8VbuKnpBaiy8MgjkeAJZXXJIK0rG4mbow7lKWA+Y0+Q9jn\nNMvD8cdvzGptyDqKyg9X+jog2PTB5NFg0MZIV4jRPA11PDTyoSzNxmHg3qli\nwX4JwmNaYGUHJQkdOBziQtA/yJb3etg2bu5+6fpCzrteBv9yZKmESFfG2hz1\nDayU+S2o3NCIYyJpGVIWZBGUrSqAoc1HOhUI7A6V+2taSxAQgcvtAgsVNMY3\nYfhhUvtQ60reMWtxiFiuokWlJdt4XDOJWG2MzgaR6drrPUAWtgTIDWAXK2En\nme2cFpbpL73Ha2Vlu1d/tIVNsSfc2+LRsj7bgq9mKwwBBuyAdiOnPxav7//z\n6iHe/nZrP1NGiOmdXZ8HE+gvDAHDb9EIAyWowuAsgiM1nCSGhiFQTNXtWSBL\nMl5tJgnKvQnnAYButwLZRafY5o7/ZNZcHN5t7ZQ457DW3SSpMczJTel7F7q+\nYA1y\r\n=t70M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGe56V96VEJHzHV+blorCk6iF35TPzKDeYydic9BbqE9AiEA6VUHPMpNnWLPMIWkBATEr66TdjtAR9JHXgYdXDI/7ug="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.93_1611195916012_0.3372367061234227"},"_hasShrinkwrap":false},"0.0.1-nightly.94":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.94","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b83f7ba7e69653f013269535236b5ad624dd0a9b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.94","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-uwhn/6hh8Xuxwhs+KsCa2q0cvPX5bvGbW/fHBUfo1mgk7P43WatZIqSwA/ywh6w7fe2ujJa0geWoJF+SzQrs8Q==","shasum":"52a38006119282e1c4df695e942d257dab7e8ac4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.94.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgEsCMCRA9TVsSAnZWagAAVSQP+gODzmyTQ8+ILWK8UXxT\nTfTk/kg3c4yjkTD0iWO3pyu9xUl+r3Q5H9FhL2vdDh48D3O4OCna7W0hX3Ue\nAPiSqNzLx0vIZ0BlfgueaCgwKigb2bbKt6Yh0p6PdU5PI9XkdKiFrJtIx6b0\nxeafhL8ZZdU+XqoD8YMIWp7Y7y/vUXjdalqzrWDvXygk86tLfw7CI6il5KN2\n+7HDb/20pbEgBeLntXUYOSMV4LoEV3fTjubNwkiQPrKoqxtibBvXe5HqHqOM\ntdLHwb/92O4L1mm7z6I+/f8JGtk3xASlIc6Y666B4FSw3lDTI0dHksRupid9\nFyQ1kjJkm5JCkNvkE6UqHcNwXI8TQwTTKQcyrK/j86iwtJyD8PBo2LXMM/UD\n4+SMAW7rG1uQ5B+3RC6lrCcRSYPvkx8CwUOR/H/35sBAs0y801dyBxXmvtXE\nqfw+XuVrjcKZadqa/MacYTMyuUez6+IopltjYfk9LrJU+Z4HqfPGWnpLimMU\nmIGk9NZ0JFDLablGSObE89F+/FkTYDoWMWenvBXWtpJ9gsWDnn+oLh8IutzJ\neamW/nV4vHBKoD7nSFJGe8Tct25+tAj1sZj2328kqlKt+fkSJlOgxQAd9a68\nwzU+Q1SNeZL7pmAFLp8z5vhK67CW/04D1bsJed69Lep3+yCiqkbmnFSF23xf\nJknb\r\n=xm47\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXQZSumks1mJcaCGkLameBIYVsj3svX3YdIudrBMaT4wIhANko+NiS62RKge6Uf0T+kmlOgPZKWmA0TRG88n1c6G4p"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.94_1611841675339_0.1877787280559826"},"_hasShrinkwrap":false},"0.0.1-nightly.95":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.95","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"323784e6a60bba64eb95d8ecf46e673891ba2cfc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.95","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NU86jcVDVVEiv4TTgcbum6XI+S6h3TpZgXagCatQ2NdcFHR3I+uy/k4qUfnG2Ou2AS5ObyGOIB5GMcSYaD5JRQ==","shasum":"bd16fde0879fcbd3b3bf578872f48e726e6aeaf2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.95.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFM2VCRA9TVsSAnZWagAARyAP/2MBwYtxTiqYyawr/p/5\n8zEwH0UwGXz1YPzi/nAAn7HyRtiwr2c02fkK/MhGlqQR2By63FfQ4QeOoTND\ns3yf3iPBFq+dAkVIxP/HviJUnsTIFYjhswQ80RVcBHg2VEWfYGCQF75gpO+L\n1GLg8H4qPMGoIohGnC1EeWHKJXm6kwvgzIrnr7jTPy005p8KpS600BnWaMC9\njbL/og+M12JgMKnD4sjrGwD1bipAqQhNNrGV/G6gXkHfEdfbJ4/3P4D+Jvbl\ndyOyPPItGKRknDm9lA2/WyQLXVn2N9PLV7nIUpphcM0LAXPfedP+evn23hUD\nDXE1Qr5qyWAiPNpUtVyaS6RWWyvpr/HtN6RAdRGwn8i2hNaDluiVFb1eeI7q\nU07IV7hAyCycSYGntYvzYNfpw54qzmHGSX7X9dMQuAp4eiQD6H+TzPst94UK\ntAFAyK5nbHkTDoiG23wkXkQLBnzaagP8gT06c528WcAvU2QdUsk1PonVyUkk\nknfl1AQB/bosyYFa1/FeudZJvvxTVgQoKWfgW24I55B7Zky89RCbPfgmwGIk\nvHTrePEjL4+f6PqcFK8FfdxR8uJDEvAlUUS3vkQ1JxneBKCakXRHwDUH9tR6\noXbgB9IdGODpbuf/RDuWV8n9JtB9rpqxHmd20x4smoxb5RkjK9p968bpogOM\n08HK\r\n=Dxzh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFNRsJjqT16H0gUEwyXtV4eJQCWVaCAR493tJ0YVUTzcAiEApG9NV2rorByCYTz+/FT7bJTb2lKsmU6yFBsfcj+AohA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.95_1611976084909_0.3864902618543291"},"_hasShrinkwrap":false},"0.0.1-nightly.96":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.96","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"657121a4fd246091cc5b1c2266c3002c79e9f9b1","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.96","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Amen9DUfEofTQcm8sHblAj61q02nKPhTDEIHkhuJ9waT1YijFunEgfDV0vUejmhqaQCoOE1sol6BcaetXYrWxg==","shasum":"4161e11ab494410bca51a16198daa0fecf9db089","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.96.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgFu8lCRA9TVsSAnZWagAAvisP/0GkKoVYF+Re5X+ToLzA\nytXGVmy6MkDcCI0ZNNxGpm1GHx4hiI4NFPIc/RVRE9yTfddyyccml11utB3D\nNvSr37rnsB87L05z0EHmacBgYGNk9Dw4a0mgEH+m78z+PuTe4hLhxH1/2gOh\nExGWaHEXd79EqG/OeS0kWTZt+gHtgDo6/LE4jerk28lx5HK9vBKm+8ErjEom\nmqwiogX79ZiPRhnaXbeJFxD7MAL4GbOFw55qKHJ49lOzKNUAUwZrv0hla2g6\nxjWMn2GhbIDzFgvZfY6s7nqAXyJCQNXgGldtehBmYAv/8TkRdFeGgcxHZX7W\n12lZ/yTQum0s7tF2hXxQIVsRRkvhWnfTyyMrhBUPLhrbrY4uvfSSy3U6s7LG\nh/jkORxDO4ySTQBq+DXCXsezi0tXxim3qGrBNFtaMPwbdszL4suP7biJvnSt\nP4mBxBCLMa1OLxeQYqOYTu52AkD/F4HPwgZb2XapZlIC8hB1yQBTiB+2rOGp\nT8y3ruUpGj0r50aGo3+2tdkhCB/Gpo8/uUX3hg4Tz5tH5TvzW+wrFTkcaRY/\niTDS3eHG4+RDGcx3rSup/KpFQd/6hNg3QWG72iao9fqjspWKEahshh/WocDl\nwBoiTeWhvmIJX+JFDVFF5fRYt7dJDTWkddMCoYqltIKrSA7f1mv8qR+1iJy9\nPoMY\r\n=MwrG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwGNxqN3CH2ppxTvECSae7tUZesA1rcaFdk0pAFABXUgIgBVYSYP2QgxlVVLZUzMm3KI8YN7Yg6gQuH+uBuPpdyRY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.96_1612115748880_0.39293827309385376"},"_hasShrinkwrap":false},"0.0.1-nightly.97":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.97","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"84ee5ca16d8e3c55faa72b4ac17029eff653944d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.97","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Iccqt8hMELvGpmAZQyZ+YlhW4AI2nJgM2TAbUXw2cI/WM5yz+mKa6MSD/ShaUD1+6pbiBszOap49ThAn+XxBTw==","shasum":"47d110b4ad870bf3895bdfc3f7ea3c41d4254df7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.97.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgGAW9CRA9TVsSAnZWagAAha0P/isvBmfcx/4PqSSxaj8z\n/R6NiVMC6TNJyO6wmcTbHY6Or7+6X6nQ7OzOjjUYx526kTGsJ5DXFyLspGOq\nCWa2fKliiZb4c4K01lczcWNJlUShvMQZrpfw04kl5mu0Labmgw/61Jgcewf8\nUmO4Dz0I/+kaBWbuwFwC5mLcOm6M8q9TLZea4LXydtYdb9s9mho820Z/edC0\nc/Hh+jHPLRR0CM+GvbWCPF3B09RKUhHWPMQCI821EY0ydT5TU/QKh1/9tzmR\n8a2GPBqhaz0kjmE0NaRSu48QNHry6+Cktw5RElgSpUuJJy+TxAZ3hv2tRKt7\nc23S/k93Abg5db8TXO9LKeMY2x7ttXNiDBgUrVoJ5LBoro6xW3n6bP1eiO1z\ndb6RmKDtUArGluVXwcxSHSJShVYzIIWUE8uk31/8ddo/0m9BYiTDFM5r+e7C\n7l53c2aAOJwUln0/KazDsfud9hzjY/iKwyYwN+xDNxH/0PKS4hSGu48EXKdZ\n6vDIb7e+WWdSDn6t7EEFVARwXxH49+78SnEbpCL3p5iZcZvcZJWwIbaR46dS\n+ubnoYE8YJWCPCqT/zXC9QDCVHGDtW2W9t8jvBJDEsvp1yE+3ePYkPsYWJr0\nlaCMJ9Kcm+R5wJw0fqj1Cxew0BxZMg48XUPzfYPec4HLsKQGl0996uRGLgaT\npvGN\r\n=aEPv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9Tsbo+JjOdmgumcoK7ABva3LPnkYgSa70Z2viFs+ohAIgQROqm/BTisfnPLxytkXs7ZVOQCQ6fh4DcuCZZBvUvLg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.97_1612187068981_0.9081174903618465"},"_hasShrinkwrap":false},"0.0.1-nightly.98":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.98","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"93e2d4f3d4def77a063ef827e1e703955101ed0c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.98","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-soOqPhRseEMtHTv2284oRPUDE8J5qPw1qMLVZ9exUbZTD3dQx8IoSfc09ALUZIQvA3E/xA+ZAbBcEs4SVIAPxw==","shasum":"2f9a643aeacb280915cc38f2baae83a732262e0c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.98.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgG0CiCRA9TVsSAnZWagAAoTEP/0K6BZvuNZ4Vpi7SqnTl\nFCbg6d8tBOdg7i4X8jyOBl78gPmHP5WQmvypHnZUga7heEsFMID4bfhAW2cD\nJ4jxbv0nlmkwm2K+lZWNgfge6caxlHh2/dTc33t17ViaItAUyxOXzvO1LS5a\nElhD7gdoax/OCFTxKe7Q22JJYX9ArRdRXZdXuP0/rfXqQnGBJR5MKoRZApqD\ndPBb1qRhdiuJiIyK2rcxx/fmJcHyJNA15HbGaLJXM+L+uxtkzTq6AhGCV+Xk\nczFPKARePEwx2WJmqe1aM/l9+lTROy0rp9cwgSX196xIkvV+IOsDCC7yNXIB\nG9aN5DJ0xpJ6aXxca5PGHF+yfAF0aSzA/w+zBl2Hf/n6PrlUAR/T3nH5+4nd\n4fVtQfbHaYZBOAootOvQrLYgv/oGYcoBQsoEIWlTcBvZvFUVY87PVIxI/o1V\nwJY8GWffNoQTgyQrbaOx/cskg0y3HoI4c33UGyhEairQNDFJt32ZINQteQr4\n26a73u+r7W2DxmfnClpFsgSbCvYUnchk4Xo/m18vhrTqHttuXVXHdKXE59JF\nPpTXwyp1ugrED+DmbO46/k6xQWPrLMwMOZCjzSUHHvVyhEUkh4ELceNPpUn6\nlv1hSLmckT+g7oruM53t6xMaJyRrADJOeEiVudL6mchnYbjqcL0dESa9luo5\n/tvH\r\n=/Hyy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGijTNTF8e5rBr8tKpm1T88Yjmiak/I+EwCM2LB+qiu/AiEA3Xt5NP4GGFxj4nD6tYhHP3tbkc6fGaAJu0Eq99Tg+EI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.98_1612398753884_0.8177658943857686"},"_hasShrinkwrap":false},"0.0.1-nightly.99":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.99","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"43b232c5b02214a311a760a55d47cfea3c2b0ae3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.99","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-UAh07T2tqvJKJUgm176T5aP4lDXRzhSrPE4jwqW0W8GglWpGquawss04T6hj2ZelyCpBWxrgp9EmsWK8+MnykQ==","shasum":"3c7830284a7c96ac6398550a5613a7c05899e7ba","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.99.tgz","fileCount":381,"unpackedSize":6027542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgHhZZCRA9TVsSAnZWagAAhFkP/0lVrJSwMennxGJhI/D/\n/dd8bQFpOuho9G4aDAmPhwYy196qPkaEM2rqORXTA6LCFtSXC4qHiwxqFD2j\n+oSS82mT4i0FK5MoOGbnWMK9YhjhNLU7nSCj3hKEJgv8WUQEoW7qf0YpzHst\n5xIUcTzRFKV6xEWBt5uDC4F9LBqd35XXozA2Mapb8Cc1T1tzMGnlYh5IUiJg\nHBMwWqx7WrJVtVxIKFdedcz7RM3abSY35RpknZd+60uW4sZz9Ga7SWYQ858v\nV+hSkJlTwqTAwhWtJYCb4pal30/Fde027Ejoar6FAEb/s2B58vszexU/mJSP\nonPGfS3uYbXAb2LPrPVuU+pNzPBK5LrQNnOgClRSpuYdEDNqv3nF9rStYQPm\nXBdJOxgxnLC3RzKNtc0dogtt+Ll4Wkf7bVShfDZNbCHAH41nOUPYeorDNmY3\nDgK+RqicV7+KuatDwHRphQgXyk9JDyXfNhejqIVQyFXK0vKQdeeYBlgZTp9l\nqNO8CHg2qYIHe/6145uCcJqru6ERnuUA31R7Ud4MkriAAWfcZnHX2hCNF+R1\nObRYa2dcMGFmmzxbTvm0VszMLivqPhJaMSlljHaTjA1K4AuPmDFTs7vZm9/R\nZ377m81NUBcr8KQKABPBjsfOmTloowf2y9PYzk8AlKBlYUd5jYfwC+jKIZrj\nYKJS\r\n=WwGs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDaWg/MRSOgU1igeM5mX2nydVCWLxkiniDQOZUCncOetAiEA4TU09rg5qBOhbAuKNGqo7cXLLPB3MwfnGoq9jnkGBWM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.99_1612584536728_0.7158043226776738"},"_hasShrinkwrap":false},"0.0.1-nightly.100":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.100","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"984204e623558f8b7f02aff121163f2b02192b3f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.100","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-JZ+KXOMkz2e6KNuPcxboYepBnEO8X+KFt3fcOukpmeZ3BoIQkfvnooRgiDJA5ihI1vCk4GHlwU9X9m53MQ+bHw==","shasum":"39d00c5bf44c4e45887a2940c9f2770b50a48282","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.100.tgz","fileCount":403,"unpackedSize":6348663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIKtCCRA9TVsSAnZWagAA2tYQAKF26Srqp/G8ZWRvmIif\n6jihrNtHMx5rDe91C2K+Gax9jeavoq/J51iZyfEEGtNWkvZlrerVMnGj7qRA\nC0VdaJrjzw7W/m22cd2Hp3nUoei/2hFL1oY1cQ5KfQT9h79a6+OlajvTdZdC\nibBGJgHSjmLTBH9YfU3d71C5FSZUqG9OdWv8PiukBtM1M+LzJmhfWIWdDL2M\nZrdpRq7aW9igy066nGb4Gchuy5Oz46UyG9VL+bdUCx7rzbeT7wPzzhUPZcXZ\n5aJUGn79xfHNWDkYW3tioK+XhzG6NS4kEIX4ngtI8yDlcPMwe9TRZDK84wUJ\nsufABHBVXreSg6NiMTXT/DKtjjIVT96QKfOh3Xah7YM5tA5tgTmaKX0EBtvV\nrH+oOYb8GfvV/0vF4e/L9E2G1fGLttfs90cVxOheuZtxhC2HjXP4wwyBGJtx\nnPSr+wd58HTUCq+RjgM5ZH0OvPXDnczcKiAnlv9sP4iyuDhh6A/naHr8IGQt\nbPnq55fF3TjBM1clgQoURbqQdykvMdOd39usMR8krmds1q2y9lM6e1IEqG35\nuI/wIfV4VpiKZ2QCGJvTGlLxph96YANFzvQGG4Z/9NBZsnGoIfB3U0nyeNLV\n2lylHIY7QtLqv6ZM/NboGsIOk6GrizUoGUUp6umteJwVfFIjagv3DEjskFA2\n3DNK\r\n=40OQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICHtRWYJsu48x8TAgTUPY9EwI8aJOUI8QQQXa6+JyAMuAiEA77qYq1ZHY0ohxTU69ShXO8ciBQ6a8m/4MoHriEU6udg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.100_1612753729316_0.2671615335522166"},"_hasShrinkwrap":false},"0.0.1-nightly.101":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.101","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6124bd33af9f88829f848f096359125de38176f7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.101","_nodeVersion":"14.15.4","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0Vr9HfwSeze08SJ5iMm3U/ZlAUGJQq/Vzv+vTB5Q+vqZpQev04JDlruq7ChXJJL9CpPg0ko0AqQ+Aolwl2Jvvw==","shasum":"a2adc3010b8bf463bdbc1ff721d2bbe9f07154e3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.101.tgz","fileCount":403,"unpackedSize":6348663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgIpJDCRA9TVsSAnZWagAAdO8P/0j2NU0brLj7a91e7Gfd\n9x7+D9Vs/hIIV549ahkqX/g6q6oJ1xgTpCDbDzuE9vkYpmsVzEMQvhuM5T8B\nS7rOQ7+SRo+TPPo3ZZhz+W0nfmyrlN1pdWIaryoaTXvVStVx0EcLjdPVHEmz\noJGiktqWr6qZINl3lHhA3uO9fGJ89Ua5fXRevc4HdhEFsGzTD9CHCyZ5aDP8\nrb345I+GECRwKhwfUVgvw0O/3fOY4PzLofJiFXckHml037bwEG7qgtz0jYQU\ngbRh+Lsx2bU2FjHCdAIaF/4O/IyAifw3FeUb2yPNw5BTTmWgA1iruZm4xi/9\njtoVE4hukxMrHenWHBBsijyD7vE2ZHxtjbkjr8lo+aH6mafkZlUefv4p4HK/\n2IAG8KEmHq0uTYQmozO3yb98oQQ1giGQexklWzb4XIf5oluXhIV+HS5SnzH1\nZLkCmzo7Jrt+B/trhwYFXytVQ4evrN5DXN2JnzpvgbwhkECiRnjwLk/gOG5C\n3+7lA69fm2lR6TzEK0jt8Tgb2YYpWS9IctlLJBS7LmNMuQleQua9r0dq4T/B\nXcEpiHaB1rziKxKj3fEK764D74WpGzPjcEk3qgFMd/vR/CYD4ordnFqF74og\nZhgcAK78j22q80enET5ycw7VQ1IA/Q2XbGGWyZQv+P2AND8YvWeUD3x8NUJR\n8DJn\r\n=ab4Z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHgeZ7ScwoX3mIeC+za1H96Qlh/8tIL3ZYykfwknamQoAiEAgMUE5LaMh5rAEaO3+eDwkvvHB9+/9OTmony4cf/nwik="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.101_1612878402619_0.762770943380968"},"_hasShrinkwrap":false},"0.0.1-nightly.102":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.102","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"691525baf0d7f40612428a21d139b41a2de18775","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.102","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-AGlgGCtCo3cEe/nt/vkg2iu485Ek1VlxT329S9W8qZbwdI+IqS8+DEw0g9VbPK8HSjxCGnwN1se5AYteBS+7LA==","shasum":"ab40d8ac60fa791428fb348ef904e34df5abf370","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.102.tgz","fileCount":403,"unpackedSize":6348663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgJnxRCRA9TVsSAnZWagAAKlYP/Ro73fODJFlnGvHubtpR\n00Lltu2bkBZCAsPLXppB4EdktuSgIdmQX6MrYeS8/CVfBt0Kx3+Tm6eutY/Z\nsPFY+ou3Woqiu7FiqIHmBVw8w6UKcZgU36oL5n/F5elwmHVGrivVr46G0a8I\n2yrA5ZRSnjtqqQbB/dhAwMVxHOlbe3PlhRMvkVcksLENZDe3qGN3ARdqv27l\nCO8ohamKd80mJmcrsp5r5MUr7D253umMEkJI8fkydrKmIoUMaB0FuxzWaVAj\nf4jqsJ2blzR3bIfDBJ+qaMDT7XMhPrcCO0RnOSoblzB2ljb15Xq2G72vd0AC\ncXTtcmTFK4REzEA4v+BTTd2DqrKiVz4r4Ok+THBA5tClxhwsJB6WCdOLr7Lz\nMwqu8Kq7+hp/jXIVKnrk8o9FDzzqsHYtXJRf4brufy8B+JucfIZkYtlfOEsR\nI5LarnmqcFSSo2C9WXHTqKGdhN9RLN7We8Aw3QvCTattoLGHRjH2NgTTrPp5\ntcC4nbtbAksSFUhvjiLOF+N9ASDL/xVWyZQoCuR0eU9x/HIigx3W97ziGehn\nVpK8V24y1tiRdyaMs6DPokwShOBg+IYDTt1E+wnMC5UrbzMswCETOuBes8bW\nTdJTiMeP8wwZrz+m8ZAZVqHjFc6OJpNIQRu5fYev3FxxnqBv+D6IP3ljOfSj\n/tGy\r\n=b222\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRxqumhcYwO6zGSm4kAulKOK+hG7kNZUYkhVFzk1+dmAiApImAF1xkV+zt+Oszki8gvP2p1Mc4vlC14gMHPWvXCMg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.102_1613134929034_0.36914421712318646"},"_hasShrinkwrap":false},"0.0.1-nightly.103":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.103","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8dd7c2f4321ffbc724c625f5981e8de399322f00","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.103","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-Wh8HrL+WIxCQjZ7qmTF/81San+1fCiORzdAawe2dBpIFRw2bYlSRh2ILK9lrQC5Kx0aDoAHZL2ZlPyf76zDGjA==","shasum":"e3d083b25b5f9eb7284f55a19a0953c44a4e537a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.103.tgz","fileCount":403,"unpackedSize":6348663,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgKZbWCRA9TVsSAnZWagAAJicQAIUQwJCMaquUByn21uBR\nKg962QHPbeHbDanhF5FFMh0jh+jRs0DyXV7UPNe7bXvGsAY/murG6motKAho\nkveBpYEtDJ4YKQ+o7U7QbOMLv5wteofAhdItcHtJKAYjkHzCLuFfxYTJxQz4\n3nCkkTtiRMqk2bpTqu8luGlOwnWFqZ26jfzqZKDZIiC7T+w03guto0PNAV9r\nAlyN0dEUv3A3MDmydk7vJLdZT49jM0H3r+yIIuc1uZfee/YGjXGNSdRjGq+H\nm1i5nLohbtoJvFmqqB2c9OQoTTs8AhKSOhTd9xKti4mkIbF5AygEVZyDkSRB\nhfYqAa3KpHS7ShBjrryJMXWDqp0LmfoC12Nm0YClGotrysTv/m8brEbCg6Qa\nd7a9WwUb7y9x7P7I/4Fs+b80GwedjZ2Gj/A6Su/wNdGsDkr8huOSNN2KBrxF\nE/1jGq0K59rNUYlB2rU5iuhCN10bCv1ACZKSX1k1Hx6wERoUX1PRvnowzWmu\n18/9erkzgrsTtNLreaj9ymOEVsdwada8iYcFvnUktPXmLJl/XWnQ9T5RkqRC\nL/12kqYQkpmSqF89uMMl37hEUNYFqOTy0ZKUw7uvHTIf7aUs51ZX4yU6W/+r\nRjMKIwuk07wWwU0ZNePVnlYVhXRZpmWeSl6eUEdurgTjP3lOkLQt+9WToJQQ\nx3lo\r\n=B8xd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF/IqWeGp/+RKp/OFjrUVIoCNztMlgErgMNFLvlRf29xAiAgr3Es7WFGx2N2NP5gnWlkluhSVwlPbJ8SBC+uxoP77g=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.103_1613338326168_0.7978870142367529"},"_hasShrinkwrap":false},"0.0.1-nightly.104":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.104","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"711fb491fa060666f3a6a19e72859d92b7946596","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.104","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-ful6OTdLuaGGNOzu08aurFnIYuW4LHKLC/3MLzf5rtQeUfdu/pL4243ufpK5r92H/a3x4BsfML0adlVgdQwoXQ==","shasum":"d8ec451c334a6ca0e104da8d224a3c1c1c1f9463","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.104.tgz","fileCount":408,"unpackedSize":6371710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLRujCRA9TVsSAnZWagAAunYP+gLf6ybXDcsg6TtcO1zb\njWt7/jrgsJbwxCstXUaEopq54l09FIUM3uEYc6zS0tHxmlrOf43z+tiGH3XP\nkYMKAuzK6T3HXNEYuMYQ5lC/WiK3PR35p/Iwp/rSwwXWQ4YNi4EJ5KapWZrT\nXd+8J+fM9E1nVbYK2/gh653dHam/jLujp2Sn0/jqP7537b31z4GFGhkxuvKT\n2f9mI2fZzJYf97eT8Buahx3ca+OtGIbfm1MZDATfJOZ20c/tUIMaFhZEFOjc\ngmloXWLO6vM9QARygU9f1XJ/5trxAu9ffkJooCsT6Mxv2apjtfaR0mgFf5kg\nDZJBa89P214nvIf38dwMW8CRIzQ9biDLtu58It2qPqzRSTvK6VTvNKb3pcgj\nF0Kj1lVYsf8HZVfrDJIJVb8enO+MNK4VbYjAzsseMZNzAf8nRGI+LfbdtzKA\n4vJqnfvJVDIGgBMLpFu0trQF6C4tQvW30z9xze+7uSpgG/kEn6dWd06+mIIg\n0BfbevNdOjWdjg+Z1DHyuZ5Ukt2ExLfHx8cg2Zx7qfkTEGP6sBmpXF/pJ6lC\niEmxxtTJLsJrx6HOYHXMuvOfuzI1J66YET6wJvTmItUAxNl/bms/9NaD7+bm\nlFwSx2dHe7aXLui5a144uNnsb05na+T2qWCK4mFymXgzqy8oPim7IXH5TpHf\nuHlO\r\n=V3/w\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCW9V0HykyaH6kEk3lsxyBUBHpE+ODXHHUxQQQxmJQGNQIgNstLueGUuYmIoI6XZWfZWnD0nwrzWQIaEiEpLkgMj6Y="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.104_1613568930750_0.5774602722005142"},"_hasShrinkwrap":false},"0.0.1-nightly.105":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.105","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c222edfc0b71f63253e5f6bcea27f1716bd7f2c8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.105","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-UZiRSUEWQ5VM/6bw1v95lDt1vSFxPVLbFj22Yst8doDGQPZBgkPs1GAzk2wnQiKYqm180Ab6TPah+u9xw/+AeQ==","shasum":"9e8b5f5a0d7355f7d673ccee15a658d81938a9d7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.105.tgz","fileCount":408,"unpackedSize":6371710,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLZpWCRA9TVsSAnZWagAAymsQAJxjlT8NETBv1k4+g4JK\nIgA2Cb0WG4CUZWe+qSnoHFsJEXpx85tZr4iqD2GDvrTHCoQTwQqg+TOmErGf\nFSbVOfG4Xra9Z15LM/Fd1Vzepck41tvhOSGcHZhG2FL/Ph2KosxrxZXcY0+k\npMJw/DGXixiVudLWWgu+LUsLQ1Sdlx9aqT+pycXmdQlovTqYc5fjXpzKbuAB\n6Rmc6ZnzaX+Sdk7J5ftGspcCc9GAFyalrViPIC72ygYB/o4iF+TB7DPwEVjG\n4/HL1lhQSfnvREOBrGBJsAeYcm3PhishlKV2ugdzY8Oq0CWJXLhGwdEP9bPF\nkuFnVzEC6GHqpnChlrIBh7wL/qFMuaIMKE6sSH9k4qbKoujlao8GsrBNOFty\npOM++Il9L3WRXWVdJPWX0/s+OW6FEKdsMdZeMIY/bb2wvVazlS9vawla4Zjz\nx3YdSOYJ21T9h36wmuYNWh1UjHocoiqEQ/hHjrs2M9g0JAMO27hx5Tjuyn7+\n8tHQ1dqsS4Q/pJYWNexDAdyaR1QfVvEKS3HuqOhWiIc4JkLe7e9urnligvo2\nFSsEwlZ21dRKkDkHeuA81X/oC7SPVFVrAjE6crJ5rd6cBJQQF5PszjweDJR9\nlS7ITlEj5Oc5lxP7Mw1JnuMwztAPO06hCnSy6XxRQ+QYbqVqjfcBzAamLr48\nM1cN\r\n=PJQn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMmtL5m+xxqSftEJuGzro2FJMwZEzJRiRxAuSaiS2JSgIhAMWj/GWNGJO9tXCnmUncsZkzuhxQpsg9NzVsac8XKfeU"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.105_1613601366103_0.9045455799762181"},"_hasShrinkwrap":false},"0.0.1-nightly.106":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.106","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c41d055036a49438ad66e15ceac74b7032be8032","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.106","_nodeVersion":"14.15.4","_npmVersion":"6.14.10","dist":{"integrity":"sha512-gNctpfTmAEEBLDBrUX4buGz8TRs+sWb7yJhV2nZYpKjmGcPADPX8/+6ruc1/p37okyisROPz/PHK//V/jNl3gA==","shasum":"5f748ecc94c216896d3f26a4e271bda3cb59c114","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.106.tgz","fileCount":408,"unpackedSize":6371926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLeLfCRA9TVsSAnZWagAAkzQP/0Iz1c2/gx0SMZwoyKda\nG4JlIkWBbZ5Jzq6iFnFvWUgDpF1uciqtIsEKY9Jt+p6jtT/1SCDmKc50l0A7\nYpsAuxmXz9csKJ8+nlltHlL913Jrv0Z71xGzE+F0MPpAQtPD1T1T3Rh7Lcs8\nI43ooFh+P5OaWXPh1fRR1Aakom3pzYdYfx2X+W43lPzavdWc+tms6p6gso0K\nl/7eas7vg45ZRhRYtcnrXJFqxVl/QkkVTQHlT16ozlDoSBgH66VRlYYOIo9j\n6gAbq/BiO1Vj88oShovmx3391MZSIWLER/8bBmQGlYpomY1b0R6RmVEb5kYN\nI0nIpOgZ+HliA/L4VGxJ2zLXMWyd5cCibx3mIMNXcrytQO6F+k87oFtmvCf9\nQ8FF2avKlatORd548pu4YfRVnUY0LPq2IBtS+8Yfj52QRg1U6YVfAlVpzvFl\nila+l632tBYl1FFPer5AoNr1mbYBb2RRLkEXHhnbhd2TZCOxHFTnNFLahD3X\nlwE9dERaLiieZLpcR1xce7vvt1kFA+BIEkh71YSzMp7dDWJQTMH1gkPtZo4C\n6/jUgPsUyYQNrOegHloGkbJ4hUj94WjyhCMvPaDVa3yAn8Pqi+7DInsm28LA\nodRFMmdL+ehlsAxbc0Ao8wBQPgvg751mxtXXXNyKDZ/oA8bZnWjMTcRgZeFO\n7fe3\r\n=z8Wk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCy6RPcVoYPmAnCkC3GjBk9Jn4AAp41aw6WVS8j1p1T1gIhAOtGfLl9tSb8aBMhwpvHfUmU76zXkFUzeZlUsRDYB56m"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.106_1613619934853_0.42374980304097165"},"_hasShrinkwrap":false},"0.0.1-nightly.107":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.107","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c2ccc8cbb73556563ecf3a8de343eb010cbe8f52","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.107","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-jaqhCUNThTBhR0DfJuLmi0Ez8iXDYExFCexLMaSLv+bqML4QZMLVwpK45t1v/Wgd2pgXDKllQWePxa9/pkiglQ==","shasum":"22a8e2446728af5c1cebe0842700a2e77fe3541c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.107.tgz","fileCount":408,"unpackedSize":6371926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgLxj+CRA9TVsSAnZWagAA6N4P/RFuSHFf+8alX3ey3IHu\nG11rqJb/y2A6lp013P71tzfrae+mIfr7tX0BrJFlxpBt9Wd8DJGfE61iGgE0\nXU55kAvUgFA3s30wyjDlkr7mYEeJA0oYn+ycDXTop9SqdYhaJmCmQQtkD2Mk\nLNdwWhWi5jaYjFJM6sH2Z0FoXPSe7uvBstSoGs9qtmRhK+amnyFp9PowZ+kb\ns262fM/2brzE1g7MHheoLW8F8rtkZd11pBHIXWQ3d2Ag8IIGA0IgLLHOseLh\nw1Cdh6VQuZIkG8cE0Uj/1PgaEVrRdj7aQ6kuwT3YxqCK7W8Y7s0f5YdVUnZa\nbcJ8BB4aGdEb2TnTSoj9Do4cdHkGr4XkffF7KxWQ17k9TiSlp1s3yGEfcacp\nBv1N73GILyJhZaTD4CsTnBcQ5yt3RxO2ajiNeZcrXN9fgyBhjGyCtN8hUTQc\nYnfC6KzQqhyaFYOHBhgtuKfmfqWG5O1JzDpR61JKK1LY8zGC8be+aKqPoKj5\na90e8XUGK+TJwBVT5Cg7y4MGqp1kmG3NzFnOViN3R7IgflH+IChFcocF2eXW\nWvLRKx+jRT2E78V+wFTOaJtsZ8eiq8U/vPh5yftZikbZjknzyTw2mNBjw8FX\nJ27DXvkA39QRNh2LfsJ4W9ZVeAQh12m+AxMlM/WtjH3bUiFf52Ibk+8U8x/4\nnCpx\r\n=3hM1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDj4Tm/SwNKAyzUknZAWTcdxV2AhcGyRfuEE7Q9tiS1CAiAGN3TJ2vg7n+J3feGWYwa4RlMZnhEwE7k4tvzJHe+Zkw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.107_1613699325792_0.623107866606047"},"_hasShrinkwrap":false},"0.0.1-nightly.108":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.108","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c03022863f20bcafd4c0218d317374c25fa38bb9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.108","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-D5RHmzWC/0Qn3SXmFEmNFEuSdXdAZHPEsAtGlFPbkG76Hrq97mGKcGo185CKy0pvHGw4BK6vnZOytNZyjXA6GQ==","shasum":"994eec7d6c52960630be541ce2de8645648403ab","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.108.tgz","fileCount":408,"unpackedSize":6371926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMGEdCRA9TVsSAnZWagAAomUP+QFdIpAz2+hnWFnT55eP\nuwq34J+EEDXv7bp/jZFDEuR9imSpMnC+xABATTkEfZKw7mPlAsdUBuCrxnwf\nWJllJx8IBV32beXPy0FuflVxNnIGwEb2vrQbzPVIrIi2330FMngixR+pvgIE\nF7oPnCYKXmx4Rk9wYJSLrVkEhQXr8LKTKo+zg2YrSUqfaMWDEaH49Wnht6/t\nV58CvEGyjVP5PM7iSNWwhGCDgzsjwj5WyUkBn4S+wtBL+wfvTKTV+KvmBztP\nd3UB7abdphIMVrDQcJfAW26T91gm9zzp1gOh1JrS9Z0xuzxgrXqE/SsBaRaK\nSs8W5NdPMOfw+dyEJUFByX+ufZFZofHYK5f2WnhquawHxy4LDq0mVSlSBChy\nPgxWk3O2cBIdqxfgYGOOJAvHxMtyxJ3wxxXuDoopRIjQSZufnA0w4hupnucJ\nfLm/U+hskLzmxMWvgPmKk/kRlU89vy9bjC/UDXZZQIcsbdb0jyHUMpnbzPYt\nHrzmGfdkmN4m2SNLBCNHCyMExbYOUNsn1gySo8Vd6zBcatQH/LaQSW1Gu+Lm\nT12/r65eD5hw04AiNEgT8MljNcJIypU1ftXo66C0WDJO+nMuMw8ABYyyPEoX\n9EfutUSNwBnSf1Q3bF0666IzJNVVGV2yOMY2FWHQUcy3t5a69uLPbt4ZaBI1\nP859\r\n=fktz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDE6FfD9uxvqa2bdp9ZgOPIpL4Sx/Ygsh/sD4AyzrXxnQIgMwPq+60ngo5zwbiKasB9aXMrYwDdGFPLNpWKaXdYBDY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.108_1613783324112_0.07859711592018037"},"_hasShrinkwrap":false},"0.0.1-nightly.109":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.109","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7a7cc2a5360e42c5e8c795de2e273936c2ed8b26","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.109","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-R/InjslOMgZrG6o2q/Vbp2lcCfhBbjrn2FW5h9hxAqAr/gkghWVa5XvhGK/9ETJ+zsVeNvrWY6/6hUP+JH3PaQ==","shasum":"bf1838e67f9cef660434770520d237ffe41767e7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.109.tgz","fileCount":408,"unpackedSize":6371926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMJDqCRA9TVsSAnZWagAAIUAP/ju1SdK8iyEgL8DBoX3I\no3sNU2fHDh4Kbvbv6kRFXZWc7dT0YwE8GVxYlAvSe4bv1j9VuOWsj5Ql9W/6\nosZnuOyheIh8Gg+FZDZaP4HVipM5IIQ0Rwg10xco1DuiQ45GkK4P6UQi8fdz\nlR1Bn/Izt8p279IAeEj6MtLgRoJjt0QT3P/0Buqs8a4IOQmcKadAPA8KFDPE\nzxpHODukArbaiyw5HzVrgkGCrI6RuUJ0FA5XdjpJ25kd+kswwYcg7TFEspjW\nSa1KeoNRMntMgj+CJSW03yx6FwEW/ijnNJ2JC3V5/Hdkr1ST/wrykydzSf8y\nrirOGKhX/3M4QVv/6M7bMJu4hi3FZh9tT2zJu9SUdH6oNlPZb0/wnYpGO2vE\nl7VfzfWMtVAByJlb5jC4ic4ROXqeYf6EzB/c6/cj7TAFLeV1FQdqJo5O78dU\nzEdUZm8/1gZybeSWEvKbZQgqy0obM66bDE+cV9s9BqM5oowAs+nHYmG1jPsF\n75FAEYINE8nfa5wojDE4pq8QkilAtf8sPDdHZTvxsSFT5fH5rj5l4oOYpggc\nOlnGVSwaXKShlywUJVYjt5JGnCgwXjfVa07YSyYuigCq4F1R346nr3pO7N+i\ncCKqgnAJXXCWk0quCqY0IQ4iEjhxYvyTRZ9TVHg3qYEExNyMIkhVsjEJhRfV\nQDCL\r\n=5acr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqoc0ABojSjbq0/it+Ipbt2uUPNEpZrUYgQ/IkIuYuLAiEAtbaGI1RQ4nPMsBXvMK5uY20oVQaLNC0lzcOBi+ndT5k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.109_1613795562069_0.8242573265053614"},"_hasShrinkwrap":false},"0.0.1-nightly.110":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.110","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a0360a23fa55c42a70e8a50ee77b7f3c43eb39d3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.110","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-/oI7Ofq45jYhVK1FOogSbALA0HAbkZHwh0MSAvZtZFlcU5pT8TgO9HGwS3875IRNZqC3Ipf6KheK0MruNhqM2A==","shasum":"a62d6215a6ed79f4abe838b187be62e0bba552ab","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.110.tgz","fileCount":408,"unpackedSize":6371926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgMy7PCRA9TVsSAnZWagAA5coP/Av3bmShItwzjDhVUulR\nuwNlFOWExYcKFVFURUdaxWgvC7RDctqYLaZDZ0O2QvaUb0FJWK9J422gXMpW\nowJESNkM0/j6Nh31ZmuXZsiP/AgrItfdtDueooIby3fSqMYG4/eN/tqdlfPK\nDY98QB32SxmMIvZMULbzP6AWPE4ar56rEGi6+RKtGyxOaWJWYuvQVnZjHpog\n9EEaf1A2gC1ygVCy+z3QJpUFrcSjWDJZ1HoDbXV7+DdR2MaQAFiHTgRQ8FCI\nh3fMf0SBpwz4xIJtQr5W148gUMx0WzBVZa9zoxGpsda/osVPueAu93CviKl/\nTIVWVYIBVaIgfGWzTpmSpIktJ+bFOP4cc5oogxvOKoa86HOeuosZWpfObty5\n/q7Cdr9zbBf3/7yWfE3KvB3z/AQ1NuLif/vuO5OaCvFFUIqta63rlHQlEC2u\nror9YDLbyVoxWpx46hZFp7abrcpj9XeScTYtXC7dJ93RwFR+vKaDAyeqwMI8\nIOkwoe9qR1hgGlsYIoYJSC4hdAI9/g1bnwTDX1VTXAXgEivGlm3pZE6eGcfE\nz1+3OYwtWS/7Da4443se5idTY6JaIk6wA4PYw+EZwabTNrpdy1eAIBNxPkY1\n+n3ZIrTauDguTFNrhpbccM7NXAqJrYL3Ef5lbyxOxgie2PNPlp2teyquV3er\numnr\r\n=h9Il\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDZeLAaP4mv5Lx3gXBgevTi9tvrO5a8mXArseqlt1KiCAIgJAkLymJD5+1l/06i0G3RlBQ22DPkg+1UiLNo/WAcWYk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.110_1613967055162_0.02537959129658174"},"_hasShrinkwrap":false},"0.0.1-nightly.111":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.111","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f30fefee3f95b684ae8bae24f8710d87a6d6ba2e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.111","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-pGhU2oTkwgwc57j73PiTbwHDyS3O4JbufGadmDTyOtmu8y8SNIR+EXAZyBhrw8lk3jVjZLsuLT3AZfM7fzKCpg==","shasum":"a7d7809d17c95a7f340dbd3f7f4e15b6a71e6f8a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.111.tgz","fileCount":410,"unpackedSize":6389406,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgND9zCRA9TVsSAnZWagAAWlcQAJCUHZwUKem4kqRPqxyL\ncTdm18mPvSHasxQSejBn6yM8A4nmoLajhzw63otH99bao2SPojjryQwYyAdz\nW9Akk9DOG3HDImoWZsCGmCo2Gl7cGS/dtF9xYytrGe07rnh2BIsSoB3JrK5I\nBV4JGey/vbavUh5HtEwI4M580e/GlLCmSnYSk8jO0e+BjgWHaAlAcIyIdVUU\nc+ZDqZRdNZVo8+SgetWKxWlMclJZzzGHeudTrxRt1ef/kNCI1Njj32qclSKA\n+ge/69u7yZTn0qfxOvtHbk4/FMmjQK9PgBV1Kq0z3JGMgDRbhnCV1J2pGH22\nIY9YCWRUu+YljI+AJ1+1QwOUWux2LWsHGQFdR4XmXKLxyDPyyh9wZu4oAy9Y\nsIj0TjJXeeF3u7AeblQl50evTxaqhbX5pkYHKfxYlH6qu7HYNg1At4sCCx90\nQFdj8rMJVDuK+S8O8X9io6vxWQN32ANN2qWq3awhWJR08ve2OY0IsLWawpAk\n0FxBVpkzk9oQAbwh7SxboX5uaPsINNXUlRbz5ssER03L4zO8AYhTWZqWQhNe\nxHXK7q8OyWo4y/Ky+Y0MT0xKcTjyZeh5Yf7s544YCDJkrv9jn1Hi6hYbwgJ1\nizH2GErySUPlnqxOVfDzj9n4SQ66AZ0r4UubD61HYDxFq5F5HMoyzDt8SrS3\nwoBb\r\n=HTz2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFx75viSNPeP5suXQe6T8H7MgR50pLTR5AYqqrzWQTEbAiEA012QV9r1U2D9la+fkJ1vv5T4MnnTx0QXJxrkrLOgNJQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.111_1614036850431_0.14208217992589045"},"_hasShrinkwrap":false},"0.0.1-nightly.112":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.112","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n## Binding Dart Code to Guest Code\nHydro's binding system is based on namespaced hook functions. Marshalling is based on a system of object boxers and unboxers.\n\n### Namespaces\nNamespaces are objects that are always available at the global scope in any context. They contain other objects and ultimately hook functions. The namespaces `hydro`, `dart`, `flutter`, and `http` are reserved for use by the CFR. The namespaces `com`, `edu`, `gov`, `mil`, `net`, and `org` are reserved as extension points for user code.\n\n### Hook Functions\nHook functions are functions written in Dart that are exposed to the CFR. Because the CFR is based on a Lua 5.2 environment, hook functions expect Lua calling conventions. They must have the following signature:  \n```dart\n    //Functions in Lua can have multiple return types.\n    //Hook functions should return a list of length 1 if they wish to return a single value.\n    //Arguments are populated in the order that they are received.\n    //The argument at index 0 is usually (but not always, as will be discussed) a reference to\n    //the object calling the given function. If none is given, this \n    //defaults to a reference to the global object. This can be thought of as the ever-present\n    //implicit 'this' parameter in Javascript. In this case, it's the implicit Lua 'self' \n    //parameter.\n    List<dynamic> HookFunction(List<dynamic>);\n```\n\n### Boxers\nThe marshalling of objects into running CFR code from Dart is referred to as \"boxing\". The CFR only knows how to deal with instances of `HydroTable` or instances of Dart classes which extend the class `VMManagedBox<T>`. `VMManagedBox<T>` can be exploited to bind custom Dart classes and will be discussed in its own section along with registering boxers for custom types.\n\n### Unboxing\nThe marshalling of objects out of the CFR to be passed to Dart code is referred to as \"unboxing\". Strictly speaking, the term \"unboxing\" as it's used in other object systems isn't always the operation that takes place. For instance, for interoperating with Flutter, instances of guest code classes are usually further wrapped into instances of `StatelessWidget`, `StatefulWidget`, `State`, etc. Registering custom unboxers for guest runtime types will be discussed in its own section.\n\n### Hello World Hook\nExposing a Dart function which adds two numbers could look someting like the below:\n```dart\n//embedder.dart\n...\ncustomNamespaces: [\n        ({HydroState hydroState}) {\n          var myNamespaceTable = HydroTable();\n          //The \"org\" top level namespace is already initialized for us\n          hydroState.context.env[\"org\"][\"myNamespace\"] = myNamespaceTable;\n\n          myNamespaceTable[\"add\"] =\n              makeLuaDartFunc(func: (List<dynamic> args) {\n            return [\n                //We're assuming that args[0] is NOT a reference\n                // to the calling object in this case\n              args[0] + args[1]\n            ];\n          });\n        }\n```\n```typescript\n//add.ts\n...\n\n//Because it's impossible to statically type namespaces and their members at the Dart level,\n//we can instead define only the part of the namespace that we want to wrap in\n//a statically typed interface\ndeclare const org : {\n    myNamespace : {\n        //Declaring \"this : void\" will instruct the compiler to treat this function\n        //as a free function and omit the implicit this parameter when calling it\n        add : (this : void, a : number, b : number) => number;\n    }\n}\n\n//Finally, we can export a wrapper for other guest code to consume.\n//We leave the implementation details of our hook and this section of our namespace\n//up to the add.ts module and present consumers with an opaque, statically typed wrapper.\n//Even if our namespace was more complicated, we only need to explicitly declare the \n//parts of it that we will reference in the given module.\n//Because this function can only ever be called by other guest code, we don't need to worry\n//about \"this : void\", or it's calling convention. We can write it as a regular function.\nexport function add(a : number, b : number) => org.myNamespace.add(a,b);\n```\n\n### Binding Custom Dart Widgets\nSee https://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1_test.dart  and\nhttps://github.com/chgibb/hydro-sdk/blob/master/test/widget/customWidget-1.ts for examples\n\n### Injecting Methods Defined in Dart Into Instances of Classes Defined in Guest Code\nTODO: This is done for `State`, `Future`, `List` etc. Explain how this works.\n\n### Allow Guest Code to Allocate and Manipulate Classes Defined in Dart\nTODO: This is done for `Future` etc. Explain how this works.\n\n### Registering Object Boxers for Custom Types\nTODO: This is done for `BuildContext`, `Response`, `Future` etc. Explain how this works.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b67911dec8c33f956faec757e2e20871f514beb2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.112","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-l3Bk8puBm2pWpsNnJ/GImWQUx5BLC+I1IGyhicr1430ML0+3B0fxl0p8wp4jYBP2S6nT7eLTqiQj6MlmDwRLXg==","shasum":"587f8b4d0377393820b4718ee5a5da94b181e8be","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.112.tgz","fileCount":410,"unpackedSize":6389496,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNFcmCRA9TVsSAnZWagAAzlYP/3HY9OchpEdHJ8J8T95o\ndKeky7P0vS9EhTIDfEcMXJREi9tPDgt36Gu51FzOv77W/RY8vemwp7vqUeX1\nr4wAjOzQdHS4QQl5oBA8RzzCcIxy2uwXaLy6Mlb3z5lMriu8CPMJj1udlZXP\nxW7dgjLPUQlrSZUGjBOagNLiV1WY/MSP2hG2MjBMcR8ttjbQLPO4yp3qehp6\nD8mYXzblu/7nO7Gflfcg8oAlMyl4z89DBb8VnY0Kv4rL1oS5CQKfZlFioiAC\n1MOnpYiKVJb0NTUlt+hwNHENzfm+sLrkgEFs3zZRbbptrIe6Tbp4zWTTp97v\n69i1Ek6jw6DVKJ4KS6NGYTNc7XsoWGUx73cXA4zsuAAPWcGrhC6gC7qnNsDW\nwlYsoUrj+tM1f6SOY2qepjxS++CGu0KbsDX4FNkPeO61vpjFngR2b5yB99WI\nek+B2NfGeeSXKcEP8NWPdpDAVM5BdIDkgWaMiY0E6H2uipl8JYWe2oJunlOE\nAn9sQmsJ9MdfItQ6iB/wPkfXZpnq/BCoYr07lwa1Ayoq611Ji64JezwBseji\ndoum6sZUTamAUjdMR7N/mlXcEc3+j3pCqaomiBOG9UOsEdvGUHj8uWY0PnuI\nRDIWkqBpMIXWxp6XG+VQ0PPInTHy0p9pJn/BdETbgXQjrgBBJZVv9qZiesNu\nOEWI\r\n=bsyE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmMAbnTZhMT/I8qhssZ78TOrVhZ6lRAvB+0gd6yx1swAIgGaXNmh1sgBb5xEMpbey9kppFFiin1S966oMSHOWL054="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.112_1614042917813_0.31800048900212197"},"_hasShrinkwrap":false},"0.0.1-nightly.113":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.113","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"07dbe9291451c7631078ef2e943bb9b3f47a998f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.113","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-YsfPygT/SHtUF0pjlnOoB9UxJ8SQFrEho4Oq6OuOqvN++QAtz0pTBp4bI4wR0v9RvG29r258sWIGSQf1eX5P8g==","shasum":"1ce786f25d57a957c08378e209cf0388f8918803","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.113.tgz","fileCount":410,"unpackedSize":6384717,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNFh/CRA9TVsSAnZWagAAQAUP/RRSZzW2ZtpIuUs+BCAG\nRd2isl+9+wghaSeK5Ngpqkj5cLQnKmv3+0vq8CKdGSfl7bsUJILysdSz7Mwo\n9mk4aAF4ZEoPMJFDmEaa9wCVXLNumsiTlqQDT2gen95abniJwvL3lAvPTUZS\n52Kf7wXsz/vpdoom5TfgtKLhdXblcoPahYnVucfPbOKI967bZ8c+fePZ9SBQ\nz2BeHmiGthImiT/ovOrftBDXcsradbuwqUpIPKYXK3+kTxNIumoYk0WMQtLJ\nomIgSvu9hlBei0t4kPgbE4GTCa/aPnKWkTH8+1wGK55gnvffjHYLenRSymZe\njcXNLO/UYq5OADTUEh1ITCwVlLjXHoHa2QKEeHaAOXBFmOp4r+DwxZ4z3pqo\nBuW4nlOTFieG/LBFRVN5tGRp3/PB/12uN+L34wyGSYjmhcLji12pujKSGECU\nG3IDHhH+K4Hu37M2hgLjxWde6MM12bLjEuVHqSEW3kzyOoA3Uvif1A9WJXDs\nGv3c4jjZ1Yt78xFJUV2H6ADezBOPmRYaIzyDbjG3C0cnZqgeDYfkhfmAPEMG\nyHhvAbzVAqaK+bFn+IjqHj0iZYZrCKt02pYuQZCrzV2MmDG2Ev6cEs3WWKOf\nu9NfZThH60FhM6mjVzkGZBZPwh1vRSmkYO7C60x1o1XgZ8yPDozeVIR+pgbX\nPOeI\r\n=AO1I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBwwPlr5LsZsomz3X2VS8xJKt5oVkFflpxFBIj/WXLbRAiBIs21e0nWQm2t/aayKq/8PtqeSlMPXMVOlhG4G9vf2/g=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.113_1614043262384_0.6275039237583473"},"_hasShrinkwrap":false},"0.0.1-nightly.114":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.114","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8dc857a4e634a38dc3df8e7e06d2b886b2e63389","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.114","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QqD81cE2tDSZkdjUIEzkbOoMX82nEFjzL4O1WdkcUexNa8vpm/00VuqhrHkMp0crUDJA7n4CcNmVdq9wilcP9A==","shasum":"ec5c9d594a53ad4f6f3edd67733a46514be7b021","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.114.tgz","fileCount":410,"unpackedSize":6385003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNFiVCRA9TVsSAnZWagAA6QgQAKOXNTHzdhpTN99V67uz\nUVi0qRXZAZNkPg4VPYNCxU62DRaQ79gs4DfgbVwpvcyX0NfP9jo3lMBmYE69\nfPMo6jPmUbpyv/wVKXkDrZZCrErRec16B5Uzn8A0mToV1ET/0Ts3BYHCIdQf\n1WgOq2uiKYnzTr9kIYSCnTQGz2lXSJL5tg5RgmxwOU/85+QJM2LlWAdMSzrj\nwNBMGjCR8dU16PPkk+MDqfjHqdS2Gc+krcdzkbuRuUNDKgF0yGBTGr/TM3Hp\ni82aXSNbzSR22nEu6HPdGEDd/rW0Fz9qz8fFAazKiHsOUQx4ILjJCxN8+Ykr\nR750/Ury9nR1S7ao107AdAjYQErVCjtdVbHdGYSlLCPRK0y9ya57CgSNLCxY\nW22AKVN/58b1fzrh7l0AQ0zwPNu0/mW1s5VEKLnKORQAHUGIUlrKYogxbLTp\nlT5/H23gtu/gey8BjudDxj0fsZ9ixk5XRxt38IhmaQa79Lr4BWhIXduhrR9r\nZ06VQ4smoUU2ut6giHLVD5+rwD9osOp5NKsM8j+dVlLIpkjlQHzoLCkKaUFC\nLSqCymVsIRtAx7PBbDn2ur7qzU0mhJ1gVhY/TKPD3CCq5hHIciJ3bkoozRx4\n1782KYnyBSe8m/ZvAp6yEY2weR/Lp7yJ0iEQVmysmUHrRonur9BWm/SOuBR0\njEkT\r\n=Jc4/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCZ8gQmxfEqXVhQOUPQvWlGwuk6G1kRaiLSRIMzqGCKOgIgdNg9EApx2s+deTLP+RhHuzmO97uh/xpoDHdQoPA1wl8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.114_1614043284464_0.3418404310815413"},"_hasShrinkwrap":false},"0.0.1-nightly.115":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.115","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"eea8203b0fd024ab3bebd2b863d5eb90b78c71e3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.115","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-pJsAI1fYTo+L4bSzE2+uYHfTZ1f2RdXBLHhiq8zzC4dAxjd/LDInhfjbPYAPwJHAjihvB+cetvnDra5NJN/YWQ==","shasum":"6a83ab05d89579acffca610240184fdba8979daf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.115.tgz","fileCount":410,"unpackedSize":6385003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHeaCRA9TVsSAnZWagAA1yUP/i7tJGFqcK6IRFVVuMk0\nYt92p5vH26Cl0v4UiDKHqjZDc/wcGzuj0e7KjXHKt2tzR/LjyY5eAYvWenP0\nLpEfMBS8OpOZJTYK0eZfNuxGLaxqrVE+/GAuWgLDUaPsJtW6rEvQpwHBnBFd\n9ZsJ/3I7B2X6DqaMeB9JKKT9pG1hZl1vQ6KLN4eJ+EeZJzaK0OLfYzAwgevz\noTGrq5D8i98NSNOl+85rWVb1OPqqdB1Vklov4RV0LSPJMD64xqjP7Yip+7ra\n4YhZPNexb8td7qFY5y8/QwhKQukzoCcKzR5It1wQS2saXvSTToHOErueBaWQ\nAmNXA/0EhGdmCBA3KArmyw39y+cQS7/tcYqzBMB8yrscelJrhSnj+NJN+P84\nfd83teFtnJmGNA9Txu4Tk7a0dNKGqQkZ2VYhnWDSZd/TKlt0g+DeNprhKopP\np0BOs1gm5In5FiLZ53HaKwrKRdr7DP6XvoaFnobHze5KmJ5jUrnPRTH/tSPz\nX//jaDB7PzM44EVdosi/HYieMncPzHVO7CYbvsprKPDyBjmIM613HvVSFPnu\na/ZK9s5qMfYlBxmStQUODAUFCtIb9bftdGkEOw+qTeEc0mFUna25Xc+UFKSW\n2A+lhVhqQ8ZpmfHtLz/PNW9LSMQekrpbbs071bcVjQTfzP9epsyBDRz/L+Yl\nYrgF\r\n=OYch\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgSKk5llJzelhlVnd5FzYc4b+jIKchLm3JvJtVjNc3BAiEAt9ZClFDR/NR84W1v1E04iureRt4Kr1KP60kMzXxJaR0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.115_1614051225469_0.042036393156873686"},"_hasShrinkwrap":false},"0.0.1-nightly.116":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.116","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"514b9e4026e991b20229c9d42e75b7a60915ecfc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.116","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nddO7ZjSXdD/WqWz2Ip24icuahkr+lV1Ujys9ZnGklEKU6wxFq8UnEfszgZNvnyoZwqFhTnkBhMzVyEtoq92Sg==","shasum":"f6ad18318582dd83b16486c928f2f7ea09f283ab","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.116.tgz","fileCount":410,"unpackedSize":6385003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNHkhCRA9TVsSAnZWagAAN+kP/25tnYh21Yr2fkiIb5dQ\nRqJVMq6vud0kLwguY4+JwHNv59XAowk00NsDza80w+Gh/EoDqxAp7pXp7Ubq\nCbTgptuV5PRY2Wg7+kdwR38gIDauQtipG97gCfyRJo+RYCzfrRs/Lyrd/1Bg\npYegMspz1YIODPLur3VqpEts94a5Z6ve+U/dlP0wM6ka21fyZW1EgYb7VP7h\nlxJITn7slv2qNTIrgKKwAPaC7hrj0KrF4+ikpbui/fevvb+vJYVU6orug2j2\nNAc/kqUGHGw8EVm1xOOd18+0KoL78UUbD7wEdfHYP147FCn0eTZLg75XgNKc\n3rFWrHb7zaFwqyUFOkLpp40kMObbnaZAUuI1mT4aJDffvec96Txf0pYH+XnH\n2iGg56qrhcpcbXA7Svbv4AJL2HNCKmifUweaof9IIWYoqQcpGIyeqaemldYf\n1rpRmujPSBoZApRo5RByzGaqGmw+5IUZ9fjclGk+m97pAnf9PsK/SBuGhmv/\np4bCaHHFsL6WX4wDKN9TELcffpiDx7GNbNbaChe7QGmOdDNfqsE1JaB2Diht\nPwaYoUBvI8o8C37MXCjLZ7LWubunTfIsV6f3Wad3AIpfkXWJkq98iNhZL5D6\nF0H5m4hMIEXcAij2xpv16TXZxIDsBRaCZ1sP1ZqUtoIgVsskxb3bWQPUpZI3\nN6Fw\r\n=gW+W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBdiMYrAagEe0b3g0xfawheKocKP3dsw0YpZyq4+wpBFAiAt9Mk39394eULsXoM1CMc7EIBe6Ak083bR67w1EF5vjQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.116_1614051617407_0.5624164732889878"},"_hasShrinkwrap":false},"0.0.1-nightly.117":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.117","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bf4977ddfe0fc4528248a19da967e0d220e25f1b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.117","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-t9bdSuKmX4XjVKlu74hwYhXMEdNpPN3e5gVJd+wZ0RKaIUGaW1SMVHXUT5vriYofoyZhA6k+oCoSbbxqN2nxuQ==","shasum":"c84d3a952bf92081144d62f63e1c1fcdbd7e1ed0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.117.tgz","fileCount":410,"unpackedSize":6385003,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNs0ECRA9TVsSAnZWagAATUMQAKQeiCOgOwtABKIzKvED\nBbcM674jW14m+LjPnVLkqAB8/nfARVmz3r8eEJ22TS2t6k444soHuCcEuLvm\n4AmNEpvK2zIdLf9ddRRNVhb5ShM7aB/UILkt/w+ughgxHC5+uBtxi8/RBvp/\n6Lv4aXWdzHDxZtrb0QqdrfF6KvGiCJ6hqz4RtWup9aVCZ/tp7X0T89s860JY\nnFy7mXOn1fvSzf1WUBphqWX83z7hCr9lLoumPu3l9Zp3KRS15hU6pNSTIRaw\nwZzlChmjEkrUcY1jy63GNyy5X5YiqsH3bNqvHWSzEqwrCulEqUZpufze/SyQ\n5tJFY+Cfx1KVLaLQxzp0hK2hKkMolZy8EeZ277TDu8d1qVtJ5ELiV+++POXx\nUZhgFv4TJg8b5ybFYuQGdHhhBFUsgg9yHKyRpQE+12LkoPtQdlWUGRKFSA7z\n5GEZ39KbQsw5vHLJm4iSlwnC/SfGwX2dUgGrZWKGRfiq87Cv296fxlBzyF7u\nsjKfHB6dFt1gTxQiaqZGonwJESw4XZCVyebGTzsusB4C+SNvEdciIhN1JH2U\nqI+ITI6l/P+bHxsEzgtjL9sBy9BebYJpY50jGzbD3v3uYiMsh1go+BkdvzOo\nuTNpVR3x3eoKz88cL4H5CC9fN1uEYqKGS6toPYZKOyygz6Fg4zjHcBgnw3Do\nYNJt\r\n=Q2zL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFpBva+wWadth+NRr9P97/LvmAzasBbKDVf6l67UDdcXAiEAldPDONBuw5EbfgFSHwUXmvegADhrOQY6JBHoqsm5G/c="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.117_1614204163724_0.5591527552851765"},"_hasShrinkwrap":false},"0.0.1-nightly.118":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.118","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9157937e97c72a8d710b51fdeeb0e814ece17262","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.118","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-siud1e5MCqIZuKYkbwVcKwNe0ZBzPDnUkbTajKHnTXRWiB0OmZqjzVZ1O1uYEbqYPm4cOiKYEJix/EjP4dMseA==","shasum":"3f74fc85d93ddc4fa68a8c14283acd4b800ee765","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.118.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgNxpeCRA9TVsSAnZWagAA5f0P/1GpgH/3lQ4HAy6Uapv/\nnuOIz7LXncVXDqL+ofquQk+5tkCQ/47K/RXreXMNf4gQ0JMLiTOG/Bw67B8s\ngYo+HjlLYpTMRceU2DG8b3VEkBMr6Ipty7JHfQuRbsWNgwxUkb94rvVGWYQI\nX1Ql63XTpKk88K6tJmTmEtXxiRmcudY/qp+GKgCG0s22LxEK71zB0gvgnH5E\nG+uXc7RP1OV1Meapvt3GjvzKxv+SHQcJbQRbfiOIPzzIoHpLPOS0BSvvnQTZ\nTJ90tGGHZ/3cnWvt+KFKYSVPIkFoWzWbXb6JebBg1967LEyD8DSGvW4swjI0\neXChgDoWWwLBkpZNN8SJpVY9QordBldjXJ5nUjppFtFq5iRKnEpLQ3pZkJAM\nm7deVJj2cIFMzxtmKr6v2fGe70YOMBRyofHPde9sRzTEErQaag6lCLOu7Mci\nfY33HLmZDt7Z7w13R0SMX+lNQhr1Y1Oghs/Jrj56Htb8N61h1Wx5gMXeUo8+\ng20RHDlMn2N/uN+k52WR57/7wvHUflLU6r/3ZkM64pqEJij6WtFh4oj7tGxk\njcJLyXApMI/Y33eMiXl7HfFwRd2K4EAiopXj4kEoDuWG/w8qo42RMf46/O/s\nLc2A9VVITNYHdp7o31/kcn1aDoKSYh4/F5fnoTyijwnQYxWQhP2DUDlrN99D\nz1Yu\r\n=yrqz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC7YGXLqKMa3gIPrATgQOrxiWgS3F4Bt7Jrr74DpBJLdwIgFXO8Yram36O13UyTKDHvLO9QQiRJuEFXjhQ878dw4Ls="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.118_1614223965611_0.3647171813123846"},"_hasShrinkwrap":false},"0.0.1-nightly.119":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.119","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"99fabe9f5e31ff83765a1d396f85858821779cf6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.119","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-qK1Il9qgxOXhnjb4T9KTcByeyGntZ7ntW/iSYj1slvqjaXEb1ayNWL4124fO9O4tUEKCaEoUPkej9YgO84ifeg==","shasum":"e9fb20b0787515a2d3a223066106f85fb9932fc5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.119.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPWe7CRA9TVsSAnZWagAAyc0P+wRmQxa0Yc6wthAXydJT\njA++K20fvPemoGGeh6G6cor9UNuOV0onDVSPVko+UeY6aaK1nuLS/wUPJ++y\n8iYq6HXAneWdgThuJVgPmy1XMHAtuuM5qX2G5eeooZ7WpCzdpa6krZtOmlSt\n+Cv3t4IOievd/vOG+mjuytmMRW+Le3hyfVNuwuQ6TIJK5QNOU+LtzzTK1p8P\n1eny1YSwPa8gKQvwiKm7UIdAI8uzw3U+90eKCHlpIOfuOSTLcsWiC/TdpIDc\npMhCoYO2uD6ZvK82cuLIuTtrCbI4L7srdVx/pOZSo3wbY4sC3cecJDlhlsNG\nTZebYAsMk00vf7A3Rleb/bGO72jWK1P8k7993WMywmk1wZJD4WM0/UTHbxHl\n33g3ecp+DaddV7GiYMK4pNfzHD8kDJ6tbUO5dWm3Lql+VIe+4yU2ZS/4pyRN\ngH45E61o6Ib3jP0G02BhAlJPJ+31ntZa/yRwaIUX63gBAbzYa3x+rlxjRLi7\ng0zCrytg4UV5tLGE5hSyRfdduMWraY8+lZprh9xXrmE83EymQRUTbm9e6Xxh\nsMxFK2DMq/JPIPyd44sRwchJxGv+va438CAlLMJvKWd7xUvJbdB3xVr1R/ib\n/YKoxROhJ3D5fjX+PnSVbFTWi+1U8LnyfWzRnHrDLPFNuoMyJ1EmCijk37NY\nv9Iu\r\n=vcSL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCat2VdLZyOGwWjI69bkDuepX7IlXf+3n3RdyOFp26bvAIhAIA6BAKe9shbuiDX1MBaP3D9QUqUxweMG0HggIt2GcM9"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.119_1614636987011_0.8760349787357768"},"_hasShrinkwrap":false},"0.0.1-nightly.120":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.120","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"26e89bcba083576b8b252dbbfa45a17c8f3c83aa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.120","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ENPQxLhhIhjkmpaBPFAr9aTC2AqmR7jppe1EcKcd0xGjZdj10A73Eq37etfZMO3dY9gLRpFPjMdoJwYQaFseEQ==","shasum":"46819c126eb9a5461b9a4cd1504eaffd4783d867","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.120.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgPt5MCRA9TVsSAnZWagAAi6kP/jYr1tk/5YW+qd0ipM5s\nbSjthDRijwrNY0ZKspIKXxweTCXktfcwAAhznjDvymO6AiwYMWfMUb7xLO5t\n7FoCKHn0SOcEutST5bHesuC1RWIQ5tQjpCl/DMsovRk0/ujYntFN/mtCmov6\nCEB8RaBrNkMa9EEjtRLESFR2HCBCP2kQN7YmdgsZjLomYv4cyuH4nDyH2gxp\nnx22AICillv7i4X/bDsxuldbfY50/OW0Ni07CbT7l5ag56Da5qgebYqwdCsD\n9rieungZI2y6Q4OM5Bnjv5UMeOf8e7CDftuq6RSBGASbylcRuVOQRZfz6tUu\nF3PONGGlmTFG1q0GdMUDxMHhVdP2TCSyr6xbNnreaB8vSJvfzbGWEmiXZt/c\n6yD6briWj9S7wQF8PPaBoTmBVu19R2WHlR+NtaV40MLzVx8TArvI7UDRUmN+\nnPmeC23ry5hjePJf0BxSUWKdBoD3WV5ldCy5KYSX/sCvuI9NuQxoobKj9m/U\nBNXJ/MEqvKMNSr5T9MPhgdmkZNaXBHxQfEF4d02KTo7LbjYukWGJ0EAGjS8z\ng6632Hq2jR5Plxgm27Qw/IjNRCf4yGHknVze7p6DZ75QOAHGX1rNVXUIsxlq\n7pSfBY+nZTp2ThF6WdTHIhMvpHhwr/2sguT3+q1au0bHYOclQpGcRL1yoPef\nXF+L\r\n=cn/C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBeNJ8DX7CTKFD5R3Szbc7oeughVteJp1/tT5Zi7UxAhAiEAmwfWY3uzhJlGwKQXeVSTHcB6IU3MVYNcOnGV/m82LfI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.120_1614732875618_0.3785319484780889"},"_hasShrinkwrap":false},"0.0.1-nightly.121":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.121","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"967654aceccb2caf0bfed2b9d2f61280b89df87c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.121","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0jYEKP/PHqIKvKDAnLiyWmtqcZvkWeBGaPjgWEK4DS6CGdB2Yde2zcCPZngn7eU6dJuw4fKoRi8H/kG66Z+xjw==","shasum":"1f050d1a29b039320d0ab41a926622fc94ee102b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.121.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQArfCRA9TVsSAnZWagAA7BcP/RIrCH79qDxfznFYKiap\n3CDcj5I4YstyNGpopDOlntsvEScmoeVN+Ya7JIiWNgw7GYtXQbLGdA6dOSi5\nt64zlF9jLYu8yi8u8wFOkXisvF4axYP3zhIoLkpsg6IUVj1iG1i6jbOVIwS7\nrKm/TFAsFtC3ivkkr31kH2+zqCp3nS370UMx1mkGK1RyF8nOKabJQ6/+bwqx\nYH8e0qe2FtAfgveFlpNarHg3IlkuW3N01DBiG277ExaXQOFLobMwXNlxRAD6\noaklcRmE7fAhVUIfL7WJYucp0HI0+YHkKE4T2XaxBfHYTP6plOmBX6R9huhR\nDVPv7eWfxrNJOSjLBxKwMBsLpkC64ToEM4atQ5+jLcHnfwvjp3qj+xV51jGd\najzA9oJW6nv3cGBh0H8/e2I79G08+Jzhiq34iZ8zsDOWaZa41Bx+EBUBLUtC\nwKn9wxaGm2/kMRN4ToJWIh55NlD0BCO/cS6dTwyTa/UaoWuX9P36eVnFE0eQ\naAsueYw5JfeYmbrZuR2NJndqJn7pL1e+I2QimfqDwU4qA6V0MtMcCkoHNb2Z\nlxGySkpLlrGnpMxctbDrjYwK9WZYmGnugiPkI7EktujnOv517n9zcb6Xka27\nq8Ao6mM20dEySIAE1EEf6WvbIpWNbd39lO3dJRPW/094hcAQ9C7N7t6FTSYl\nEbbx\r\n=qOYZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHwBV0lFj+JGGqnnmRcsCh2dI2XUWoY135W5cBnnskKiAiANX3CQXy73yiTYpaEEAyzW8gVwsVvyhcY36UO8s1fAyQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.121_1614809822577_0.8306870190586988"},"_hasShrinkwrap":false},"0.0.1-nightly.122":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.122","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"852785da5a29885f7716ac07b1048f47f4c87ac6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.122","_nodeVersion":"14.15.5","_npmVersion":"6.14.11","dist":{"integrity":"sha512-kUEDdrwM2ZXWWJUPGCxV+JyPT5871Xrv7aNJOwRtyFHfGcwLjiu/gcj2ibkAudboDL1bSocqUmzOvkLsjATldQ==","shasum":"2b0875bdd74ac76a221b668efd3c2b948a0e8336","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.122.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQDiZCRA9TVsSAnZWagAAK6QP/in6pmTWbRYE81zFVSZi\nILTCSPd17XXGBbg7EEr1O06N1Li7H4uX6pQieOpeZyHUyOv5cijhQfhMlGH2\nyBqejNTBeJPm8BD+rxS3W5XzG++jpkfcs2hgdY31F8hJ8IdtSm2kJF5hb56a\nc87sFyejXcZjCkgU/weo0NKkj50szzqDaDRO+NHd/qZEpyVaE1qeCiBILVAv\nmjYyumXeOFLsKR1UHphIrmxfEvfuPNVCT3LCCF4QAd7g1IQdsWBMHXaoOwoU\nsTBytZvaXmgJuIRPDMyU68AIBy9h5XM9JXG6ZbIMu/OjnwqnqodocLIFnLuN\n10WZQZ1MWlVkdiwmB4brtX8x9mFz9H1bxTlor8B0zusrVoaEYll5PUJ8yslE\ngqQ7zwcdJ0RPk5KRWNF0FZ+bxsJSoS4TZ8pab6/s8yUbVbM/COzTMAa8VmFP\nkTy6cM2hpAEleSYd5iIxGEPwga0jnsEmfNmM/FENSDeJBiBT7eHu2lGEyY1/\nPdgrOqxDWPN6fezkLFq3Qd7KewH4qhxdR/LxPLw5JtEdIp840fMgS7i3B48u\nbw0FOy9Oz4HO2XZsIrH3QZKfIGlcWS7ysQmkjyQKLtjj94gut6KL8OxgdzWn\nPjOo9d49gVutdBMxRtvwHbXbsJi8yjOcnhJSDLtKNEzybko1ocYC1TpTTHtZ\nl8Lk\r\n=W+oM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4SIh8c4YNUsESFvsAVpkC6EeJIjJht6Ebt7FekwCbxgIgAjCa0U+J1k1cOX1BSxUSCV5FvxRY7/b/Yo3qYytPwG0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.122_1614821529112_0.4476174301875644"},"_hasShrinkwrap":false},"0.0.1-nightly.123":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.123","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"24fbdb4bbac420b729e1d6c2d272f2eb52777f01","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.123","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-s38s+X6LTrPTgS5NjJiReQQ5Z2sNtcITabYjgodZKVLT8QcXIutvgzUp1pNPq51G/py/t9rtun2PIOu9aNbG5w==","shasum":"7079be6395661a027685dc7dbfe5aca4228547b5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.123.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgQbEeCRA9TVsSAnZWagAArBgP/j3miQ1RMCy9FVmVzqjs\nuTLqkEtloW94qEqsxE+XDX9fpUzY1nWh4obBCEnHta8TJvElvKi3aOEy/ciu\nrEgEiQ7gM/TrrP6GTadNzErStOecNKZeghiwccO1lG57NbxvBR3Kk37fN5NN\nY7fDZZYM2n1n4Jtdqx5jZSeBiC6eRy+nZC/jN9M9HGNIiCG+MRLxFZpmPjGV\nne1XgAeSJnHvrdR/P4F8OJ49jae017iPwtOZ4Y1YgwZySwF4CHaJeQ0z0WjK\n37O6LUFeHCvC68OfaYO+cZfWEZLBTrmS+NagwZTma/kKurCys1Qm5ZnFAbx6\nE/oh+hlgs35729el9v0ZK6ZY7NsFKsbP3chtS+q8lCZR9JLhEP/6cuk5mBdn\nUestOb/DUNsZ7jeUhWrXnjkHPtjtF8Q4lu3c4BCeIS6xQnIro3N9Ns24HSB3\nJ71TBAw6qQTPnLJI/+uo56ARLOFNUoFXJSJ70uaHOZsW/EpQR8FGcYRx73y9\nSdEGxEHIieLoRvgPlRZih+p60aDodkMwCmRmol975WIytyfdL54Ci8kwCs5W\nUvuk8jZ/IVdLck8mJ5jO676q2q6u7TRD3noPXXmoIkGIFY5aJyybrqFhfRfw\nZArUSxnQdOoP3whSR8QREndXCPWpjbtCp8GvbJcf/aUCLZPZvGmCy244ib2D\nfMX5\r\n=qUSw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEkYhDdT6jEfWkVRWKYTxS2aUdfkaaYF5vR8LUoUssEHAiBZV0RS/H4gdULMXFZOkVOSccDXBYIwyCa8pel5tEKKfg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.123_1614917917938_0.05031734358775508"},"_hasShrinkwrap":false},"0.0.1-nightly.124":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.124","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b9a0262675fa2c05d3988b28820779865dc9145a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.124","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-iT2OrquV/SNkHZ395oZBmEe3LjXM+Ux3sjpgoUe1uYD47aiYjfhIPsKxXyai6eig5yQLfzPglc3fXVVZ37m/1A==","shasum":"2b86bc180cbc2b79583f7a0739286145e58ca8e5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.124.tgz","fileCount":410,"unpackedSize":6418451,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRPA6CRA9TVsSAnZWagAAWtYP/1TeQk4IVfgf6OqEa4GQ\nq1XezPseRG+yFKTwlzHMvekEruDfrZQmffPh/BpkT9tK/RfP1euhVsyz4fso\nEvLk9P9YEwN/8pcmcz+6fj+CRxxxlZi/2mdJRDR0wUcGJGvID2CbYuLoKFhw\n2HFOWfjWb66fYpnHXuxSbyYc8WDtbFJdVacUH2F6Xv4j+c63F8biXeX1R0o1\nHJ2lyX9iL77egMsJYXh3hU9+OdR2idcpQy0rhMmEkPFwbIHp4uPbGqu2KniS\nlemLf/0G4Mi5l8XK3DhTbrwd5j9OFtXhpSwvK5i9bCntTsGXpN4Q8O+X+ni7\n5La9VrbIo/QCtHhNVwcRxlVukyWEF/seX0KOEbfUu3eVHqgkVIiyCTt4Ca0z\nOHysC78UQGzegqiJOmHug9ALNJDO6t1FpYG15wujACi9spIYZ3iHZMaXin/O\n+nVqSfIan3+4bzhP2plZsa3LE8AjU4Upkcgcj7aZrFZ7Auz1EbtlexJQEsn0\nK2uNf17fG7s8VSmxEAaS8ccpRDlQOCYEUiTTAEq8kiW33J7aGJ3mpSkiTJdD\nmOYhxQkydoyF6zVo/tvon73sXe5w96u88wjzH/Z9HBMeg9kNZp9qtY6TweaQ\nWthxIwl0UchMUBnHU8BT49xySwGteBeawGOXHE7nFw1kfKtJ6fvf5Zx5aqVt\ni/au\r\n=VnJJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOJTpJnqWdHlw47sgHVqjbB5K18RYI3rZ2JqnBkAjdJAIgJ6aRPY3OcsESFcKELejL7e/PInNbyrZNxyHovNu+l/k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.124_1615130682026_0.3519871011859783"},"_hasShrinkwrap":false},"0.0.1-nightly.125":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.125","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>  \n\n\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b1fb4c2c5ec19a7ba6d4f404eaa4267138020785","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.125","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-mVUxHfu7+3iRk9vnc8VW2k+R7JNCPnVO0U6keK9jnLw5pjXbt1QDJUxEBFPaJYeyMcTBnPMh6PhVjaU101IG8g==","shasum":"ec1cab4a1ffc301dfc21e2b0289ed1c51307d086","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.125.tgz","fileCount":410,"unpackedSize":6418647,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRqm/CRA9TVsSAnZWagAA2vMP+wfwwo3+6UEvOPKBaiWq\nQ9aUGPA86NG+0Tfch5A1t7vIbzzXUBejvbeiHSppFwPK8sNEWHg902GPktW3\n5LJN/QLhGBWZwb1/uKUSvSCdxMOdg0TTNhOsNBM3tTRO34pS7IN2sjrkZqzC\nOGSuKu3wCo3n8ttYF76GdtT1CrPiGKdNqH31CLpUB2MEkQ/xoyCpwf/DjTKo\nQCGULCQRzgCercrpGZnABe80n1EJcQZi8E4hwU3LCWoYqZn+h/gkB3c6qDj9\nopGmYI/lci2rN4cbCBDIYZN1RQgro7sriDXlwD7VWDSD2eiOdG9e7vxfhDCY\n6wHLJpIpreXiQsgmp7YnHeo6U4wCy/pBa6UF2JE830NZCCOvSN+x3BqlLXB/\nAIuWOPLeqD1UEGNzFH8leKzyNTfsN9BiOu/d/MjVZyZb4DBZBH21pnox/tUz\nnKqct4xg8JsVrLV7AnyGnIAY6f1CQQSQqdefPGa6h4bxUDr3MciM5yDxdK5L\n4VBkvkwunI7xeQicxr3jMNLY6dPrf0+5Q8GeOAPC+QSZy97eOtrlKuKiCZrq\nSolPnvrgd/pWqq5dpvLeFJJX8bDz3xMjNN8UoczypIBEc+4KCtdSk3rubSmP\nsc4drI/zD6M3TSvfcegKrtbB6fYajAKtSwVqFXwdcf6VsET3JcH94YzEY/Lf\nZpVe\r\n=ncO9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIClNQqDQSzahZxr6SOCtknCyWhZnmChmkYZaKlKXnsIrAiEAz36ZwuwPJuAeh8z2R7y2V3OBoAITNcUPuHI+uYaEFNQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.125_1615243711342_0.9164238172527912"},"_hasShrinkwrap":false},"0.0.1-nightly.126":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.126","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1b5e0928c2ac2ea8841cf4d441d27d1abca1f512","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.126","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-SSQMGfzWVq6J6jv7TnkSRmulOOD0ih97npbX1b483u7Sxws4ntMdnw0UsJgWFqapH09bnAJv8/B6R21Gy/BZUA==","shasum":"20618f8ed90a85d04972e966f4834892826e838a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.126.tgz","fileCount":410,"unpackedSize":6418650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRqwrCRA9TVsSAnZWagAAuwwP/0+ceD8BLw755odRnNaJ\n/6fTKrU2ok6yWqT4qIEADhlzqCoCAKMNpuMR9n6TBg0sk980Wcd3fFsxq8xR\nwssIehhSUkOTHl62d6w9QiUITmL1g/MXHJzTTBIzM6v3gKlKdY3bLkiz1zBt\nF19uiAJdINoiF+6YnOnXQWa5MqMe/ilJ0+5Un75mHFSCOKBGgtFUTNwxDe1N\ntn55mn/JGSGF49UzST24FWOwW7qK7EXWfMKIRlgJOjaUqaqglbjnh4W7rKbx\np+fo82Hz39c4lxZb5zpBFampZD5gXwdLACsuJo6pxV/iE0GIoD+rPKzn4yLx\nErTAg+FAKVbX+7u/NdysWn96m8X5GMC20L0AhnAfVW5xSFkNkpnzQUB9XG7w\nGSG32g1riI5SQsKiWaEnu1e8892XiTR5srp+fW7qffYRvvph/mv3WNjndvHn\nA9/iRt6+Ua05h8nkClVvy/8prRJkFvchPJ+8KndebEgLBE9FI139iOExOAfV\niyx6G/sOf2fwh6W6pducoLPqwI6VVbKO30kxNp7uMNBIcfdqyAA2pnAY5xl7\nFyS8qRYoBszYQbdegk9gTfCtE1+/F67PfzVU+zcAju75dP0cJnv/xa1eCDf9\nMwYfigO/WYphgb+2Jow6r0ZTA3tTVwJyqyX3EXQmNEA+lPxoyJEfzyTGzamc\n+JIW\r\n=LXCM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyKEMnzs6E8t4eZ6YzkjcKf8Ah0WHHu6YYdJ+SIxXjSQIgbSVNNk1nJsCuwp/KKgS+CbgsWZ/RJXcVHbZr4LMBcEg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.126_1615244330913_0.774675356232396"},"_hasShrinkwrap":false},"0.0.1-nightly.127":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.127","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ed72ae3cf32a3d8af62986efa1ef0421713feb8d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.127","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-u1TimqRIo3m8130c7TdU3INVti00p09OaxuHTBSYK0k21SD919lAV/IkUmLOkskkM4j5REipuhpOj4IgeDujPA==","shasum":"583cfbfbb13343e1d6b832f9fe6cce8d60ca1e2b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.127.tgz","fileCount":410,"unpackedSize":6418650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgRq4sCRA9TVsSAnZWagAAbo0P/jVfLXwuEKqRTPOtoVAB\nT0vWM2YUWW+Cbn/K8Iac0MHaOA9/yjaL24FCWP3btPrMHH4b9jiLQOVF7sJe\nwALV9IqpQiWoYOaTKgDg/Pe5rDNBV88B1lXfaTOkpIznWOjzaT7m0QidTGJR\nGwgBMY9+5VDBfRx4xBJqrIggUXNIfXTy/a5W0cNAh/yS8F5o2yXe8g+T56eH\nbBCLxHvrbJZivFy3wnGHAIEysEiaKqSi6yBWwsjCQzruQccmZpCVJ1XKqv0l\nxnk2CWltaDY9HgyObySXRnQwiBPSmvJPng+KxnzQXrGSQJ59FWauDjDbBIDo\nOTRMcOYtIE8DDr6LDIeI8dFNr7hGeh/CsIiih98X6pC9KpRyEMjWYlmpftLj\nPE8e+9/UyXdGRHQ7AquqV31PufzbCLUlaZxB59dfPAQUjTZ9TrSyg++fFrls\nQP8mSaCvJQUmaQiR5ylJzIERMggJvRgQ39C6cPnpvqHGRisp2JGu2SqDDQVp\nCsf6fm6bu03fXzhRltX0eP24GiOPUV6s1mTLopxB1o4S01PhE6DUaF3xfMz9\n+N2IKOR+Od5+p2So/p5Oue40LcTqT1fj1Q/DsFk6+FuNH0uGi2BDwFym4wxN\n533gh9YueNuYKtmsDzIOIEsRhTNNpFfCjAfgCQosXsXkm/+ojn0gXa9gV60p\nhtIj\r\n=394a\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBhRxkj23s7ZsU8tx4sxOG2ijYNuU1UoAZm5703JnutCAiAXtClfz9VeY27CxIXIgsMqbwpa8SF3JQOLgaVR6yfZfg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.127_1615244843932_0.42992329054370515"},"_hasShrinkwrap":false},"0.0.1-nightly.128":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.128","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d72a21dffed87352b72005407da3ddeab3616e88","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.128","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nBeL7pWcdWweSF/xUYsFiyD1uRbFIInumlcJUXw7Wz9DjMTlWuMkyaYsPhPcwDmBrwVV48ICQu8vg72WygaPhQ==","shasum":"4a416340a0626e86504f05ba92370ddd48d3ca7f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.128.tgz","fileCount":410,"unpackedSize":6418650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgSBliCRA9TVsSAnZWagAAA6sP/RBpBO/De3bOWmMcx1g5\n3NpiBRSRnT+9/pp60yVM9BU8sUv2jr4fDM7OGJdglHaiYUSPWmSsLGQ7xmR2\nCfo1ziE+N+z+Ld8qHow6Rc0gYr+VnwetS49yJGsPsLBhXov0hJWOIth6KK59\nn+msV35t7BJBr+qLgGxYWK3EVpfiDNCpg2KqHwYJxhf55tZwzkSe8ecqgdcR\nuDGt5zTlWYtAwVp0V+jmqVMgvONrM5QflP/cdAmN87jB9qWw4OA0cNz1yEwe\nhWFEn65Veuq4D37dvRHFSwHt8WQVbjiOW3cIYW/Z/IKnd3w3oo4uA072YMqG\nPBfwnRu98ArbumL2a9jpBPs5GhWJOXCcGxvavV1V8R22MdSBUGV8PgSsFuOa\nY3NK5J6xBS3MvgyaKXdy2GtoQ1rsxD7sPDoctPXexDdyGh4Clxza+48kzpk2\nZ0sUjQdiXS86PvhSncuNwNmdOuZAAAyI/6e7bd2ugXSFCvBhS47jQSMMbKDA\nyQiYBnLwPXb3bEd6VJTZyspQawirhn7VzPHLZjeewdCRIj60mDLj44oJXZnP\nAWISqBpKG7HP18ozMlQvN8wNhFasDVyeky7W8J/lYHV6VqQGMsHFTOSjsA4c\nNNdVFAPzcPEuGmdN31qi8y/AWnmB2mlgxrdVb+gp/pRWQn9MSUwYc0wyfbw5\nwFjK\r\n=tGur\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBl6MhOR8Ng31TS9qkjs63Sa4T0R2QM/Kz1kS505rCZQAiBmwAryAy/H5/I1oV0fd06sBUe65rjY85e69kWdDyQeHA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.128_1615337825330_0.5806331906544009"},"_hasShrinkwrap":false},"0.0.1-nightly.129":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.129","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.0-3","typedoc-neo-theme":"1.0.8","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"52c7a833ad8f36809afc9f27c6ad62868aa9f82a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.129","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-4ihzx/v3XaDFioCE7XaWiM4GajMfSgtAtX8vdASWgZOetFU89s01VXRAMzWuXgT0ecdjKumgTlxMyqePQfNYuQ==","shasum":"3f0368379799074220ef58149a5dc3940ab6aa0b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.129.tgz","fileCount":410,"unpackedSize":6418650,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTC6QCRA9TVsSAnZWagAA9xEQAIJHvQmIWBTZO6/GfH2p\n7uoq9kbX9ECisCAI6LY+2isnTw0Fz2ayyhpYsSvMnhi7DVaVzcooz1vd9UdK\nLyzfggQRMLXOjRU0NaPMsElHChZCvqHgHhrceaHpOc9TLWkdR80R5mq6mCpJ\nPNfxSioze1EcepP0h9hFqeCKz5kEKjuTv0zNSQsWN+daEB6lGLXksIvD45yq\nQPaQniLXrRBgwMRdE0t4iRk7QbJ9MURdvKZKUdc+fqtoVy61i8T3J/ag4Lr2\nDENhYiAITvZ1pKUpqprzCH7EjuVXjyeWJ6tlCjzp7mBkRG/KBNnShVuagg+R\nJ8geAqI27SOfReD2aMgO3Jr5Nvs9gBGQqWp+MqAGi9K94G1amcolVLnkONgv\n7GsskXGNj0SmexaGmoxcFhgOOkWP7BzOOZyYcNxbmTi87XeekFE2CWR4+9K1\nnYoL9Vl1l9TzWDJWErivOU0GZl+JnS19Z8QHDRojP3Xw3jHCod9OBlZW1cr1\nv6enfqvcZ927358GS3UwVFdZb77fwzc9eQv0/QWoV1QU/f/cFNczQz9qs3bW\nOvATVGi/Ukuk6Cb/NcdoqG656PGh+fwzJG+I7hSoi77mTJb68mCY52uh3nby\nnq+37Z3oPKO4A27xSRI7iNLmVzBGxubzGmio48+VpZXeRCnvk5QwLAE7uSXo\n2FfL\r\n=ou+6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlabc16kkktEW779kPV9YlCk9pTGv/Yh3+aFaSyqgu4AiEAh8f78GCjYN3kTKcs8B436H7u3mxdwmXiWn0TrRYaqJI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.129_1615605392294_0.13562242066372954"},"_hasShrinkwrap":false},"0.0.1-nightly.130":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.130","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.5","typedoc-neo-theme":"1.0.9","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"038ee0d466eefe0b07f2c40f57088cb252922419","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.130","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ZumXhYHshHFJVMsIkTEAokjm/VTX6CVPqNoKFbumLgja0Vs/MpfcjzRDrwMrvCsPHM52o+gXls7nm5uFlRtQhg==","shasum":"3c58e057d9eca1d2ae14c4a224239bcbba238234","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.130.tgz","fileCount":410,"unpackedSize":6418648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTWOOCRA9TVsSAnZWagAA4TMP/ibUUB0/6hOIzkjkZS1G\nDZ/OKmjQvRXDB1Ong7F1nLb2wkci81aL8RFtLHCwPiqLn1KBcpD9aPta3swW\nSef2aq9SK5kz7RfkJ2R2Xvl4m2+8kQkWW2TwTc+Sxa1dEbu5dnRTzKXZIHto\nS+Ci8lyVmrQRakHqAC8SNGMtz4r6fxtquIOfQ/SZ53ZCQYzwfGLhh0YrVuVd\nubmpzYZusfqagFWDacyvyaAOtdGPXYc7rc37fzCkGqBr/fZuqqZdc8Vr7JDI\nMz6F0rGN3gc7jmwHBq6B3aGJAP48qjBqw8SbT1TnhwT58sjLyjVrqxXbkWd9\nxe5QPVmgG0atGu4+f5xuWW6jPzzJ0fICeECUSGWPXSFdOUMbe5m2T7VILD3I\nOAzr5zsCb2OJywdrSwijgeQ/Kp1JKQgsoyfIdFxS22Ji+p6/wfFkB99b7LPH\ndMqvrowdHRqWG9Tgv0leBfPMhXHmXS3iB0gT5ReI5st3BCZW8qFrBhXc91Yh\nnScKQa+WsI7VCWwh52JQH2F7q0rm64KIRpmHfCQLPgMT8sUo6gDbl5UYn5F8\n24Ywymluew//P8ezIx2ylXTsMvtCqlXzDW55n4fd77lVePVRUsiXPudV4RCd\nBYn+ax19bR+plJSDX8P2ssvkEnwW1y2jp2i4lF+pk58wzpVYFEkO0HtZYuZD\nEIL0\r\n=lhnt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGsunjq98KuKIdRs+kHcOfVwGaAvGQVj6Sxb1PwbeaoHAiBarMMNK1miwnm9Vxu3roGXiMumLburtq5P7m21Dan5lw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.130_1615684494123_0.003106483043156638"},"_hasShrinkwrap":false},"0.0.1-nightly.131":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.131","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.6.3","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.17.5","typedoc-neo-theme":"1.0.9","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f67bc7495274d5a6e20905d39ecdc9c3fd762a5f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.131","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-MJeDLWoIFDJxGGF3fp0PveMp6IRSRccZ9y+YhaSquTUDx7EUPDKDQsu6SlXpwgbMnBvFSpqZTKe/bL7n/JJwYQ==","shasum":"85b221fe4d0a2011d39d58b7b79aee2afc154a58","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.131.tgz","fileCount":410,"unpackedSize":6418648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTYXGCRA9TVsSAnZWagAAk8YP/jccPypAefQS4cY3FDwC\nxGTMnw77oziexi6gj2oGANWhGNsxbSrV7it6H3podPxaGtQ/1Zzzt0G6iNiP\n7P4ooa4NLg/jLeT96oIXxKqXoZJNDU5oNuZiGk5y7FMlzBattrZ1cep7qhH8\nrKa2AiokJe2+ZJRAcOy6uN6oA/XqXIT7Qv/P8sEcWbHn3o4j2cH1sLJExC9l\nTwxHWY3/TcSA0Flk6ZGBjLtE3XBxkT5X/mBjaFwHf3txrp6XKIgo3xEd6mOK\n1xt3VmEEW8q0H+LKAxLLWSE58LDvcvhXuDmOd+bdf8Kc8tL9oEs1gbO9y34U\nhCyBKsFGjsQOxvzw4XF7HdqZABEiiJfivbYzJ1RDtA30JQVPbNQpP4reY7Cz\nB8piwxOstATvSol6L3CyQLPJqMDIyPnMsnWcwW8V+BgvyuTs16kqmhio3X44\ne40wGEe0KbcG3AGMVDf2sAGylsEyiwtrqJ3InjkuVyWl8TNG5kWPi5P8QUUw\nWl6q/Qk3HPmF0IytSYU6XgpUEbYGO/T9LefT5yY+SnQmkoT1O79/HMGSGn5Z\n3hrwEXXZu+VEA6Xrf9AzqIurwLYrzBJCqSKVXykNfKgPUqAft+YMmWiXYxjp\nJd5njZnPE65Tn57Su+dC0//E2u8Cy4hfrKzElAP1watxa93UjPUQli6Z9yjM\nzJFe\r\n=n6It\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHXmyXy5/03wR6X5AHZayVAdSJ3c2P7+dY6B6DAP7NZwIhAMxsbXE39GgIQHtiVvmv55edjHazMsgFUXhUGA0JNTTL"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.131_1615693254149_0.5932422581565224"},"_hasShrinkwrap":false},"0.0.1-nightly.132":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.132","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.18.0","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a2f1806cded8982da8d4830a3eab0fc646ee9ce4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.132","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-SzOOCcT1qxTqhihwpcJ8nKIpgNKByQqjH77XBrDvZZZ96RFrX6r7x2o1GkHbYUbDreNQ0SIvMu0fIQwmfZ+gkA==","shasum":"6a8c12c71a82deac1ef022deae660ed55fe1ba76","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.132.tgz","fileCount":410,"unpackedSize":6418648,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTgi0CRA9TVsSAnZWagAAWe0P/1Ap+N6E6bp/1n0MSyhl\nQ3jnLEfyrZyuocN9+y1GGiNHFIzko9bu8n1bmxoJBmw/EcVe23XRx1IARVsA\nd13YisgxG2HFAN/TpWbDJGtR7F3OwBSGHANLnHGYREGPQjn4MAms5IKCytck\nMYLfUqRvMD2sy0CztTelesrVhs8XpDp3qkGOUQT1Z1znzjedJJ9oawZqG0FT\nRZrg69zRbmMTru1L+l01gzHauqI1g9JQ5DY57YwrFBDVWGRfhTB47fygLG1b\nu8G709R6IxvpZwhCw0MkM0VoaP5jvt67rFE1ZXGZ0tzKXgpBags1XmwL35gs\nMbsBzGsdmTaSvYZrOl11JVoKUf6ZxC5+i/UEEFk4nKfv6CiBRrPi1m2V+clB\n14y239mtZA1WcTrsf0vZgssoH7jxoWP8Ty5jmwRm5SQvAv8k8rjtvxMJfVS5\nZO42wRFIFtjogXrpdddZtwrXBQEkNSuXP5EwnLhbwVZyk4gfqHcpEUiY2qHr\n91hExavLreGotNeX0qLaw/K8CnrKSrtbnjuOljW85Kd6LAPFIjUGV3aWc2R6\n0tY2fYNXB+vCUYUSjsph5Nv13hIhfgNVJ5USXqvYHSb7sFlzMHVgP+K7JE+M\n+LWyjGsVLZm2+b6MmxmFk7P2Uim10WVlX4a2qQxhGTGds8C6arHtoS69Tov7\nmX3D\r\n=AG9u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2DKhg7x+yvtKu19oxlWCdXzQGMD27x7wOiKV1WC/W1QIhAJ4LR/7/yu+HfOIB/3lWIpx7YzZbliteHSkMv7jBQDzK"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.132_1615726771835_0.9677815378349501"},"_hasShrinkwrap":false},"0.0.1-nightly.133":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.133","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.24","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"23155f3550b89c2233711b8d85f8ef72e9481e10","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.133","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-wk+6by8MjSXEUeqPmDSE5GatZI3+Fbmu2Pk0mk4byEfj86MDYuXAhJ1N9oimbJR72rseAo+hX1grn9HNu/zoyg==","shasum":"cc69d53c54c056bd2fc8cd03aa5214b5bef2d518","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.133.tgz","fileCount":410,"unpackedSize":6418649,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTia0CRA9TVsSAnZWagAAr5YP/09bC9YqLEPLDflRCRyS\njhapG7jNFXxRSpyVktyJkBGbT25WZT+RoInmfiZopxKeLWT4zjFgktI6u9he\nDkOCnZOYRE7T+T0eX8weWu/qnb2SGw2qwPzwYgP3Vl+aIsW+NGEHQllfKqRn\nmlC1IOENBvL9n2ck2TaAfXga8qFJPHwBRL7lib+oIR0TsKPJW43M4LXmcaob\nJZpFRj9LsjDDfsRNB0lbgjrAL71Agd8/tOxjNhF3iYXK3H81SsGOMcCDB64z\nQyzCwTWnj+yaYnZrW7EMelesRpVtNs35qIG2xg+EDB9fX1plBTY+US7Wzz5h\noW2OStk4IH4txusuh0aK6fcSg4D/NS+ugTQpLnYa05J08RxdR8JqHiFG5pIS\nM/Te3h6PiwyW5dDiXBgCQN+Gx5Hzi3+cdjKKjS8eTNHx50LfGbPo56w5AqMB\nBelIgSLMmD5a8sSLth/OOYe3PF1TocoqBJksbsRoTPy9ioCEbBbqk3czEGr0\nqRGk8j2hNtxaCi+UD9/xc/zm2rsKWY/pND7rRPKp/e4O0xr+O5hOUKEEDNJE\necLd+IaIGURrQivjzUugs9JE2vwywMrXdhoGBURSq3f2lYQxi8YncZypCcCV\nnwV31uGaKkz0BUhcvMPoTD4B3uw3EPPDslmA8NlJVjG8a488dugMsp01gy17\ntgye\r\n=FiQj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFJqmz3v6ZFO+oL0y9lYVnP+SFKycSPAI1PMukpclklvAiEAvBHCykpbnQKQwjOlVxuGa5WYcMypmHxKBTdXDeqCL8w="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.133_1615734451582_0.6100414642317997"},"_hasShrinkwrap":false},"0.0.1-nightly.134":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.134","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.24","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dc5de79768a7888dedea943c1b0d3c7d6baa50aa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.134","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-vOkjWtxhUIvHv57m0p6nh96M4s03StNc3EUzPKuBWWuxqPqTql/XdvzJeQCu9yd0NznPfJl6dVSeXEJDI3/bHA==","shasum":"6be59d6382b8cdf0330675dd1ed3bb06a3899b75","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.134.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgTju1CRA9TVsSAnZWagAAo3AP/RutZXgIob/MI5pAaTPe\nGzvLMFm9Vv/afRxyIHeQmJw0ULafBZMnBU1qWngRxDd6ufpivJFr3nfr1gnf\n+7ptHgqmu9/IpryUsq7xthz9m7SDCeYS5daElAdNt8eOjRxm08RdQnNeej5a\nMrMSjb88Ih9SXEScv+7gdQQcK6pAVCp8jYSgRSu1ZuIHX7hU7L7G0J9BmOeS\nskTVesg6zrAzKa+ZdJ7DPJP33gCCyeS6ZJziZubO37i3NAfKoPoDlU7/1rlz\n6upY55YHxit/TIid4zuSvWkFcBJrKzmLTF5ra+qvFrLgbc5Jh7BsyiXE/pLG\nDHAO1Yyf1nQ2Rg7MQE3I8RAp51Ez3uIsiQ4tVkVeNqfs3nHUhbsvoA23tQ8N\nUGBuX8Gxr3akxKiIiW7ZH0rGvIoCSglyWmDNxFbxw3V8d1nTotHoapTIofLX\nSpp5vRrVs60H+Esdy56AdJrUq126fXrv07rC2TkgdWe1fnB5DDubKiV2iJ6G\n+ABa0N1QkqG1k57AVBABIrplaUkLGEO0ZEYJhpNc1Nw2KP8UqUG9BEH1pqPO\nb5hdrL/F7tGT1NeLrbumAhQc1wy/WZzake0hzTx/FuSWl7SC3PLiRk2H/Cm1\nUmGCU9ipehfMadQbVMhnAYbTSY+zc6pDLRFzEt1rVxEYysoTsuPj03VxEcAR\nhAM/\r\n=wICl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBTBpKQTfASCtB/hHnex+JWOt667I57yOnEfs5ZgLdPnAiEAp5Q3J4xUqKVSFrRSrijmzcxUn5NUKsydG3SZveNMWfA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.134_1615739829028_0.3960997969087934"},"_hasShrinkwrap":false},"0.0.1-nightly.135":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.135","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"110b9dd30c27040854c23d31624bbda0a93ae401","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.135","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0LnEOyi4Fru/6Pfuw42/NumG6/Te/nyrkwLNqmyBaFoP660QK3AGhvxZFeFqhlTVqOEQKZc+1SmVDV6sHpFXcg==","shasum":"8cedc36278c5a5aa3eb38875718a818823e69760","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.135.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT7kOCRA9TVsSAnZWagAAgF0P/jYGcIqxxhgx9DxdU3Nl\nRBdEcIh90c9PtjLuHlzHnrk1p+CVeKpSY32K7OEqO+xY4sgwFX2clWzpqVX+\nOvLs5JGiS6JCPPEZZQ12LEQ/Rf5poP9t4jtV071GGSC5yBcG8DA8yUTUicHL\nhH+dU8F4oCFQp0UBLrV7J4bHDc+GaSTfoTnvVruGLwptJhhrx1aMHOdQ4SLC\nsq/WdHjrgYS2+JeQNJxj/4GoEsGfXoWAFaup1H15hRqfdlvX7YMkFxIaQGFr\n2K1WaBV6PMRxrIWruZV8oe8oZ/jqWddIBIC0SL5mhIj51yNoOG/8HQiD1PvJ\nSRWtWLuNn9Fk4auUeSllctWmxOV3NN+qjig7e4SuKkJckWRqbtcKE/L11Ubk\nmgbw/AOrEuDDXPulASi+EvhoJ7aIH5Syz5KNAXB5BvpVfWkJFWrKR9W8/de7\nBFbCdlIecjoZn/y/JF9thnkat/Xf1PPomrmwAy8Ix2SEwgjkwRJyi58m9zx0\n3o6MTfEowRVLakuHXOtnijnOJyMktbw9QRqvH41MiF+2lkhUaH/CLMPX9gOv\nN9zGVr72dhMUdEYzxXVSc5sU/Hlu9zCZTiXPRqUoNaGnMx+0k3KJ5+n7/gtP\njxcautwHvwEqJ/u+JEDPAnnP0DvXIstdFBwLPkSvCgW6Js5mhsIzJ9Rvekul\nFXlW\r\n=SOpt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCPT7ZyShCDpOpEcYpeqiI2tVfXXtBLy2ga3iDdRFmZ7gIgKy/IhdLWpXwKH0yE/9oJeTUupwUrJ7ZiSsAeJLctzCE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.135_1615837453626_0.2883237080603491"},"_hasShrinkwrap":false},"0.0.1-nightly.136":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.136","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2af8e29b31edd215c90722d9c4e050ff77a6b91d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.136","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-PvKLl6IQaD7Qp/IwebQTodXMva4O2lwMwAI+LGlvW+gH6QACom0wBHRVEQ1753XzF/OQcKahCiY4kakcl7gM+g==","shasum":"9418b1b3e7263d4587b7c95163ef376d166a9b7e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.136.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgT/joCRA9TVsSAnZWagAAGZcP/RItrTO07o8Uo06KGa/B\nyJazunwfXjrVTKXLEH+w3r6tpY5oZgMBqTA1m+SMU4zRIhU+ud51RcSn+V6b\nU26IJbJF3eBZfdvTSjvVDx8OWDQD9DFD3bklVluKb69GtjQzNapVBwxsH54t\ny1JenDwHDoa/hGR2jwZKMsOkEKPQ1dyQifAi70D2kr6AQat2bgcGOIAU4uKu\nRdSefl5wup5nCaX8g0F+v2/KYUhzBkM+ZfHW4Aqr6P+uARo1c183Lpx6BEyQ\nnJBaezHfNY57jOc3dXiuGSxS5YsizRLKsHEx5OfbEcAe8kespAkNYgpmH0ma\nFSmBlcLVnHuFSpXJcIum/00attjmE0KBeFW3ZEe/jCc6xT+efh68uIlTCB82\nHtJNsuBqGRNTq3yuad09nnRIvCxvhwNh3sXCnwHa4DpOVZE1ocwkRKEDKvjG\n64D2DHR91NKxxS+DFD/DIegixUVyd1dvDAeFi4Qy5FoC6XdpqTjI7yPN+tnq\nFM3amUUzoFjWLv3r4vJbgjinSx8dE2TRJoShf6fhBkSdp3l8TkKzNXKEGZCj\nlmJ9Jk9rjuxjklE1bDgUY2LMlL/R795HYdufqzJfLh/ps0n11EvudpKVdYS0\nR0ZcQNuXjC/B9nJuvhl9efFQHyHXXGOXmLbt4mLRKbF+ZV5xO7pWtwyU/Bfk\n3Cd/\r\n=1ACR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBQ2ZGXyOImL4hWltu+OoYumVipofM6Ii8woUoUVKORKAiEA+gF8eFk4Y727erTjw3BIfJx9jwsU64mZRWJuD/y3Eqc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.136_1615853799355_0.38088521801263986"},"_hasShrinkwrap":false},"0.0.1-nightly.137":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.137","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bc6f3b82794195d5155bc0875df6db14105da1ff","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.137","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nT4AcU/Oiwu+lixJcSZ0N9r++JQhQgKSRLgt9ZAXZmL1OOA5jlo/Ot+xNmZCaCFZ/kTlqU3ZZJxsccdxT2Hc/g==","shasum":"45899803362d1da3dad05090fc981f1c9c8a8da5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.137.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUAwaCRA9TVsSAnZWagAAF7QQAJ4SLJddqbITgeisTAJu\nmL3nIL9hayToMdmdo01fP6A1BLj2tGSnGNCzpZgSnorTzMbMqFyLqKNOsnoY\n8ghq0dZQRYg9TDX7P34FtaWD9+wwbfahq7jdUzmRTsobFaJ6bkcPmgAAbV6A\nkwRE+s3ic+rq8/VyAsLsgbf+o8mxNX4hd5naULsxxQ5ygeC5TtG6eTrNF3cT\ncMz7R2RCEHvCsZyIshWbfRckNPz1QCWBm5LzsNTgShPLTcZEj1e1Zzm5kmT4\n+nmysGDQ8RDi9SuNEWt9U9ML3Nl3KSUS5TdGgyUhIdZxYZQT6RaYMnR+AWIW\nptslB9KCeF7HaWJ59Qw/h8o3wQptxIy/me0uAMBqZR7RMNY/dz/uL3tujX4v\nHvahVo/uFL+3LwqO86NUk1Sb6qemlEtWCvEeSwD1zyBuK4WlkYdmr6XFj4Ry\n08LXeMPEfX/LQBdAtX2bUzAKeKPJfgvqGBJpwj3VUAatzhoovh/4oWHlVBw/\nDVo0AhYO2XqGsPgNjq2As9EmYONN1fGSGCXa1OJQZinRqr5YuHtvvdHmrNdp\nqmbMyYMFtE3dj4jb63CZgps2F5gMDteVvm0leg+tO/2AxSs1kRZ1Jz7X5l48\nCP9EYzMNo4i7DT3u1lJSaoS0K0GvRt2jFbLv6bkhihtJvzhPG6LpHnQ5HVPx\n5JUK\r\n=5trp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF5AxB+hY79wBq1DvKvkwxkXQqlc6/7cuHADirYJwUWHAiEA6VQYL+zDXJ9ZlkVyDhVeb6gO5XWucOBVRNEdUYzoSqM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.137_1615858713570_0.8115982903355097"},"_hasShrinkwrap":false},"0.0.1-nightly.138":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.138","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d06382212127357376a7b0a77d1ccd46e7380c6c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.138","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-sOAlcv+foE+O9IBbQ5LXyb+zJVHFutWAWVTqOxDjWop4hXPdJlIG229Mx42765c9sEvm51sP0UrXGxHmeWQzSw==","shasum":"b08dd09255c01fd5992a3b4ab5167b672319a44c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.138.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUB33CRA9TVsSAnZWagAARMIQAKDKfJ47dm8oMrhBUWn1\nl6JGYtTveUgPhWHU6j5QsqYeMQMpnLLo9+vSVKdyWLaWA6bGpFfit4CpOiyq\nYJiSkkP9J7G81u4V4dPUcuETBWls9RhiKK1/DTQ2M9GJaj7eO5tCXZYKBuag\nQGkRJAfJ4Zgm+mu9bfUwvsIME8RLAGDjSDrwuIOgd4mY3o9P02JbKwKLI5Ci\nDSlsgKaOZVhNYVrJRlCCD0Fi+oriEF4dG9+S4Upr6hsrqIMSLg8DqHxQaKFt\nac8pMzjBAtGCTDnNeyH/r/Gz67dNWdoxFmmGwy233HsrKTOEyrOZHIpqS6hx\nwkA0RPicp4HJfp1Io2+ICug6vtAu7hHE3uhKy50aoBYYqrzWOubUav7cdyhK\n/b6UHwhszGPZCh3jOEX+i61Xkxt/c+4y1h0E8Wns4zxAXYmhLCis3AebvdCD\nvpeHH4doz44BCuZO3Q1ZpMHddbjaItX19wUbI1+H0DDFsprzaEJCgxuuVHBS\nNuJ/DwYvGAmN+eeYrTXZEi2u5ZimaHdqCokQ9A0fqOyVC8u1bnsVQc/nhMCT\ntj9+0wE9Z1GAVUkdjHvZgWgakhykRngkEdsHN4UGHC5W2Ro1HwrPxxZ6MV39\ncM5Sh34Vwj/p6pCU3k6JcvF+hL2fHipFBtHUOfVylScnyT9QujbpVTjgW1bW\nrIH/\r\n=uYzT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHHjQtuvzooUXoqAfnQbBAcEAQvFOKoA49cPn7hHcHf1AiEAvzN8H2p5D+Cgvhf1AhfoHNzlxBR1ZOlt++/5FfwQ4l8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.138_1615863287001_0.45313153488772495"},"_hasShrinkwrap":false},"0.0.1-nightly.139":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.139","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ac1ed23488ba12a2e1619d941fd53083d03cbaa0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.139","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-y/tItIs0iF8mPLSkas+gzNkYXs5wWXrsbiL+8NOXlOV02i+VJU/qTlwaJ58RpXPOs+LYYL6ICHS/+g1ewOm8eA==","shasum":"f4a19aea59c89441b0181f0b95e412856b7d3f61","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.139.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUCHHCRA9TVsSAnZWagAAX2oQAIPXlDjUMguBJkbmcNiD\nLXxqM3U7AeptXH5EsEJocCrxJiS6pNjvqJzRATJSah5bun7HVhmisutY5ZWB\nqGWA57phzmQqJ43mMTAlipoTSCUB9QqYPLM4mf8ZgC+Gj7+vCLWKF2p3d89S\njQgVQAmBwIkI01pVPZzVt2BxavrcgDAiFeGAklH1oRcyMKGdpbqejVc4tM/B\n6rx5tgQPxTA+jAAGnvp4p1p20BEywvpYcDM/66A1kPlz4ajZC7w3jsTL7aMz\nLbHG6x8RZ0DlFXoREAqkckF7Yv5ZyxhqSnnbndWg5qJz+ld32yKOfx3rnPuL\nex8EWMOhnD7bO0fB+usf91XhsZwyqxKajyG59Ka5HF2se8aWxhuAkN3mQSE5\nlGhxgEUGMOTaFAyTQim7RwNJkY5hpQxTlfMZwlDHUDT2HITNEnOcw++o9fJ2\nZuP+qUiznQ0BeGEHm3DqArGg8JA8IWlzBTLGuTp/98s9O98HkCwBQyfHPH0i\njt8L36QRU9pVRM5L8Sl/MLN52PVUDZz51MNK5RxscL6YkuVu1PlIglW+j6Nl\nEvvnbC3RPfkaW4/ejZanH/zA3npVj8wWe3zCZxQHlGYHKjc2DySfbtJR2N/g\nSZuNpiUN4BAjxjwm193B6rwwFNaL0fz5wx0df6sWUHgdmmniO6aQra2CEKcm\nGCHZ\r\n=dbkr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCXFL9R1uzeQHpivBwGfar4EMcWmKVAGYzr/55OeZQAAiEAzo0YB3hwyR1VjCNgwdGs1djPNWPRVUkJuNr2VRYizws="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.139_1615864262936_0.13528790230452703"},"_hasShrinkwrap":false},"0.0.1-nightly.140":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.140","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b1e0dc5a667b06abc99412c66f6a911a48c677de","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.140","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-AWe1yw+PTvIcx69WKR6FVtoZAkiitID5DhnsPJSEH1VaXyzFUmtvPZMm+a7Zs6W6INcSQBZXn9FjeORlhfTlCQ==","shasum":"8074ce7b2a73c4861c00826dad1777619e2b6cce","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.140.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUCcgCRA9TVsSAnZWagAAz34QAJJpFxDkZET5dQcKoIJu\nibAbBU2q55adbBJToFfgU0VNXAKvZ2Buxc18qgtrNws08Pg5Zxk1llLrWrh7\nwSNYPKXHgtKJ9RYjOU8FXMqfnPAm7TjVYC+g4dwL2Y4m0GHhnRzhaBrt1a0N\n3vSMWnwW+siL17AZLF42qgHiH00vKLVgfaXlbmQMvokY2JXhyNgvqND37yha\nrBju5QwMeYu07oRvPNUVPrBarUwdWuHbrex/5/OCK0AZmljFaBtmsrCJa/eH\nXzzcEbdNylWu0XuhZVZReqyCZB/PGkRGnq3xBfes4k+sSknM5g3Cf89zE1r5\nr+P5ytf1HDvBLcNbYQcd/hPknJMlRxw5XsmvHgvcc51Gg2Jv4loTWhmi1DF2\nkU5++n/UK30Qo7hAFWextDbBBmQ12T5hskRVGeIEtSkfDc1ASi2LzffJWYmD\nNlo78eEQKOt6pkUHMVafb+uW8/jnqclwSz0gCU0Du5g+jfp0533nIzo3x6Fh\ndZvPK712g/p9FVdhU/bhLl+0OATEkJqzEY9NMO2BtD3/1Ih2aIwjJDO4eAHQ\nCdMywXPv5/BXLqH3SHv/osqa4OXOFq4egoInUTqs5KrFySV/jmNuwhrzyH3X\niixO/m/zF25CoWblv3Up0Hc50wubNGmUIhkU0aASJpfYaKHInu4F5QdJy4Az\nIHr1\r\n=YToe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG2TjY3jW3vLCxwefVUKavKaqvW+rfyOsXW+NqbQzM9LAiAksS6vZT0ku9ZyTlpJfxVozfcdO0BHY+GMwhbXBDZoYg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.140_1615865632173_0.29739464416902495"},"_hasShrinkwrap":false},"0.0.1-nightly.141":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.141","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a7eda4ab4fecd27ba1c282c8b2868033769086b7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.141","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WMxmfvndiECydqI/WNOQUBokJt1DFb5+6h5yAhBSs2TA2Uw8fNnyKBBbS8OTFAD9raRHCEfL2R9FgjNnk5I4Ow==","shasum":"5fb831868bb07e84711936a61f81b64775279453","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.141.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUCn8CRA9TVsSAnZWagAASXMQAIH4lNWi2x6MraqhrbKz\nBvvEPafErfUMUv2F2wfrcGUHdFsVbzhsHYB/VF5LKba9VmU2j1y2wE2BGSWv\nkQKx783mmyKT8XBw6JXCiw3iPw3SnOgNfuWNdkk0Ruu6ERuX5QpWCXppMJAE\ni33s1KIIRmo88UZc/PQRvqmO8EfeYQJsUQxnLsLUlNs754oQltvRhhzixkq0\ntgoD7mt2ksTAiZILdkJzQZhYJDdzNqqjL9zWNT2cf63vqrQkvNmgVjFOGeN/\nEuPJRNTKsYyGdpH9tNp9JYyKGhYyGF8bO5oSVnapgi/1DyI78aFM93+qHtk+\nlUv0nvW4jvFKILZqCdb6a6eIK7MPAVVvJIFV9ztG9kihAFAYyoGuOsDHv/VM\nZAvMfshIvMr+DB+c0yMzmg8Pfq3qjvIpTpef5u3k7HHstHpitaHT//KHblkt\nf97tIGPaWkdRgDOizp03l8a7fUWWSV6kU/LJOE8i/5VGzLd+JIa+JQp+x8Y7\nxDYNiBNmO8tYnf0pOAAyWsjO6lCNiXkvsQgrsFGCix+aZcf3KotosmCMy/9v\nWivqfIPdklX/+vcdwZtEehR+NbYUnpDVHBnNUpsNhZrKSHAbPfV8AVufIQGB\nfW7FcSQGap0j/DJJ0QN+RM5QJKPAbSxgu6EwgzHBbNhHrZ5WaW4XsdAeHMXN\nM/Pu\r\n=QpmS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAit0vupnQHNZ3d3ocHWkrDRsDWGIt5E07Uwhn4DqmrQAiEA63VWR3qd6aUMUELs7+Q8Aj/5kax/oA7C51zetPaKjII="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.141_1615866364004_0.2024151607406306"},"_hasShrinkwrap":false},"0.0.1-nightly.142":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.142","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5840f625f6e3c18834b8c637f90423e97eed9c10","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.142","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-wq2SF6u/JxcfyNxm+ICZhZpQb2uXInv+Vekx0KtvyMXagjtbotJrUhjr13fY+yT5qTb6NZAJAPI5VP2ZyST0bA==","shasum":"9f7b79588375be8e3d368e202a04fa00c0f5f2a7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.142.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgULsVCRA9TVsSAnZWagAAuFkP/iwffLzVQKIjJAFEZMX3\n6PmgvCg7Qb+Lnf01tJrrdyYO6aDahsOCgt0eO/QlZGnVPB03qkRoE2xBsdbX\nYFByeM8Mt1kcErh/plfibzZUfbaeFjC4Hf+MFHnlcpNcJkGOSPDUu2n0vURo\nl8Z//uj+GCnbeMkfcFA53a5CMF9oFvtuUs2d5t2kAwNss89McrCzhTul7KOE\ntt5bTa1roz7GDlFKMMYdF2OBlePkk1soSq3unO5usN/RYYLENqa5mACTV8ff\na7AHVw3+2KBEXM8oCBQwtzW+k/GakLVM+e9YUDfqsHKuV3/w2qLLctjWSjpp\nDuAEQiKcZkvp791YMszNqgajwKvNK/NE4z8kF0CkI9G5SS2Yls2Bwz/Hv+ET\nRdGo68T5rMyIfKtAAc11R6T/KcUms1O4LxFZSBuGyPi/JQ94uW9T4R+vypJm\nD45Y8nJOkyfRVAGKRWfyy4h4RTVjIZ5hlm9WbXC+wh5QySJBRTk9nYy/uXaL\nMcMfTLZ9xzQqL/zjAwjdcVM8mD1uLFgkH+oGGs2UyReABK0EE6H02CLpEPbB\nU2wHWzURckGpQBzczJexUvpxXO7yD7mgZhZ85OkVOufc2nCf68kgS3YZzEAj\nAigf/Tibq1eEOCenrh2yH4xqHhZOXMzhdNPD6jQoHpbQHtC3XLwlmCcHsnB3\nWs/x\r\n=VTOK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDuyMWjJIAzf4wiGUH5lgn9u4tHOlilgU7CTGLwL5BZuQIhAM2ymY+XGP9ttEWHBh2Npqr+dVG9M4EMvHs7h4bm70HO"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.142_1615903508572_0.44918987933711585"},"_hasShrinkwrap":false},"0.0.1-nightly.143":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.143","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3573473c36a5ea164dff5472ce7af952822cb90a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.143","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Hg51MIkzDUILSl5oXWFZeNeVxWN72JULku8l1sD6Fn1MvLvfn8wB4Grh/X51f4aLai4T9lFG7RT6DQA+VZF4Tw==","shasum":"2a95fceefefa676880f7be3b1cf3f84d08f899e6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.143.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUL8yCRA9TVsSAnZWagAAEAMP/jczOKJ/9BcgoB+YlvLc\n4DymzH1MVM/K4gExo05T3hhumgaDJAgYQriqigMyR8J2qGDhhQEvHNy3Oq95\niGnbfgo/GcihzMw1yVlMgZUfPSuGPGzvIgbRuRJKsDo7zJa4GiUDWEF6R2Xp\n8LPF7i5TOVI+WnO6sQxp8DsouTwfHP9hCMqbW9X+29Y/ET/XCqapR6bTA3b+\nMt2fEu3GNp6lvUCsiu8bc2PSoMYII/gfaloS3gVokZQ1yHtkUvPugPYE989U\nSPd1RAnrVGubM6P7xrCKqyJ5XVAPB/3x7+tsoM3x3sUbLVBywYCswW7qJhWG\nHdp4zFRA4SdXm4c7XGJ3QIAQEce16U11ILbeA7J6VboKMz/txV1gfdQoxxA+\nq3kPct7BzyXXao8V9EUFNEslDCVMeHl/hfXt4wxSHlDtEaJfnUotaWcjxFXN\nT291kc3hmwtOt7A5SRevi5OR3TtOABccvxE0h6vVv/y/sGche0VJO8kPWg+q\ngpCPRaM4ADQ+Y+EiO11NR4fvGUCEEtM/4jO0sEURATxcLHh0XrlzsXWhHGF5\nQSGNfnx639WpQq/lEUeAcSOtnsuBx2m8LO/1eJ4rjnhByVFmtov66iILeBF1\n6dO2X/uiQ+xKN8xYep56dRucSjcb9KozaASScrfdYQB/QNaiWpQ4Chhql/gf\nKi7e\r\n=Zik2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuovdPaSAZmm+K96t9eXq8I4huPbK0AN4yoNbYxMqlwgIgFfPI1shknwm/kviStOcHeWpazZ2AoXHkikW4iGOJcLo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.143_1615904561943_0.7544863538700477"},"_hasShrinkwrap":false},"0.0.1-nightly.144":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.144","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"255154afce49fc3ed450249841687ba3f71a1ae7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.144","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-VaRYcXZ6w79yDwm8jZs5KNnION8mhPXzP/ZyvehEUAK3sYB/nmPFBEPY11nBB/9o/o4+VPBgQTaeIgCsgwssSg==","shasum":"ced4300482296042e35cc7a1442d1b85e1649d53","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.144.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUMXGCRA9TVsSAnZWagAA35gQAI2ZTgmSnzf4X5OihyYj\nMVVnmW82iBfxTYpJNI6siEMm07k/0PCTZB5aAsT0PgUozFe+zCQaXvLaY2wq\nwQN5pmWO+HCckYAuJ0E6c3bgM61Enk4d/2hllZEcaJwC1EHzRK6MfCked9nf\neraE/fIS90jnLEQmx2VHt2i4ux7JY0A9sn2R0L8SNyrN1UJOcsKzFaH/7TE8\nw8nUsAVDl/3IXbOYZyqn6Pg6z+Z3L3Q+DWM4zYaZGzy0VOatQ/5So+mSAQ8F\nbW8hKok4vDMiKWEU/WkXA9rYK9SdNK6RjB7fvEzb9mDsJfbgarn7ueWU6NWL\nv4to46pY+MCpNFeVW+BUC7Hd75E4LbvY41eqRQG7tVBFzRzwTPCNADFkWG1n\nfryTXpikrHmFIvhiRWdDnyhflrDLJyFTnpNNy3M2Sv/rm8ZmXqXRv3parhvu\nJcmE1DJN1frYviW/adBtAoao2pqgpwmmdtsWolOynGGgUsGucA9kfR04OcUL\nEF0OgAd1g6KKb0rxB8md/auFTGmSitDBIntpBIX1OIIAGSWFKe3b3f5Z0Vzs\nKXB+4C6wFPiUasqcKhLaKyq3Djb+K47OgrQUVJTgX3YWS21nc2FenoWjSKpj\n7OiaZoQk7z3H45wbokG2IHEzv6xPit19VoYp/aAJMg5pxQqUkhatDBTt7ch7\nIHXm\r\n=DYX2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBH4o1M+E7M99p7U0K8SHX/2QXPrnBy3lJ25kJb6bd7QAiEAxhuScm2PJgEv3kLpLsFYtMSnHSRR0LAhtl4INa4DvE8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.144_1615906246080_0.2952215501673847"},"_hasShrinkwrap":false},"0.0.1-nightly.145":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.145","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0865c0cbe0648d20ec44d177dddc4be7731fbb4b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.145","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-c697pKcCYszSEUmRCEs66HI5jdCt5Hsal7XRSKT73c7tHYb8DCzd1ODLwCWSz5FVroGJbHn898EgZKAsFayQbg==","shasum":"de0c8fe39c7fa6972d50d10c65d00478484f83a2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.145.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUNjwCRA9TVsSAnZWagAAkhcP/ime1WM74nznrlbers2O\n/jK4i071aPwXoVYOkRzKJDoh3eba17oUjCxpfMma3AmiuN3tymPsXzHd2kuE\nJH1Iou2HMZvHpB6mHXw9FTU8XamGK0yNBDPJPtqJxZ8xifWQu7+N4FiPvJmY\nKZdzzlDufk0puxVAJfYFsfNuXjPAssGe8zdDTYoMY2DgG+DMx/wSFceAGLVk\nQh1vcO7Km6bIIcFjRHq7IE/yrcYu/fkeWs87Qg3LtiPf9jCtbB9LX9qVH4gL\n9IKoF4zo/zelTFtjaXRSPn+cDuVVXzgLCAU4AuIkf75UMco5EQaVmptLbju6\nl2W9NpTYqKd4zn93Y4MRZdj5ykVLWbrFxRLV1RfAbcvfB64nMBa5OM0DdTwe\nMRnf3S4zX2yM28tjrQvL28CGpFS3qpJG7HH4JK67wOKfxmVaSwTptPnn+ycc\nu6xUZMMqNuIBdpLfG0ueX+wRMahktG27fouj9Zh+pnztcSYnm59BWIAsGYSD\nAzwl9aAYZziKzXiV/xWYdtvOgTThOT36d/bJ6YJoFRfVEG1tkwqveaGfDx9W\nf4ceWqJjp/OFMOjkHASMHjZeyn4BUmchSXZrXtfxOAjsS0/8XwUUh+xRrzVC\nCZACvlIiiPe0odGjRjJq8kjlcAyFOrEmOV1t6QdSPPcdnZePpNHL4Hk2XV7t\nJ2Tb\r\n=7WS6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEMDr8K7GX+akYReAplLyPGvkcbZsYVUjb/ifmnrImsvAiA3njQXn63DyDcMzDXXiZagaCnFQAPTqGoX2BvVLEuVew=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.145_1615911151584_0.4669284332585577"},"_hasShrinkwrap":false},"0.0.1-nightly.146":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.146","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b38970182a6720de66e297e1f10acc5636758175","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.146","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-rX5TJ+SzzEkGDekq/SXwsognMeDaeb0S90fxWEbpWds0P4/KG3eYXXvo9MckwnsuJ0TUlVqtTcZSzHf3muKoag==","shasum":"334892e99432688d79f59beaff87a39ae25bd372","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.146.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUPQvCRA9TVsSAnZWagAAFGUP/AoZ04xQXrV2Jy1a/u8W\naPLDyi65K8DxoT5X3RCJZ4Qkc5gOAMkZcuWdpScZpDcYbm/oHANpTtiLt8C3\nYSLjr97HyF4aXvpWK1+BzrTmhePu5p5YQ18IDiJvhnO20nOz4Tr3mmPSp6jE\nUEdbbSK3fDVLy1/1iiOTCi08EhdyipPJixkvQkIoJkelN2dls43W5oMpKRjk\namialH8CNr76a7rpZZ4O1glbEbazOeWaHF+Fdzg3+oPTYGnen7YMiGvai5J1\nUCMCtjG37k1yNAlP4OaqOjzDAt0vNaGXprqH9o1XvgehFJe7nbeWI50DpSO/\nUO7NMRuScZuKuFPN3bejtzr8KMyONIdKwNHKD0AyOWZChRUpaI48fNQKIyw0\nBttYPEDv1eXHKbRI++OkqPbpr/EjySZM4XDVOVZjLUQOzNJFe9I1sOzes1Aj\nK1zv/GIw2xdB29jnoHayDAR3kUJRa1g31GgxgeP6Y1CvTJ3s0CzlJE9sbs0U\nHpIvUrZzlTlMU14OFCHPSf5ZcJMy3e3ocF6BaJtjqR+f91J/bPHrUWxPrIvF\n4RZ42WQlm7SLeiXJVxMQT6uJt01dEv7BVHRDptUijWwN8LDIZoX2SCiwDueU\nSklGPaldkMKuUdSinD58pEpMhJqX8gz8KC/bU+6J3sZIzaL9el+0zT4I1JBr\nNqgU\r\n=bMID\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcu1MZmxPGwbVe3Bcx2c05zXLD6uGLWJQUiExfgFEKVQIhAOH5yn54z9X59CuuwLisSYMapefTzeJhE5AAkzjmQ/Al"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.146_1615918127252_0.7012177512610029"},"_hasShrinkwrap":false},"0.0.1-nightly.147":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.147","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"821c19a6baabcb80d06082f91d16538dec3050b4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.147","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-J5lOdEZiYA4AlwSvfnyFNjiFEqvt3+ROrncchQegA9ZRMgRcMY49q/MJ4w9UPveqOuvzX8zUXP1bd+Qb7jeujQ==","shasum":"5dd09c238d77279954874b28457df4794995bd9d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.147.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUPwUCRA9TVsSAnZWagAAkHIP/ivhek1dLLq/Zyz9Wz2U\n86ub/H6r3Lh7ZANY1AQl0D1hn8RwKwHXlDwYY/rSIwVYmz5IhmQfpGYEoZWw\nuqKLz2gIlaDzFXDFL4T1XVpp3zzsFHdxt6IzXrlhDYbITjV1eKYFifdmulYn\nl7Zrlr7unHyXB/O5hH7C+5Wvx0oF/3aX8Q9AMfhXTRHW85ytvOAD2pe2u6aR\nv1bmGOHZ/YLRWWKlUnLm+FuofL0+0ZTqv7KhsuWJWrZhb91Z9a6gC+wgrgZb\nkxLLk1Mh3RMWiusY65oOKkunsb5Ak5c7m911/Z4IDYdTVGSOpuzkVYrDZld0\nNy/ur9mCTeBxM5oJfjkNNfi0xi1VxdK0UBEcmlYlym/+wu22EeipP9gHOmnZ\nkHOGgm4cy34jGxJqLvKWCN+KOlYBQL2NsL+a4X0etRUuR6PUH8reei61zTd9\nV8GTIE/fFCh2+7qEcuXKsrdrKU/E4d/sYM5z4PniJDkdy510KSL25+OKDzsr\nQ0sDpq5R+n0AJJ6z5xASIF09Tg5EoRJfvbgFBDjkAHVvhuqxTAqkWcKKyI0G\nILHYm5aRtH07ISTCBJqGRU565aBzxcrCE6JCxxEsK5ilqHPuc0CZZ9Y18uL9\nljw1QUi2zM2N6tPo5E3tjaaKQS4fFxc0NpIAzdH0b0agROPwW25tb8iZxFJ4\nJ/pw\r\n=2cLr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAfjsG7er9GlFXFkFUu3yfKsVqNvS2oel9/b7kRUk+sfAiA1pD1eBmEr8ls8AFLRnxATYoVYWITpeepXc1LeaEuc8A=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.147_1615920148209_0.2551877165684462"},"_hasShrinkwrap":false},"0.0.1-nightly.148":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.148","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4a367ba467f454a58b4b2197a7eb83de4937e62e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.148","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2ebWqPHP0uv6vHFzcAS7uLJZ/PwrAcuL577DO2LXBoGuvB6un5msDgEO1RYWdbiCONSt+RAzhP8wHzvvYaleJw==","shasum":"49d404e8faeb07bd9d3d17f63d1ac5cc0eade8f7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.148.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgURGpCRA9TVsSAnZWagAACg0P/3IIQYOsZhWtZyDz/Ntn\nPIO62vk1uz2ICQGyq5yCYchnyIJFB9RCQpubmDt8QJL5BeSxSc1luZrYWF4H\nhuhOO0z6fdpa9dkB0K179ow6hjCe9TMENecGzkGoPu5FQoVzFE6Muex176Lb\n7lcy5IeAn+02eK3cwlQn3ZFcnC8ezjX/Y7EmBY2/rug/2Lfm7ifsniFmX1Tx\nQm7eH4eoNAyeCGKsdgJd/xJ+crvJJjk2EeC+CPyvXik3D9R1VE71y2FzF4lH\nQvulzGXCd1SPicFSbDiqBuAEEI626/HWCuQBwmuF/Izv3+vFMAYhgvTN3kcz\nE9AEREVX9M9Y9rai5Wt4qZUKnzC5fgr0KTswgBt8KuoqXUQzXzzDPS9qtZPB\no0BmT/ww4IsV/dBuade0Ciq2pDOYwY2+DpckuMIKXLF7GKGLGqi7al6kOr3E\nebsbNwiniSsKJsiWx9YzyC0mWBIy/s86QLoDQSU8OplmX90KaBqqDHbwPlHk\nPmHqo91rEO4b+gnCXX4ajDQXUrQGYgCOJCUu6rkC+Ipn0IScc+xfxAxa9+Kd\n32izhLB3Kr4UAZyHsaN/rp8BZORnjsaaUGJLBgVabU898PxDjB44ghXZ4Cof\nX2cFRQsYAfJqRs0FLwwvn2+OMxQmd/sL1IS41vEaC/i2rGinF24pRJZmdsqw\ngx1Z\r\n=qqo3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCIGwKOyZF2c86WIIJYswBOxU0zPIkjeHmSEYAhhDeihW6Ah8dWPZOHYMBRjFOxCS8eHFtHoQCx/cZ4w2eUnaleAu6"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.148_1615925673124_0.7603302994485979"},"_hasShrinkwrap":false},"0.0.1-nightly.149":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.149","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0b3bb55c7ea1fcbdea0c4d43ddbf49a12a75f451","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.149","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-DtzxoqdscpEFtq7mIgSZr0hX9ucRBre17S+1BH6xgdA1n8A/iRRTM46/d8NueqKISTIhdID5hy4l7ydizJ+Uiw==","shasum":"f6befe4a3fd70dfe2d1745f42540f4b0c281a1a7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.149.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUhVnCRA9TVsSAnZWagAA3B8QAIRWOPpC8Hr96b4TyMyf\nyzGlDSRRF0k3+HBJrVSB9GuuZB0lLa1TkUGd10C04y/5iT8uFdBC6nXfAMc1\nVFcG/Fkibxy9j/HS0zBGngAl1x653fLFS6++18AvrJ6KfuEr84/GRGhZ5+39\nqJCVQB7z2zEU0jmK8mB5gkyNzrSsvjhtg/vKSCgzQq6bvfOochgeMFIomg+z\nayq2D6QrIwXL98D+mVldZ6zYzshQJlplUu8udV+KvPRdOjXx9Yw83Fp1+rYA\nJqfMrnC+Dw3sUVDZkiw4eHPAtCL8gUfE53SkPH4F5QvyWDQ6A6EWBWruQSxM\n6NyDszZRQmTY6U3BSE2BqD7RB3pH+wtEZa7c+dPZoi7vQDlFgLjyJMdlCgV5\nEhZYikxGTJZSj17wPnktLwGfvHKnAd2phGyANlPUbUvUwFhNTr7TDFHLsVoR\nSdl/bweb/YbEDYF3aPq9TgEnPq1B7mwyquPny/tQtZ8f21M0iRnjFeu5v5on\nZFxBO6MRBgYm39Dcwpej6HfA4ZMqugGI/GaJoYY2m0J5byo86mNwo5xrcCAI\n+wblp1DRQtwkDTprv/OVkvvgnNEnRIFl0FWhYEZXrjoCEcm6Ds6KJwV55gPY\nNsCj/wc4EapmTBMp5BNWmxyIMtf8sVOx7RWCutVnge50ERmxMj4ST0L2ibEH\nFjOd\r\n=O6K/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICFBa95wFuGnxhl8V7PoW+bXoxHzwqYjWU6J3jy3yP51AiAhq1lyEVSVrcIp7tVfWuhduHL2A/4RgpTwfmKn08swLA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.149_1615992166667_0.11866800187337367"},"_hasShrinkwrap":false},"0.0.1-nightly.150":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.150","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c2bdd0deab11095cf2f6c3aef676cd2a25f8b95b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.150","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ODS9lKB20wOpHUKL5Yg5Kw1Yj2h8GWSgkZy2d5zQV7yb5FeHc3L+uW1y0b5V/vHk6+MMiQ0W0hrTRWxHJTtczQ==","shasum":"9ac57e857180cee0f12351ea62a65953186bc331","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.150.tgz","fileCount":410,"unpackedSize":6418700,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUkEuCRA9TVsSAnZWagAAENoP/R2RNPfh4FyFF1EHz+3g\nVZx2foq04kZ0gv1I7cAhpV3DUJ8pJJyPWWMGCy9wQjMw/LA+a0k6HG9VnNtP\nRY+EI1EEzecxrHjSh0G/Zxjn1RPcR5QPceEYF9GIqME58RNhazIemsNnMaKU\n1peWjRKIHKRlb+8g4RXexZv5eWsFLFXfbJzkJDh85p1yV08LAFL5fMW93loL\ne6Wn7QNT7eGs4mxRjG0e/DXc3IGjnbutpFaYe3GqNrB0DWNje01GIGrXV8Xw\nGp0BySRdRN1Gx8x97GtR6TqSBAzZtdiHMXBUM3HrOcQXwvLFskgPZ+ie7rv4\nvkFukhNMIk9x1mvh1dlIz6gdzT+eSfH8DkqWA11Gi+KAsvueXq4jtzZI8Qcd\n5TzF1XcdcyK/HPTxNmZE9/oXNbCmhR1m/7qmh1JLbqcMCE/uBvisMLmUiIkB\nhsyDiUEeSr32jO5N5jJ8v9w7sXfjAqW/12HvsXl4j+r5zF2U4a0sgEwhZ31L\nezmalkqnWU1ajYWh3NymV7sU9rVqZphucrx6RLjDlCJR+WJI6Vt4RbloqdDC\n5PCny/fO7VhCvEX5Vp1y7wyk79IGMuhPm9V7Ep30JRdK49mXoZCDD9DEno8g\nij5oqy+rOG1hdzHIrTOmlbkpuB34l4g6G/IM+cbLRghqWAkHxU69MTiZqwaN\nJI8D\r\n=BMxC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+ZTLiUVfTZKeYgpRLBOUqLQq1g8wSjaeinG4CZq02kAiEAk3gu7qO+U0q8dYAOK2txiVB/ucfh+Xwkz+NUKn560M8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.150_1616003374304_0.2551913949200646"},"_hasShrinkwrap":false},"0.0.1-nightly.151":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.151","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e17dfbd9626391c6e57541ad5c47ef06f8486224","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.151","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-oxKhsyCbp1df6vD4qRs+JcTUORk9Mi/AHYf5NsHoSyrrbaMIRS7lMYgt0thQjTZn0S9d/eLkDjn4QSbj5ewt0g==","shasum":"79c09ae6ee9dd551c03e9511e7103662a0885649","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.151.tgz","fileCount":568,"unpackedSize":7094805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUn0KCRA9TVsSAnZWagAArCkP/ifkf7F9LOSKHAd03anq\nIXrMhXLj4mp/UM55LskiFQVE9rSW7YNSW9rtMrnHmIUc6AAm2P2zT9ZIecUu\nyvt6WUI/mEfh9oaJ5Ux/OL0TPheb4T1Z4uDrArOdhkVNO3n33wJ9PP/ul1Ir\nJjnPeNUzn7byOPp9f8Vr4bXwsVHu/va9b46LBl0qG2bIk6CkFSuzcmqO+SST\ns6Dr4fDUc0Nz1c9SkJ6Y9aRnew5KlXBZnLyTbDBR3kn0P4yHHz/IPlxcH1s1\nQyNjplq2kM7xez+liaoVZalUhi+oQvvyimeEUr2CgLEDa+gDfCyNCYkpxarb\n5JV/ICVuXdN3C4nCsMJz0eHj1+FmSrdUFOlvU/YcprKv5+cTVUWsLeo4nrvp\noVVJAz+BUjOYrOZlhIsS+MPLYhyQmae8ZyUvbKSZQvwkYOlPpC3Of6hjnfmz\nbAG4pOTnxwVEOJuo1lPVJPktDPNCH7fidI/79/lNLce8SKaXruG/JI49G43m\nZeRqIBCOB0b/FafZK6YayDYxsL7ZqboVlNT6QIhJx4G1mFgBCH7cy8sxDWTL\ne4o1dfAPWmTKSY68h7dlUuX3ieeTwbxdNTKk93mT3qTfGgLWTZJwtdrwIF7r\n4ejweH2xiH78ULIs/miU2C5Ruc+3Vu9K9WnaVFTlkS0i1/e/4WmORsvY3DvA\nnyr+\r\n=1Og3\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICVWPu1GbP0ri31UfBwJvKbqFagn1tF+a9EYftsjuNozAiEAoNN923cDDppp+ETA7Bb/B9ADDwDNTYPhE11FJK6rnlU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.151_1616018698159_0.900089376468574"},"_hasShrinkwrap":false},"0.0.1-nightly.152":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.152","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","build:compiler":"bash scripts/buildCompiler.bash","test":"echo \"Error: no test specified\" && exit 1","test:compiler":"npm run build:compiler && bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f446a289e2bbb2df01124a5c56fa1c2d2765e6b8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.152","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-3xYLdka0ESxZQvcddtgllKS1O50E1gsUG7pcNdH7r41iQZNPP18UvruDwv8Yf8uBHf18bHFTaD2dIYtxpOsr0w==","shasum":"8a32b15f5b9be2b26a330cbc2127524ce2b5c0dd","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.152.tgz","fileCount":568,"unpackedSize":7094805,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgUrnQCRA9TVsSAnZWagAAJI0P/0yNbVHKnvwmL+C9Wj+F\nxT8Hqt2QZRppkx6N+tU4CIcyvITSJ8uVkP8Q4fHLGKq8f93eIAGqfsvQpEpC\nAJ9aA7plfD5QoBz8D1HHlcnksdWQoXyjmRTgRcM4Bak3REKUSoxijMzm62E2\nyz+YjhCLCGTcweTee0Qgcscz9slIpYiM24OTNmA2Eixat1Ew9pHogS8S/rPe\n3zsaSkqLz1WQNfBLURhaMHIcorEAaDqAl01t/0psVRY53bpmwUr/KjvtpChj\nQIK9ZjQ+8ne2DqNZJ9tNJubL0u/smcLtcAoVjGp0DDnIA5aTEjD6iWhTYfPA\nqfPbjMQDQbrgpkCwqyooivaRJllkXCwl+YO7Yp08eQSqniMDZZqMjwq94oYE\nFzhk08eVnUrElBxejEcM+5Qa73s5S5xRNDBiKxyO3ffibtZrFlY277kH+WyP\nsTVN8rRaxnpf09GOPQ6+vDGkIq1Q9ST+ocnDtFR0ZiBRt2u4ZR41/qm+Mdzm\nz5hMB3qfMstwO6lFt4OshX40uLRP/BRhAgWntjtklpFS02miQt4mQB9XeS3Q\npfa3pWoDy/mZH6Lcf5gBNxqLRsADj7uI1L/crRT8npGT0RYWYjctBcq3NmYP\nWuYDyUmWqS2/QTIk/64O31G2lRyNCcGbslS6wQsILy1C5uvhJ+bIZcjubJuC\nmWM2\r\n=FsKb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANXoXLOCwMFehh+MeyEvba0MpApwFvDu5z9uox3ZTLjAiAl2osN99x7P1etOwMsCtrkp3w0tvOMDIYe+fIGJwnxaw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.152_1616034255758_0.8725317096139211"},"_hasShrinkwrap":false},"0.0.1-nightly.153":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.153","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8f33adccc2fa288cc87a630ddf10a4b1b168bab5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.153","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Pf2bBcToVNVtacNS9Zivq/mdgEzA2wz9Z88gbis8Io9ramhLAFiNQwmSwtKblrG28ctyKHKV/NK49uyX/hnN+Q==","shasum":"b1ab35f0bfbac9aff4a78ec31884bf509bfab9be","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.153.tgz","fileCount":516,"unpackedSize":2224666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU8QECRA9TVsSAnZWagAAKigP/iLWQieItnwQAh1LSyAo\n48AZAciR7aY+6JiJNJfPacaR2X2Z2vXaNUThlCtSsfUtGkk16LdRS6/XrSYn\ngfKghAt2WqpqZWdBXy1t7NOTU+/pAHJvZsQkspu51KGGUftQhymhJeLgoUbP\n8rUAwfAqlrAy+ZKP1maH4UPK+sFW8LGiqO3CXYCk0pQqF32Q4EveskUnwWDw\ncfujmce0CXJRpVCnqCybN8AJVrMKJh4Qnq4jq2SHd9UWOxsyLV14d8Uonkxx\nFMuDJE1Is1cuuR07psbP+W2zHvuCbmKQBKruh3MCbHur6GggoXlYgRnf24d6\nacw1EZVMDkAZKKtXKrOMC2GAqpcw44QX5800GAWwAleM8UTF5DUvfRNVm6EW\nIUGuZXGH3bUy+WRZtrKAYJIa0ozvgfxFvmer6XIQmOsETQOs3s0agst8WhEB\n3vHOsp3P/ySlsDJo0Z8S9VyA7R00Y/gUQn5xl69fojwQc1YCHisgm1a971BA\n1d1uZkyapwPvCpPe6iBZvioVGeryxrlu/sz3NSO9g0HGdE2rFWKmPec68ttT\nvWrxmf5GrcrA0JUFxBhM3ps0EGBAIarmco6+mAyiu08JS9d5JHALxEUEeFqJ\nBtxo0EYUVTkrVooD9kq8WRoIn64MlTFgvZNS3n2RATKI9a6pG8W1EhvmQZrz\nEA4B\r\n=dvYL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAvN3F8vkhF9+q1vFNk60HLJcQJ1ikrH6GoJ3w8XQVwqAiBz2GMwaFvKJo+FO+XlvaYZEaZ+iEhTfegeGwyautz9eQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.153_1616102403514_0.37148097919726775"},"_hasShrinkwrap":false},"0.0.1-nightly.154":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.154","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d46bc00dd593baf32c2a3a3335ad09648402340f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.154","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-zw1UfRylz/6MaqAdmIFzd0P5WKbCup8S3ko06YvBM3wnBIDdKP91Bcda/qocphBEGT78NMV/VTYuQx/kkayZJA==","shasum":"2e354ac8035fab6e7069bc3eed3c21dabef2ef4c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.154.tgz","fileCount":516,"unpackedSize":2224666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU8d2CRA9TVsSAnZWagAAwfgP/Rk2F7f7g8/yO2SVFFEy\ndwWDBg5fvK2jn4xaxN6RXTICqGI4FIq0gTguwWMS65uR6Z7T46nC8EdrFYaE\n3XWWJtlpO//C988FQjhLmnCnB73tEYBb+DKsHZztVqlkGhZWOinyV7G5QWMa\n2VOZ+uXanV0f1NIBRtl2rShbCLoRRu3JkWNSo5vBjMLIs2H+nt3/KFWpmWEX\n3yMFjFIa2WR6JVst2gzFZye9pTBKB/6WBnArKC4gLZdh5um9UxtGDJcL6ee8\nb8x3ZBGcL61n82mVzaCDhnBvoj/wPM7Vug3A1yotsZGDjeXg9e8LfywDt9kz\ndBRI8MsJfxYb6Ka6qIkVDhxQN8IWSmEt0mDu1RvsXN3CRLniKscpO7nnogg0\nC2JaP+BBJFjwKjO6McBj4G1ZPjaHQSzIi4a31XaJoFur2eBr4ge4uG4fUN3U\nPbb/HhqFEvXx6A1H/6FBH3IQt3/reIhuPAqwKeAsQVOQuwK7wHJ7xhMsa4SO\n8X/9XjWidIrzEnkRj0ukMr+uEaSxJWVXQptAZ2r13Y5sXU97xezwniuKRd/Q\noX7DGRKtvZK5Eo5kJ4WcAdY720tg2QJDpKSMNO0X6t1aTnpa9YW5c0A5gcqg\n4s3euQM/caJrVayfIdBduvnGUFp9pRmwrMsF2X7wxekDlzL+cWVCubIlq9Yv\nx40t\r\n=32VQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGdAxAJUC0EiL9QYZqRlCMncMuoqeAu3tV4VwN+MOOpYAiEAgpByeSPA7ecoIq3jzamKyAMOeeZX8AdbwFXWkefA49g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.154_1616103285692_0.8109502310576715"},"_hasShrinkwrap":false},"0.0.1-nightly.155":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.155","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.8.3","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"28f1cf45324a03fe638d900dbc48f00aa42054ca","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.155","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-kr9m2wynSbUYbnJPHRT3N33WsH/NDcYo1lw2djqFgQrkSTbb1aiyhRvgA6hofqFnsBne4tvryGPTS5+OSp0gxQ==","shasum":"47520c804870ab12c46c209e91a90c0f2aab0a14","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.155.tgz","fileCount":516,"unpackedSize":2224666,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgU9zGCRA9TVsSAnZWagAAB1sP/iH5ciPurxw3JzRUyqPD\nDudCef4p79qkyjO8U35RpR3va2yoX8vxfLkLZLkKwu25K43moMMWrNeeIjaH\nqhfuQcgfbB7gxL+EVxPOifZMwVkvcaYKHN4rJcUglsQphC0oHO3TlvzL8UkY\n08aNqMAj+7aIn6vgvsvUkBHQ/G5LiFDbO0818YuYbngKR8u2s12POs9eOIWH\nKnTd/nBF/5fT6XDUY+PpBe5S10V551oEOt07kfnLc5iykq0nnz3ufbHqUffI\nqaC9jFQg1ALO7mgH83szHhmyX7tlijVKWZrK1Ebynm8DlAgL/rnHAeMqNPP8\nyS0itTly0PR49md/Z4k8h7ijd/QgmDTUk3lHCcptdjExXSAOObEAO9OLY9Hm\nAznuz4JECSloZQfbRdLsBBLOvUniA80+U9oy3WeenEd0eOdqTTG0vr3suo4z\ntRbOsWrErveYRitvyS4sVMR0qK3OY++62a85JWVVXewAdIidTHFZXRmvkDgb\ntGwmU3kiNl5dLH8PsBBaDh5oACWkNgJENFwnd2HcEQBzwgCHZPlGDTL5/q8R\n/9DYAoj9UspHb5Bp/epHotVCOR3DnuCzhj8avM8Ll+HL7oXH58cxDMc2nG/z\n1s90/d6ZxpT3ooHKhf7AP8ExEniXLKSJe2SFp4/09lGJbpoGlDlJP/3QJSrZ\nV47h\r\n=RxAO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUk3Bas7LPw2N0UIuUdiQeB/e/arIQrAQSJQQb8qdLuwIgV7uowwVosaS+HPVhk/NTXQWFFrubLU2vbMd0DQLGKMw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.155_1616108742141_0.8886122640926672"},"_hasShrinkwrap":false},"0.0.1-nightly.156":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.156","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6ad047cbbd7c9ce86759cef316cbebde7906e727","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.156","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-/Hog0COi9VcXrgCrkRJaWMl0eRU+DROM+e92Vkzirtl9numiWaqQkx3TUdLhuA0zhcAClkUdEF+HDEKr3k5Mkg==","shasum":"2ae9efdeeba4a82f5a9e22ac19d42946f0ab7a9d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.156.tgz","fileCount":516,"unpackedSize":2229547,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVBN+CRA9TVsSAnZWagAA4BAP/06xiRsA/NwS5G2OR9Lj\noQ03KNBWJYmJN7kx32/WUvobwi6ZA5f1CaRKEhsFfqjTIy2A3gDI9+BR4IRB\nmI19GNv65h7wFLLgOeviBJgnPxpnapcOpODakfEJTYlqtUmOyTo7wXvFgrEy\nQkwPPitbKdBFpxDCuwVeD7O2Y5x9/uSYO/HkShZ9X67oVOZy8jpOvbHD4OyO\nhQ4rzpjc79C8UsIOAUgy1IPMUbE5Nk5v1gfVA9YS2bR/y7wkD8+DH2wFi1ry\nTKyFeOyibSrdGFtClIfXBvossXLogj6MN3IO6w/5TmZO0me64fEPEaIrKjFD\nmvkP4wwmH1NHf4sMjoIKviLhWkanM5PpZheIUujzB0fPJMFA5BHIRD93xWGh\nu8JklPSyaZ7JjrDcUsNOdMEdKy9BKVNBYXCwuzQZvMcCo+lh4HB4atXoEeTf\nSd2ySsFp1vAHyPhTYg6pTCeiPKfC+FVDMVk8Y5XNnmGgn3N7GFGhmTi6RFza\nW1uHGXjUwGVVM6bUkDJSDRSe36JpnNbSzKTLsPKpQMcymSUnPjKXxnBt2ecj\nPtwMG4cpb1ng+mcMf9yruD6UxVkikhGuiPXwN02G+DGEOyZdfEzjdBBS+A4b\nDReJYAfIhyBFQu3p8CNkMyzKNeVs7XzHTLVTX6tyi3rz9i3+xT/ZmnN8qCBI\nPTnC\r\n=+idR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFpfD3dseUrAgQUrNniw6sP1FaET/a5twUSOFSQjqG0sAiByvixrVCI4y/TW4OEVBQb7ID/fFDXlAMUOUQKKutLGrw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.156_1616122749739_0.8849713701704092"},"_hasShrinkwrap":false},"0.0.1-nightly.157":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.157","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"57e3c304decbf93907159787f4fa60e983a8e787","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.157","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-RXnwmzIdHrHvKUCC7rRP6rv73XJqxgfzQIT2N1zDlu/JTAnPAzZdUlUiHr0xI4x6QJBgfE0mntZQcSVy6TtwdA==","shasum":"1fa3471f429d2c9bb762682e7e788d29cbb83e53","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.157.tgz","fileCount":516,"unpackedSize":2231186,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVT6qCRA9TVsSAnZWagAAXYIQAIAdaF0tfhpO8vu+JXIU\nG7mCqQxE24LAECfvEYZW9Iw5ObTC5btmHj6OmwBSC2E4EBMphjXT7myrul52\nzLLZTfdrAKJpgpQXZfBgRnMzhzjEr/fuhaVr2pC48B6l6g1XEYPDMwdsilOg\ncU5qNpogcgL4UsOOFZMBvXX2FhzHa0EXCp5OmqW0wkkytZhN9jf4tU3geiwJ\n1eUF1EO8i29vPrZ586FQhcwOZXFCFf59deLHANkYtr5gIAg0HvmGT7m+7J0Z\nle3g+7p3JKj4XMmZiOwAfSyiD8u/EdawtWMnIe3cQSNkvSMpTHNykyF7H0RW\n0ng/NvF8Kz1Uboge2lzrIMW93WOnm8HQQuikjRBYQEiUBtorsgX5u/SgjymR\nASYKaln38dJlCSf0x5MWMRQIaNKf7hxbDU86qVNGnfywtQiqEW3qw8d6HhBl\nW0hsu44y1aTCzNKqjRk5yRnOz6WElwFgX7laKINar9tVfQoI5tomdkiL62jp\n2jmGAgHiNXGXzLL9XIq16bynjqWNhwJbCKI0NFrLzyoLiM9MYcJtZ/lpOeeP\n1U+mpzSltNOjYIex5Db97ZENaSFsqswO3k7aT+6LjZ+Pbpl/YHEsKnJ2G1Oq\nQThtDgkcs/B3QWUFHmfa7oGyOP5sFu4BWlGwYPN4B5wvRk1UEBH7Hpk7crD/\n+f8O\r\n=GR9t\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCytnpz+UXP8NQEiImiy9FNW6FmLPXiqHx/BnR2l9F0gIhAKc1W+g6H2LJ1hZeYM2tNjHDateLA0IKtO1X24iqmFhI"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.157_1616199337734_0.06312188126407237"},"_hasShrinkwrap":false},"0.0.1-nightly.158":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.158","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"256225acb305e8ff3abf52e1737c0c568347a186","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.158","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-bHSGcarFF2CJZPPxqK1JqBD+BVJcXjNeWE/1ZB880Z62PD4sbJRmywoaOLh+W4oLvHGvGVz21LSieJhG4dBgig==","shasum":"dc5474910a02a86ee941a1a9cc74bdcf252ea1cc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.158.tgz","fileCount":516,"unpackedSize":2231274,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVjW6CRA9TVsSAnZWagAAICUP/1Jig0uZVoSt4dvlZpBX\n1iJh8vJWTVvY2wvWfw3LbdjvDKgQFvG5IwaNJ5RmZq5FQvnLVgQOEK+CJoX6\nYB0WuMLhMowua8e/eIoFepjEyrNH/z+ZK16X9J+YafdhvZxmMRZR4aMcgrqK\nWCmiggqKmhBoqWpeWTF31Uo3nID7eK6JN5e2sCp3Ssg5j0xMTBcUn6jK7+pq\nPcbelYVekzYKGva8D5XwHTq/77+m2yCN2zv6Q+ROgJ2bAh9sdytPNHXztobw\n40bhA1Et1xSBCxUoRXDQY8P5QzTlbOLwbGxAKJi3SKvy/LGXGLC3Ck8GZeSl\n9narp/WaMxXiZtyoAJgz8vmD6cRPhJTcPAju1qxaoow+Jo5hWfGR3V91u0K8\n7XWnKykNHOYY6BhDEwfyKDipsJxW4pHfx95iMnRNEhKN1htl1OWwasQaZ1sb\nIOAKWKC0yGqqv4SNyAMCVLNKKr4RyftUpluXL8HsVRGeBjwtfTgskD2zLgky\nSAt8pyf12gp4ckrrWpbE06X2ahMNyAeg4bSMTqirN4euDgktZfNd4HB2stMV\nmZdxicHjtsIK4fTiFUVWdPdRr4UtFLdGPSJggw4by76mqKF9vDJkKp3sD4Ly\naK/T51/VDymfdwuZ16ioQvqxyEv1f9/pqNh8fuCaPMoMVHXdBnen6uReBchE\nalnU\r\n=Ix5O\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCURmc2QqVqX1o+PEAlOCbtBb0NIxNMifVXq4nRhOCO6wIhAMcLhO+lH9NNNkCtpCO+CfyqCZb0QFeb9R0na0o0d0Nu"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.158_1616262585911_0.2707049600648306"},"_hasShrinkwrap":false},"0.0.1-nightly.159":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.159","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.22","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"51f120c951d60f600e4940f758b2b13b48c93850","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.159","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-cJsxTXG/EqwR+XOttsfECr/wdfbcBU9VElFf17M5HVFSOBNADwNZj5WHcQKnv3dqye6qjbWePyda0v6daGa1DQ==","shasum":"68c1279725598aa4fda62c42a483cfcb4b05cccb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.159.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgVtS1CRA9TVsSAnZWagAAVokP/02N92B/T5UV+D4Q9ZAr\nFt476l//76kOV/AYTsVB5+C3KpdDfIYcKwGSj3RpQlDon6jUJb2zB0tX/nGJ\nEceNxFhHNt0PBEAcmjphvmDmxVzGs5z0T9diGpLwufcedHfbY0oS9bTyifue\no4q47oa3Q3w9f328XXUmlc0+D0jfdezkkYPOE4KfAqGmJdrP3l1ozjSUgfwY\nBMvsBRPtnsJh1qcfv8JMaInhDleUowQS6R3ALZfYnwA4nbEs92n8jv6b5+7b\nhGclVOHGqe/wghF91S+ROg67N0Cf5hCfCBTdo86LDbgat2s/FB4bGRKPsU4U\n1wStS49o5pDLaUMeE3wuSSaY74dZYQ0x2qPYDQO6+qbPu0PcZ9J6nMec0n8C\nICRdmr2MNwAqFD8R+viBIcxmaiivTeTqW/eTlwUcLs0VKsAmgnZpxTI0vxdh\n+SLuODGkOJnPULJpXawCmbtKNPDb6N61DP+DeRY4c4zKKmoVdeRpp79C4Hj5\nQKxzv5IENufgcKg8V4tJvHfsYzZH+lpdxUlY7huBcCGAQlW8G0l/+40ZCGzi\n11tKHYY6GoWtBy6EJAYXLE6+UKNB0ngWkvfACP4p1vfH3hzkTgGUXTLRy3fR\nu1HxxMm0BRnM250LjE42wVl6H2A+ZgSjUq5M2lx4NMpfF2q+co7J0Pkr4CHs\niUc5\r\n=RPEW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCc4p+IckQMHc1Q37qUhHocaRnMjUx1c7j7csx4boHe5QIhAN5sOQxkMpPcJVM6KtvDyU04DymMDyx8Hn7wM2pTfXxY"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.159_1616303284540_0.4674329469741867"},"_hasShrinkwrap":false},"0.0.1-nightly.160":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.160","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fba896038a5ad1c0f277b218ac4383b1806227d3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.160","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-AZlL5Kq4z+djxCt2zERqtH5u53GIuNCarKPhwmELBQzds2r7ULLRi0Ww8F6eDKmM4u2jaXpKwT8Il94/krTXDA==","shasum":"97c28b30d305be7d88c18ea9270c7a7fc30c9d56","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.160.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV1T2CRA9TVsSAnZWagAA5bkP/15O7C+PnqWrN6ge1X52\ntH+JEI9373mDsHR4l//OQ/eBkJc8VWvh5MJ8j1vaPdct1P5TH3aD5b4wcQLq\nv52wIqa+5Ffmpw3t2gLr80SBQiyjzYw3KHE+8Uh8hUvivnXMHmVH2enifmyd\nVm98z3GZyNxQPaiNUBr5E76hYr7WSBYu1m6sa7MBVS5nUIUFU4vaeV6qc8qo\nE732hcNeJqxriAbUfZaN3yahFSnMOthej+hk55bzYYnio2qGiv4izqQckQXa\njeoSKqlMOWLNoPYNv4jmEwvqqoOcMUF8pGLhr8Mk+uuWO+4CkQ6U6rD3MQ4x\nW6NjX7M3qORCbX4jxGW00NE12fwFVkmszHXDoQWjAYfPEokHbuewJYsFQVJt\nIzjWgvEEtRNZ7xBqHxSjBkRr+AobWCErcB5kgm1AAbKR3TtrTZv86pZdk/7n\njZpdRTFIt1lNqpXKOFr7IAxeSVNF7Xua1f0q6p8KxnN0EU1zYpH7G52pGAqT\neFMmJ0ltxMPW8td6kjaUh6Vaf57BXzsgwPJ6CtXPylLVqmTFrhRCkXNq2QTY\n4g07P7JZUkr9XSxnn8G2A6khvWo0waiVy2E4rf3pxagz4oAXA2DhtoJZ4t1V\nideR8viUwBdTaI0SqAO0zzcGnnpbkujJLkTdcW+/NaB8/OI2UC6OvByN0mlf\n//2G\r\n=feUk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHxCif99viAXYz1UY9Z96Ywj6fgA5UpIBW8qCjEagTtTAiEAndR5OxlpWoHB0GxDZ22GruiEWAMeo9YPmHwHtCpRIKA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.160_1616336118299_0.5402899453349985"},"_hasShrinkwrap":false},"0.0.1-nightly.161":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.161","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"601e08303cb28f7e04bd9208dc6e1451735f4bb2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.161","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-V0t2gNj10R1YaRGQxtHA9ZdIBGIjUvmQOUh8Oo3jdLUWoCJqZaNFBeITSQtiH1K/v1TgM5IqxvXxcZClqiE52w==","shasum":"1ca739318198c39dd632f3c4e6b9a14653700b1b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.161.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV2CyCRA9TVsSAnZWagAAY0QP/1Vdv1cibGJUUhl3dm0H\nc660JKmbic1Bf25iUObsO3o6Sn4Bsjpes09weam6XIoB8RDH9EL8N15uAtsn\nxrvzdgptx1YLyCHO8YsNKueb6GOIiLLJedGdlHiZK2EquYDlm3M1E5l2XClx\n5VwF3RvyisZfxx0KPA68iINdZtMWzDa7M6EM+0Hhtup5ftdoDdWF8RYk9i5s\ngGag1YCSVmgz6rMdBdbyF5nn1Nqeek/piWPN9qX/qkymtCwTpg6gGXib/jGW\ndGYWWVW7KCt2BHEP7TOBL7/6G7VlnpxIYRrOsHUba95bjx1vIzbvH1ucwjuE\nOgi0DkCAex3QjQpIiBc5APo8r5GiS8HWMAvu5A00jZjncoTWiLfmGC9RnyIH\nUFXKec2fE+D6B8mMB5TyOBJsP/xc2663wx81eqKn+KWeQMToix3npBkxJ/Bh\n4BMA41dTyKTyZNWcO/bMQ8RsblYAgf6JfED/S9Aq9/VLlplILlwFjlvVR28l\n7GKZwFY9WmGK1+iHTwepTbNNgGVtke3zT15OkkO3qGg6i/CnEp0xE45/6Hn2\nyg4ANL0gAOvL+y2Oa20GoZdTPU5STe/cbff55hNDHknyNOuhS1AAJkpONMKq\nJzGmsa0tPXRf7cZvgfYBmTLPi1eJfiE77NuybMGg3+TlDFrbEZLxS9RWN5kw\nqotD\r\n=eXDU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkshfTURvnaIgcxggYvhng3n/5wo42GjzYB06UfsI95AiAXVDVZt84Jq+C7/GNJZ5tEa9UIbZGZMKzfTYtC+8Dv0g=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.161_1616339121830_0.39628870279269046"},"_hasShrinkwrap":false},"0.0.1-nightly.162":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.162","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"11b9a2ca2276a4fb7a7ea004fa504329590c3b54","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.162","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-r26yevgk2LEZZXnIQ7BZbE9YRjl/ljgLaUA91vkJD2xhKOIbsrTGaJqWyeX7+wmnwb8hQR5ywk9ZVk6llwNK9g==","shasum":"22bd892b0dcd679ce3007f983a5f355cfd0da4f1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.162.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgV8urCRA9TVsSAnZWagAA11sP+wegRX6Pm/36BAg1CmBw\nM8MiVyEdXVv3299j+TG3EpGyPWGv5grfdcr3eiiRWLeolmC8Mdch+mB+vB0i\nedJQLz1xRPLud456ZPHbjAhX6HTu49vxfhGy8tSg9+Gy9y5ECRdmlWyBWCiB\n8AZoRSS+mOCzu9S0x8sBfKx9dgDldvq+2E2k1xziRgTrNOtg1iu5S6aFF3Dy\nHpqc8bh2me6anuh6EzmecrRKOO1dVMvMoZnQChe1MYwJSINAIEZpjCQh9in7\nIzmg3jadHI3I+K2iXOhh4De94JaUSXTd/ucPXAvisBnDoYUWnqRmRspe3l74\nOJTUJ8AI0fctL/ZMDI4Yy7zxkSIpmXXDM3BwrjONa4oHrjfUg9fijKlmM0Rj\noUi4Fw+1g9yQlRfrH//BOWmt8GiYU6ogmvW2KfuTZhjB3/9gmIF3r8ou+GBO\n1uC7heHrXwMRigoeBziQpp2qaoQcK/YLsXgrLkHTW8E3GL8eOc0P7ZE2Zpkm\ntlqHc2R0SUfNtGQBMgM8h6xSgvcfKmfkBiDp2WRmmBIAfPxzFOVOM6LGIOPD\n847/Mp82wj2VmpTPQ/GxmJswFLmbGMgYsyPcfYOJ8u3ZWIl8vkxaRysQV1yl\ne+vzQhXsC4XfORNl4k7MOAu2RxAnkLeUXlOJ6xJVNUaNPDWxwZya1wuIKQsj\nxFo/\r\n=7vu0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDr8oS5h6kkMfKDLUNQTN6vkEddVdq83L7Gl77ResCMlQIhAO9FlYUwQ9iowMGwgIJdEiCR9TuhsXtBYnJarIaGpTfh"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.162_1616366506482_0.44988926465628"},"_hasShrinkwrap":false},"0.0.1-nightly.163":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.163","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9b9d698620c9c5fa6816f45d1b8cc7c0d5f96c66","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.163","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-NvcaR5X1whQTMpQpuSG5aV3YuTnxxoXTrAVLeF7gSo1zDOtRNsmE8CquSokkLJRkKG9l3VmSQ3hp91373YE6zg==","shasum":"f9c65d95713958f654bc8fce7ca941c7b007c248","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.163.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWBCwCRA9TVsSAnZWagAAQpQP/0eRqP/wjP7qRw1/wwM9\n6zcn2GiOBuGX/EhO67XaECv51/14xsnfm+tF0F+QkDoGlYX8u4q6wZnLf3D/\n5p2WviNxBB7/rzlm/w7vGxVOLrgxyRW/zHuRjSyLpi3Rlcul8vGnt+EhCbr2\nsWSPN2nV1nBzeb8AWKPctZ6kS2YgCZp+inv17wtSElyQxcj6jvkJA8ZdJn+m\nbZtnxE5sj960MB9jTiEjfhy8GRb6Ll5CmsQuzRYiJpTV//AHkp/W0Umt3XBL\nR1wqTe4keEw/5Na2aaRpFZeSW5TnUoydNX7CpbpveptzAoGEsT0b+ZWT+CS6\njEV7D4e1sQgI5pCd5u89mw+/wVO+qHTy9YBdWQDVAAXMSxzcpELLSjMyY4lA\nyrZXpPz/mkyvaC6q7uZn/hFt4pEQYDHRfmK2bORMZVW74lCRWdIcrcm0shSk\n2rlgDH13IIpW5k+iWSLJb8DL8Yvz3Ij/vadGr2PES5boBIkd7k2d9Puxxrgs\nVSSHefrlMM43xrdlSQaty01C4Zn5cPip9yMzFCGqgFqMyGiORp29ok4jbN+/\n6yZIMLDhg4LaWs97yuHrblwOMQPBE+OAMhrio1NgqIdGVo0EjbMN48Ve9rjP\nrz9IlXl9PkF9kmdIWW/WhjVu7Q/SsEFrth41Vt4qczfnOltapay0tCNa1TPW\nUKn1\r\n=S2l1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF04PV8EBm5rcVsoHyVitufeRW+veaajMFiEtlG2bXF6AiEA33LMDwygv2PQn7Z1kME+hzYOd4qTX2CFVQ5zZM9SjSc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.163_1616384175429_0.8096657376827134"},"_hasShrinkwrap":false},"0.0.1-nightly.164":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.164","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"da5e658d50a81fdc2894cf697d1c0cc5e4fddf96","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.164","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-x2wQj9PlfKkk39/vt1p0Cabu1CsqsjaA576cPy0EEPJdxYM0fwofRr5MTYRZDPWl/6JzN4zuKX8FM1KZGK4rhw==","shasum":"9fcfd9fbd64ba605e509d12d3f3729976a83047a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.164.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWQqeCRA9TVsSAnZWagAADdgP/Rt0fbwP0EDy0IdvBEJb\ngJm34y1Hso3DeoD4TaZFhIzmLrhBXUpt+giQsO2J4omLDDF5EiAbR8Tujyd2\nMImP5yvQMTzGqkq9f+OSBFmF2pZBlcX1TyHVjTYv1tuaBsSV7ytoaau38Pal\nwB+Ep93WEWyyJQki5tZf52S9pike2ZNWVBIrDTRakL3glRKyws4d6rK2T5uY\nB7tB001JX7suJ78sLRFBPZKsls5cLWowxPnGZlvYkaEx1f+BvVR1q3xh0aBy\nZCZ7psuoQhTa2U/yrLmWxGclvbx7/Tf97N6WZW3U2mdPl1rYzsyiYt0gxW2y\nbXj7f1ogL6sAfQdhezJKwB0CdliK1ckkqhKufYCSlr+CRFF88RxCTOFX2wp8\nVM3rvPaa9H/4iizvK064I25qcJPc55ZkC2Pc0vDHXosDrC9ZJG4r3TUbbFbT\nC017n2W8H6SIU33eJPdnCSAYL46ClGD2MFPgrJnZjGI2V1rM/OHNn4fT/7EP\nFY22+7w34NdH6rv1RAhaSdocIG1h11LCu0FAJodvirQoDgGI8ohdq68xMl6j\n2zA+IueCyb7rkRGQG+f9AtOfxBFx/JbfHT/M5R6HjuZ7T1VGSYgJeXQGZGhL\no4BgUbaltBlYAa/NoFQ3zi/M+I8XAUjRPn1s8YtGOEaahC9eRS/O+JW7t0ZK\n2kDd\r\n=mOnp\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2tbubJDtfUHd815SUXb/+5tmkQlX3X3LFj1DMA51R7wIhAOmavqehLiEgJax8pxy3+vi84Y2k13ay19eHr9nTydYM"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.164_1616448158160_0.9709145986878434"},"_hasShrinkwrap":false},"0.0.1-nightly.165":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.165","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a7e50559709e0f32f10b56f2dc51f3a93e3d0953","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.165","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-IGNvNIO/w2DDF+LI8FpTXn0e8w7jqo0dZ5jFMAtPcoxQuLnp/tol0VJJ4HVag05Z1OqHDrGUhmSgSD7bH0fCOA==","shasum":"f393c0604bd067a1a67a32af601e494847b450fe","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.165.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWRrYCRA9TVsSAnZWagAAnQ8P/3JIAx+aQJu4yEYYj3+I\nP/BAst5s5TQcrsKjGyhlH28M3T6yfTS3q0r9IW+wwElunaY1w50dfmBvCFhs\ndiBksT3IRoy+SzqUbxtyiFRctyXOGcQjJd+36MckVuh1gvYCWvsun66YEIOb\ng38oKQhZj1fphoJtH+t1WdzqPnfh+dcHrNAmpY9x6c3SLAubvtmt3fFoURb7\nnGrHI/3i55+z9ui+RKJpTE8UclNYVSe7WWCspewruh6UYu3rlnjJpHOZz4NN\nEQQnhpV+kkn1DQD7xjESBiQqla2apkiH98LX2RbGwR4r/ScV4YTy3zCCpUuC\ntp/dcpCH2+vfVCDyMVrt410u/AGvkilht3u2ycFguO/wfLfEk2z1U2qcFizf\nSDxxOBiqsY2tb9j3v/QjT6ruuVaawLCib0n8LWlxrQ1r/sB6ylRNgSVaqUg1\nThuPh9r0cJ53RAnfNtd1opFaZbhxuM2GQSBDveIgXWVFNtU6fs4FRASVhvum\n40FtdhZioDqbXwXhGD68EIgOOWSBZd8yjJQNP5rqTnsuFQH5FBOw+Eu1LXAr\n3nNzuqZElFnQ/xdNt3Y7Vk1i/KFXRfSD/0SysDntgHCoPg1QUubFkzFKrBN6\n0OhzkehZZI40y8/AAkL5/sEvYd89Jkl2UyAdc9QQX3eUvZbYAPC2RM8cURXC\nNZvd\r\n=AtH5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDmw00vCmJr8/u58GAdjZXu9Ci4prCmGNF2UwoPfc25/AIgL2+hBMju4/mcGQHktVnrTmOqevviB+Z8d2hDLCDsvxg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.165_1616452311582_0.7028406441268427"},"_hasShrinkwrap":false},"0.0.1-nightly.166":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.166","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3fe86e9bd6ca73bc68e4934b953f6196bd4b3332","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.166","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-qfKT2xHnZE5Ki+VPPO7JTd6pQ6RaZNIQKWggsUoVx7ysurX1okgKp+5CcVQIW4nzL1z8pqQsjoMbWVxGZYx+mg==","shasum":"95509e4d83ff4f43b9f9db1451c1a92f1dcced5b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.166.tgz","fileCount":516,"unpackedSize":2233409,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWUNgCRA9TVsSAnZWagAAPJcP/3laYjsqkG82SFn+wblB\nicHopok1jLg9dbn+T/GBZI/xuRJNMqj3X2E+cftPmYGlvnfMOjsJ3kbAe2Er\nt9lFhIe1pykBfgUqusIx0dz9ek78CaLreHOL366Z3XHsGMLs17VjL1jnrOfY\n/stjiYNvab541gqSKFMFhRRVHB0vLFk5Srat+jTmjxcN3GNApel8aLbDUUuX\ngtXv+4yjNKPoCp5+VNIOsU//P9KVoIfUoT+1aEL2vdy1QbtCx2ZwhL/3RqNw\nZpaWU0cM7nB/YLS/fZoozbEZj8VF0CEp32f05y5fix8k5itg9HJ5w8DnIQCU\nmrlPmi4/SlFs0C1Y8lFMJq4JfeIi0poM8WJ3J/CzmvjN/Zm9T26voEA6TSEV\nDv8UWRij9SOlaTnCvdbJ8Tsl1AhrUFXd66soUUYftfy43ouauZkOZx+NG6Yz\nml1lZeN1BZAzOGURxoNYjtFY7/nL7nA8cnpiXUfITZhGaWqJB+Brh0ft7f4Z\nzmWOz4WZBuzWQ0aL7o/5wUgRBRZqvSfrfuWFp0bb/LBkkZSr8P01k/r90ZYU\nQOMaWicl3IzbpEOsK8Jp8IWRSBJUo9n7i/Qb5Q+7jOy5vH66Vf4VCUOXou+j\nUy/S5k4ZtcyehnQpeVSQo5LrXXpdC81EF8W5Cu5uAAwnjtpuZgE453WIdnMW\n+Zyk\r\n=GAce\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC0BglJdRBSKJjdrGr4XSeoUQA8SNA28hIM9mLhbv6oOgIhAJa6jt8kjuDBexwb/MU0bA1oTgsLl456DhTHxVk6+hnw"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.166_1616462687978_0.567595906317081"},"_hasShrinkwrap":false},"0.0.1-nightly.167":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.167","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"60fec91521c2903d1e71750e1568ad2c58727fcc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.167","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-xDKIF398qjGIheYS4OQyos/oO++inSqxNiO5M+ooCo4eiDruVsKiel8muG5EYt3MnIdCmnmZXYhaA514OO85sg==","shasum":"0443d53f34b1f143985a7cd097e0989ce29bd522","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.167.tgz","fileCount":516,"unpackedSize":2233623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWVpgCRA9TVsSAnZWagAAogEP/3Mcz39OmMqcnVqmMw1I\nplIx4arSVovvVAHijg+1foifcIhNqHjgYiuIyoFNIuZ9VQqtGYuHpX3Wa9Ic\nFoM0fYSGAANJ1ETSLHEfEHYrL4W2aEAooebMLyOe2pnGuTyfI1KkngjvBOm/\n6dNnbJfz/uYHBbgTgh2LPoUUCJmufYOJU3LZlshQNxDf123pGzYPJ/PEgTO7\n/P4XCnrEDDs5nE5Fbsp8ZyBf4KMv6C1QqhAVZbynZynVEWAcb4Um5Hdapjwi\ngfPtbMPUxSi2uF/S10bOabPbtfz4hOfQlvHQDj5+bC6u9pmN21B2jWiaTbN/\ng249efd92NRYrj4eJcju7zuDws7Q06AHgek3qYzWAEORJ49FrUbrGgviNMod\n0JMaYr/oxQIrLnstjc6lAaD5sKTj+uGbaFqpmoOIoiHwaul8aj3AEGwkbbBx\nB8RltqXupBog3HF6hjE3mDemPRTvgxiMUJu6NvexwwxlI7pHP519pjiNydaF\nfwlPJcKycyO1NmCGiEahWjxmxBXl3UjHZDIdNjjOyvh4qJM0decKPscKz8F3\nq0ucur6yu1pB4WIbOTtnLQrtSiGQTKIrXLjY7yMNFhuC9eIQPeEMfGPNIrly\ngvyUl8C83HVG3IjPrXO+PzHyNCjq1IfyWMNnzgZePmDcSl6YRcmBCyDzjgKH\n8ewc\r\n=rr0/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCpH2xgwfbmYmq6eABnrYGNdMlZTRaPnqCpnCJctD5DfQIhAPSlyAeoAW3wU33dlqRH4l95vLJXVSYqG/566eLQYlKe"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.167_1616468576100_0.37546263269939395"},"_hasShrinkwrap":false},"0.0.1-nightly.168":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.168","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b78b256f1aade92dcc932b85b3e711928337611c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.168","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-9IG/3hlQuAXGmIIJUBsFiCJNZEoHa8tQT+byNgcjcWSXu+TRASWdj7PRyG+ZpyYaBBeoAM/bEEhHieI0Jv/PYA==","shasum":"a4e46be5282842a4e048c94a9125419cdac3cd3e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.168.tgz","fileCount":516,"unpackedSize":2233623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWe0MCRA9TVsSAnZWagAApWMP/i37/fRboCO2EIK+J9uP\ndiPONzNC3yuhTvECa643VShLiNGDRds4P9kEw9tXYvh3cEEFq9BbFBiO6+Dc\n/z1zXH2EkfN/G+536H/tAIlOgPEpJ5w7liL3aug4lpkbCdgjBPeMqtcGQSj2\n0kuumwl/rHBpDsUdEuXrHAyzlGAzFzKkn28iHr9BNtSGMXrPeEoFwaFRCNE1\n7/JzxmZPO5ZYmtCWqVlt/hWnB+/6qG9xUFChJah7KWmQnxg4epLVmCswu7zO\nIZ0xzdp9Sg4YJJFH6p7Hh4RbpgJSZY+c/M6wXNf6+yuSD8wS9oNjD6iS/PkA\nIz7fl4tQWVAs3M4S2eI5cf1ua9GBFWYNYBrkXj42QV9xOehfSERkV+gC1k61\nAlGLIQbV7Hp4iLjMazeWHBR8HAU1Do/GkKRQxnX0Kx0VulrhqBRf6PmP5djl\nTxxhWbrz8VkI6+u8S63h9qHIgJeD/tGdyXQ5ynETvizo7JvKWFuY9mbfFJgX\nnn7HsUkYRlfSwWbW/dyaiZa3XhDwbl8zBchGPrvhpBHvYaE7f+lkj28pWr/5\n7nu0rbfyEG2CUdIrEuoPakZlsjGtVlJx87oXx1MiTQN8zrzruWKUHhu73kiy\n0OpaKER/4bXr7zD7TWWrrOsPpqfNI8xWnlzIhEplv/ZFE9HTNJjiBScXXqZl\n+irU\r\n=707M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGgcIqmBqa8RIYbWpoGdWdp8K+QE+cT1NpToemN9OwyPAiEAmMi4TYiJ8O47pKmPpJwwXUAXWIMBmIZozoGHM+Diu+4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.168_1616506123910_0.1435455944766466"},"_hasShrinkwrap":false},"0.0.1-nightly.169":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.169","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a single `.hc` bytecode file which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\nEach example can be run over the air directly off of Github using it's corresponding `.hc` file under dist/.\n\n## examples/pokeApp\nAn adaptation of https://github.com/iampawan/PokemonApp  \nShows off how to load data over HTTP using a port of the `http` package, wait until it's ready with `Future`s, parse it from JSON into `interface`s with `dart:convert`, pass it down the widget tree with a port of `ScopedModel`, let the user search on it with `TextFormField`s and animate transitions between screens with `Hero` animations.\n\n## examples/hotel-booking\nA line for line port of https://github.com/cybdom/hotel_booking_ui   \nShows off a highly customised UI with `Clip`s and `Stack`s.\n\n## examples/animated-list\nA line for line port of the Flutter catalog example showing off basic transition animations.\n\n## examples/basic-app-bar\nA line for line port of the Flutter catalog example showing off app bars and material icons.\n\n## examples/counter\nObligatory Flutter stateful counter showcase showing a simple use of state.\n\n## examples/hostArgs\nAn example demonstrating how to pass non-trivial arguments, including `Widget` trees from a host Flutter application through to embedded Hydro content. See also https://github.com/chgibb/hydro-sdk/blob/master/test/smoke/hostArgs_test.dart\n\n## examples/unityGallery\nShows off how to use `CustomScrollView`s with `Sliver`s and override `ScrollPhysic`s to create a selection screen with all the other examples embedded.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/hydro_demo for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1db1dbc39164e21fbb1c37913df521d91139a804","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.169","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-P5zLtbw3Fm2VmACWxoT8YWQXj8hK6EpkPjBplZTbkEpPs2pHehxC/r4bQqBK5cuYqJcyXkHhzVJTjzq+D9/tlw==","shasum":"19a31a4ea08955cc90ce06bd05130fa63260fc5e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.169.tgz","fileCount":516,"unpackedSize":2233623,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWmFlCRA9TVsSAnZWagAAE38P/2hzw0EOzyfb1nZMw053\n/ZIVKNz1MXxsQXcvSyWJOaHgM0aCRMkwxMY4xn7JGrqsjbStkDEWCdEYh34E\nU5YycdHziVLBj3osGa98CP3tQgSZ8cZlob/nwfw5FILqeH1EctwZxEPjjT76\n5H9QtQcy9ZVjQoKbaZocmENd7/ePp2+tZJEWt9hUBy7WbGUGuZ1puDAcsIAy\nk+PhXaUvJxor2LibYSWQgnuUea3BuEI6u2LYFdeDi/Ng+z7C4H+GKQMxx0kQ\nExpS2Wc5TyCKluy+h0KPjcZC7RtzqQKMAGVdkA5mb2gS+3OJAtziiaGDJLOQ\nulifOuU+BLv/wXIxUJMYv2xQbtrD/mGHowSaQRx/RBgGMlIxCMmN7YUPmxKd\njTXqq+iB5p+8893dJZVR0fa4UTt7wQAuIrK146GBhJo87kaiWoiHZ9LzEzrG\nSLSDi05nDIRMzaVJP0fSbKnuBkWhTelEewK0EHeyqvoe/pIeMXZfqzcBG1NR\nnE/Vd1+YR3IzVUIEY5a7JsKY5h83KIj99dPJPEUOx3drVCouCxXuwpyd1TB3\nsNl0WJIXa9TqufHNax2gMUnCVrCauZUtFf6VdtCYQAF93zXtUDhGiUlDlsDE\nTnypSdqr5dvLXzK+rFS+zcKzWBn7RRO1UQ+rBDbvNbfZYMoJoz3/qx4KPH5w\nWprg\r\n=ALU5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGN7ahcedL55vLU63+BqViRfeKFkTsXvpyOvHPdJarsUAiEAi5y6yuiR6wxIhOgrDJwE/jDVffXhpEwALWY43vZIZIU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.169_1616535908827_0.34532593695300684"},"_hasShrinkwrap":false},"0.0.1-nightly.170":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.170","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"061b26a99e861e4b65d17e945e27e1c6168fbd51","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.170","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-WeJRcRoXDAg26NYlKn0JrS8Zu+YzZC521PNzAsH/MFgCOdGqzO1cgiukvzxpWYgvxUepSmrmVpcwAhQQZH9OLQ==","shasum":"99dae165a4168fee2ede30e9d5590556b422161f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.170.tgz","fileCount":516,"unpackedSize":2232228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWnqqCRA9TVsSAnZWagAALgUP/Ra3TicpwhPtMNau/BtD\nujYgnDX0yemxqMFWqqAQbXL/tVu8vDSX2vNdao/xYQjGGYlyuXA9rkkZHcZv\nVN1Job63BNlEJI0Lpo0Tbp9U+ThL0AWwBv9sZ/Acw0ZGEsMQDPemSfDcGzJ0\ndLwoihb69oMfyZAYdnQf/Ly7//5yRFJfoT1eb4SZaF1v31fod9sPF9WDYCBs\n7w67+6il2A8FVClhamMptHha4yL46sj1Nz0N7mY1FbVQzoeaPaoRu7o9AWCp\nwdIItuHXcSr/tbXo1+DK1q6eA+6S7OMNSFAHhayQLH3ZlHV2uBjb5iUTk5WT\n8OE2yF0Cqd/Xeq3Okt3CjZZioIryrKfCUt1w+cYiThHgvOw324dbgVusoia7\n2uUlRCgO+S8Q4l8PAhax/7kDQrGERujVHRytmfIY1lEdC49lmOTDbri1UI7j\nbx9TTg+g++g50Q3RTnbRF24eyI4KXAC6/u3jDf1fKbs65E9jyh/peAwdgXxr\n4X2OZPTwRSfBt3bnvovTPOirZCqJH6OAGo8TBOzwbGRmxEw6bsox2IyCJrt6\n4HleEDe47oZu1eRBcVArK5G0j1bJT/HMbf5EXR+W5Fy1SJIYpwe5o0skgJbr\ng2JHtJHggPd41VhC612dW5KV7la0cXlK+Xe2tSXgZ8fk4XpKWR5n/7JaHiJb\nn0YZ\r\n=NqUL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGugk4rqYo52tiXnALtmSh2io/FP3ewIeHmbci8/zuGYAiBGmUoaRDGj4xEjwkpBqhiPKoq3nko/+e1FMxqXVxzK2Q=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.170_1616542377506_0.4623900238556382"},"_hasShrinkwrap":false},"0.0.1-nightly.171":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.171","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Stateful Hot-reload Demo](https://github.com/chgibb/hydro-sdk/blob/master/readme-video.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"63b3504c5caf47583eda68a0d0746f5594550981","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.171","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-6jJuzrjtb8k30KbxiRW5Dxp04Og25rRRPHG7RpNLFJZmmChokV6gK6UDw0PXCA7+niKs2HsrDWznCHyxXLnhvw==","shasum":"f563be6628fbc62e634826032704ec3fdf17cdf9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.171.tgz","fileCount":516,"unpackedSize":2232228,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWrCVCRA9TVsSAnZWagAAH7QQAIqZjW2S24TmOouVed7R\nlwgwFGMMVIgOAjr63FzHdHs23fMua3Go85e3JqkzHzO1U50t7k1JcK6kvgL7\nN2Qz2H+9F/0/sKZN06auyxtHj44MH/GppBYgH7ztkRgBTtDYY+jW4Wa4+yZw\n8GpMGZ620ccWUnOH0FZyAu7/VmV0GYhGoh+DsW515K1NSFY5JvweMr/9F6B9\nisnI8+bFivrRfZhi5++VoYNj8tR5MxwD/IWww6Zx75kfY2H71arxFcqb9Xuw\nEuAA4Q6woxMcufzLotYL8jyK6Bt7uu4xNOLP1pN8SN+p+oTAZXoWyTdjW7w3\nuW5DJNbCS9u8jUkDkqzGU0gyGOLdSSsDnxyj3bloH0VWRDKkeiYpDL8/Tj2+\nEASm6R5QJr6AePaAMf9v3NFRek8dr1kSbS6/c08Nzf1bviapVc0z8E7FBjvb\nYbhwmwA2GWRR8rj1esHQnqeQlBXESPZVbfe2TRHMEx9o9eM9K1K4+5E5ocOx\nW49vCRLrJV6eN8333d2XR49W4Zabjlsb0LcX0C9CDgv37oIdkUtPrupUAxuc\nLFOj6HPshXGStLSZ8lw1TwvZxw1ThUU1RBKjAL+gLwRDyV9HuWhaWFfrJgoc\nMe+ehphW4GZAXJgtii9mmtSU1twZonVKH3j/yEkJ72rtZCIPu56jMyTdgKk+\nnMRk\r\n=oMjP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEksm2qCvL8x2TKx5eRHRAMH66Nl4E80CxE+vk9UGJKcAiAuQaGIk08M4Fac6VKarfOYPG1SNuyfZr1dTEhfIWuJ+w=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.171_1616556181036_0.8779118294168566"},"_hasShrinkwrap":false},"0.0.1-nightly.172":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.172","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bbe8c8c9c4a8037109419ecf80515346025612ab","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.172","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-mbt9nJM3ZuY/6ck57SqJOaC5E7muOgFnOY/uAqLA9b841pBJVOgoWHTkk6vEDaFpZSIVka/v6EdvutV4H4bGJw==","shasum":"d681f226c0cc06752cd02ce614157528ebd99337","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.172.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWsmrCRA9TVsSAnZWagAAu4kP/2sXcgIPkxSy9xeoIqjr\nbAxWD1hdFg9n3UO/PSzVhjgEq/9Fb3kv+6Lrx90kZE0aPdQ0RdQ3t1tnd+Rj\nAjszEKxNtuJowY6jrCySv7Q2chUJ2jcUiyJSKCPXTbpUoF3mMoynMMGoHDBH\n4KE6Ucj+7d7VS56bTcgpe+cTZY0idLvtsb5MS5vx2x2/1MVQpBQ0kgamOnq0\nyVMyw5VIbmRQlQCj1F7uPN881Fww7CLtwE1Vj6KQ2CgcImybBm70UvHqCBur\n7mGR/Ii2k4EE2LW2jxiLr9ZtKTmQCUMeiePSMRhmrcSCNOLlGpwG8H7ASdoY\nmFNM6YWaZhvgzlorw9Jcc0rExacepfA/lYrKTeSb7zGeZwsJQXnC6aENz4NF\ngVH5vG9YEcbzR+jXx6xJJSLS9J2t+BZ+SMjZOMXVSzMTIv5A/1OrR++WB8hU\nPK4n75v3uK7wVuBv2RF9v1wG/HpTW/+e20pcS/vud8teY6KYZ2wU6T/hSSGQ\nG+Toyl+VanCRwa8c8jxYE4sgY3T2gkfL1HOJZuPG4tcFarPZtC/BFxTFQf5B\nQnVuEZvzY2ggGpCZhFHusqecOeUfsmIW3l7bMME5z13bW8jpNFSpAsY/x4vM\nSdmfHwXSS6b6NMIyupoG1BjGoXq/irMTuqPgQ68pqrcpCylfed5eRcy4HJT4\n4nfU\r\n=eV2s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEpzcWaysgeT6PC6nXu/rmje4+gfEgImbFoHgLtqoV8AiEAtj3Jhlval1rSVpwMd+4YmOsdvUF8HfVvxJT8osciryw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.172_1616562602427_0.3809281393622008"},"_hasShrinkwrap":false},"0.0.1-nightly.173":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.173","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"aa6df0f57dcff13e763937725178548bd0a4df4d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.173","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-U5BQPXdW/0M55LMBTip6P5o0RCBWYo1139jV862RLBYvIuOHo6EIBZB331oJNCEPo7LTSxqEC4O0DJaNSVf74g==","shasum":"8dc3a59d635e35e74b623e36902fc1ced2e2f497","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.173.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgWy3BCRA9TVsSAnZWagAA3R0QAJQIXcQOWOcZXiq37Pxi\n6MU2iRkjERrZgrRgEFkispfprfDJxwv50JH5qLMdck+ff1fW3n1yghRrJYDR\nDNBLLlResuTthATjjsHzawH3EGJ356KsDKqBjCn34SbEN7zjCTgChHuJo+T7\nzmHdRQJXi2UFPEwUUWrdJa44bxoOcLbXpkfFlloUR2Z9w07it+DXZbDl2yKb\nMFQB6WAWjY727H/L5l3oFbb1I+k7gxVWbmmgfjyikUf9wlZ2Ol0p6RwF9hip\nIc2WJg0GPdjMFPITJW6qbnqcqnfoYG4by+zGsvdXlP+J27GldrloescSSmvP\nYHY4SZUCNPibVfKX6w1mavLmDmluJjwDUHo/aHl1WTdrp8aMLcmbOk/tGxah\nTykqw2MKiH7urcEyQJrpkCQw3tHVDgFulBW9CKWgIHS6UcFuppDfOwE4kCpl\n4iyxjgnGQEtmID8As7GmCIg12SNiK1b1aHp7q9VLj4IawNBCradCb105sosF\n1s7P0ech7l+R74BUWrtmbyyXS/Hc7+yBMCwc6NT5lIuQukyizWwrQ/0f4v4I\nYLvY47gwJYXE0zkzS8cvlaUEAceyvc6Z+C0e5yEt9ZWsr/a1f49953nT/5Qq\nHQna1m5s/CPAY4ds2AuQWmqTxjCaHqU7r2DhbschBcmGVcnmsNcVd+i4Q+rX\nh7xT\r\n=FxXw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH+9GUG9bVl/CIcN1usUFwpyBJJZFn8bCY7R0NohKyuaAiEAkz3TA+jpvhcO4ZgyXSlSSd1SryLAHXjOK4nNg0hipFE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.173_1616588224999_0.5123508888407635"},"_hasShrinkwrap":false},"0.0.1-nightly.174":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.174","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"27548580c42c2659b7e581697cee1fcee8aef0d9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.174","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-q4NVcaeebueylD+NHw34Ow+R1/E9T+VX4z94mPq5f1O7zdYJDDpahy2JBNI1+KX/xZ2mhmOK/7BYkORZPlUuIA==","shasum":"71723474c5d5685ea726295ab93494624e4249e9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.174.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW697CRA9TVsSAnZWagAA/K0QAIbBkgIolqZRKQuAF6ep\nv/1K98DjJ1t4Ww6/tkzuPnpWiwNI0JU6Ww86f4bFy2moAYb4t87OKrCodw/O\n4GCQz9vy8sp3z7gZLfTOuNxKGxnqgEbZc58rNNYoCX9kCcK4DxzrCq/DgTq0\n2C0uClBtsQXa9kStg2iyBQMpzLkautdOy0SlkmTnB8qrw7MeDVTopUpDf5fU\nD9zSnvf9QqsXngDIdB9VcwQS2YaenenHeXA4nO/aoOmrVLLjfJFlNvdwoAdi\nn48I53tiJhkqZS6w/IzYeILo+jg5zu3Vm5m1uDwPA80jtEVkDn7IFjs/u9Rj\nMPx0LlPZVT7geEg8ogV4TlQeufsIYXLj9LcPXEzRWAu3uii2QYKbpUc8wx00\n6QeQUsInx6okMqXJGnyqkeG60/y3xohCMHV1XQC/FxSEwZAQjoDzeFtSH0Xz\nlf7QbaBVZvuLS5XQa+cjHwsUEBZi+/0N7C6Pow57WNTn+75ehpitO5AZ+h9X\nykcSoHnIyXxhLljyjbpcj/Nm/1VndtIBfGpmNUVpjl9MFzl7I6n/mMJ4j38C\njrf0olpFsT1fQGG3AeXPqigaIhEuCI08hyPQVSZJ0Ycrfe8/eNL7GECGpIND\nbKRFzNTPQNGbJkpQGhySjv2VCEZ0K16pAZGI3lssC4lejtB4epMsSNwEbBxH\nWMz0\r\n=6kBh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEovZfgiwLGBfXAeUyUPXbXp27/E4labUfJ3AoP0dnVnAiEAwtECsRtEBHo7lawl8a5zHo2qphah5nshf6lPA7ZQ60g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.174_1616621434867_0.1752741897225354"},"_hasShrinkwrap":false},"0.0.1-nightly.175":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.175","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b7c7769b4ef49a19f2f2fb8210e05e4352c7fa56","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.175","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-9uumypPlLSivLz9OR+FIAtCqE5QSaYTLHrP58bR2usDj4otqvuaN0nXDXJoGbDUDTTrIrHQRRMmxcLO9JR/wmg==","shasum":"fca25ef91414a0dee70466b606be3fc45cdb41d4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.175.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgW85aCRA9TVsSAnZWagAArz0QAIVI4Tl/rvue1l7Vz1Az\n05NRqtE3tOD+ZUzdYxoB2CQeoWpXhBiqKQmVxZE9hVXypDh4jTjA91trHBFD\nQgsagIqPJQjgs/S9+IbL2sbNMpW8gcUQkWzuS6QOQcFk9HAQKfzfBuPr/oAL\n0cxX8bQDOq6InUA1hLH/uMkAmQD7drexq2OeHsPWuUnGTcyANkkcJ4uUJ66I\nTNFvlufwBKtqBzrpBzkT3rBwfJb20u878paDPdhNDHF+Rymc5H10RxWFpX1R\nREs903q3anbs241d3JAP/hA4+AVINLptjj1YSNoLX44IOeoB/wFlv1ByOG9u\n7os0iBim1tsQ5JvJjLAWhDRJoDRH5IVk/FHSAigRRixlYFt1mGHSswkyMx83\nCmDT1jL813O4tF9DxvKKa+6E2XLyeE2YIJKR/NgdUafr5P/ecAYGcg7eLxAt\nHAQglTR5iqFZNip6Tpz+GbXW2NFI+EwBNz2W8GDSOyICD5WVjNQtl06bwQVg\nXepSNTlNq3jBAjLPtcR19OuYO8TSxs03UvJoizQiclnN6hkLJrkB8wJejQBI\nNwnfdz1d6apKC9c9F7Wgw6RP6v+HuURmL6J2AXkbE0LFn8fQsrbMec9SlzJ/\nCObizJBMm8BpdVa72tp7QfRyLzqf3nM0ay6hMinNXYeRYGsZUgbedUeXWMzD\ncYQ9\r\n=l2N8\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDx3fu++Y5LJL+D5wPzgqpPdOIQPxocE9pPDrrctkJHfAiEA/vHOsWF6Y0y3omIgx/P2sz0FXZKZBuWkPO7nXTpBXXw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.175_1616629338333_0.3199446065767111"},"_hasShrinkwrap":false},"0.0.1-nightly.176":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.176","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f5217b3bb991afbab547851a66acc265d02f2c26","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.176","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-8CNFPnXKlOLoWGKRyn3KNeVFBvxIVFqKghZz8IAmpfgkixteEzyuOYOC98XAcwt0kFFLg3i+Yk7/xV97PmWuEw==","shasum":"80dfba485f805e8351c4fd26d477f461b23b0d0b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.176.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXENVCRA9TVsSAnZWagAAHNUP/1/DjkaBldm1ShVV7uQy\nGF6yu3X2DYQrvxod5r5UcEAGu7Ivypyo0WidR5g0fYUZLQXW4j387zE+B8SE\ng7jqqsesF4swbtp9U0sUcK6+WhSQOtFReZtG33K429l/sXmIwR1Pq8LGQ1GI\nCRo0wZDU+zBi5kYSnaVFoKtqaUEOFDf2dCSlqFYBJrJG+msTyvzk6kKbYYrP\nTaswkEXN3M7c1oi+RsriIAHVdz03acVIJHg/SvHxFcJmhs5RTMOq20xNKocq\nrTbbJZfKE7G6B15mNg1XfASFru7oQU5aBfIkvIifPB1QOlX/C3pGcW+BUB33\nSY7/3fTq5WBOXa6LGzjuDTJc5zJlQg7zUv7WP3M7J1Hi3GqZrQYF2ZQCcSiA\nTs4DDWTcw88Y+hL7SHuPxEn3vQvUVYETwXbayIjU5b0WLj4J2J98am7BpHQM\nk1RVxw+ESaXjzU1g/VFLM3mRIoy9X6jKMpakSYAMyVHNp7GNfX6k5vmpIxmo\nh0LIGIur+LeFyqMV5GC6/SxL01qmgYmaz6SAPkkfXwr8Wh0kwTCiLF3uG4bM\n/qwWAWf1AVq4g7l5jJGo/11doala9NDbNjVnDuYSiTLBVHPQn9L9lAGt+iJB\nuqrW736y7t1aNUM7hTgdQ6VmHu6IyTG8PeRvMOpMJkq7MOD6i8ls7eGVxV+h\nvWdV\r\n=Dr5J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDnLQvPOqjYUYNEPeLKuf1n30G47erkTL85dUwcxkk1GwIgVYYX5qwf3Y6DPiKpnICskbFUbl70SwWd6obJfRfp9vI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.176_1616659284953_0.4302355312205235"},"_hasShrinkwrap":false},"0.0.1-nightly.177":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.177","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.31","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d83646264712c61458b54ae5d6a0ad67fe48d537","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.177","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-tYqO5ktLg2LFX4Alnvo6k3Gw9za0Liti5Q79zSHK7BZqQ4KuD6IcJPCAYrzOTdFLWDxwgfuGE6Ot0nlqmerAGw==","shasum":"a19ed2937847f18e3474a22ca72c4e33393a41ea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.177.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXH/WCRA9TVsSAnZWagAAfAcP/0AcqKVn3YHK+5mTgqDB\nQ9XFPmxE45UGziV1OqsaerNoAlijswT/xybZeF71nioFFpLcm7YGQ4jhBGS6\nfHkk1na9IK1O15txjgzvX0b1JuDN4GMACsr3zpmb46YV4B5NJIUQBq4lgp7p\nJ2+MyANqdn6Ej/U/GhT9VYh6jMmRph1ZDTvrraA83IBF8WrQCwETmZUSYHEi\nKp5jyWHSVONyw1qYL8kUnIMgs/eV06sjr9bNQXZE4k0Av7JhOvS08FQzF+KM\nR/mQe3mH3JSg5lRaXWAOa3Br9qYTVaP0IA6m/alGJw+L4gZ2iLKSJoe6G06e\nv+PBDixXngBKQWQ0l7ewLMlN2PGLRcXFOQH6vnmBMElt0aafZ5j/RXw6W+hR\n1RDH1nrZN/+YsmBWgVFoa65XUxvHFuPS8zD9TfEj0MwP2p/8wqR3lJzpmevu\nrEVSyYlA1GenU13fBcgM2zdAK2Xz2uIoTLk1Dwpms4lMq9sMD5/EMPykVHsq\nKes30zDAEEog5tyb+rQSPZLt6skWYqymiBsQFvAMw1NnLAxbXaxPCFoQKc2L\nAJB6gAHvY5gP/l0es7VAlPATaRJPbX+hsseeKYFLG82Ogkl+Pj1zl/8u7VTY\neYL8FSKA6UPfCV4s56qL4qrWZ/Lks6xjTXnPpoUzk4TG/5DdZV8Sgsdfqx7S\nuxuG\r\n=JbPM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdOPQvUZBLbanOO2eLxnRbZ3Wo7NeDx0YyeGPZsEQW7QIgHp9bkyBK3pqKiB9xFUXobJqqY2gIZnI+xCokR9jWOBE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.177_1616674774008_0.5102190420268526"},"_hasShrinkwrap":false},"0.0.1-nightly.178":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.178","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.32","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"78098a4f9f0cde88517feefe01513cf5e68a2e45","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.178","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-Pgu5Boc3/joANPkIUFkgLeqvzRRn9PJV1GQTEWwEkb0l/NgNKFRqIwn6q7BPMU+aIKUNwYi2QEZfYPLMI58KRA==","shasum":"fbed8794eb8e18859d6d7487c77dec3971520fdd","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.178.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXKSaCRA9TVsSAnZWagAAIAIP/RtBQX67gLXEOVrmot8T\nkvgiFhHuvBvfPL3Rda28HJ217f6q6X/IOqF35NDIuWssuluqcTWxkAHY40qB\nL3aqQ9RK+ERw/ky5/e7xbZMOrvqldIfRBmzFkSR7b+nkJCeQSVrsbq5+0nfX\n+tSGHRqv3nci+Y6PIxb2GZvv5Rs70jfZuzkxQY44oyDgXn6ink6ZkC4Q9nKK\nIkV2Q3GYWcbDd4mFxSr6S1Qgz46h9dl735Ox7TbkEIZ1jq8SXlCtNk66KGP7\n3wyC/OD+VJ22RNbeFRWiHFeu+U3dDPweEXvQYBLEBnURhM2JHSgguh81A0s0\npd1DBmaq66fjNgnL9uYH5M6EPPDD4UVOlaNukD08KLlexUX8VZl+c5jaZYTJ\n3khPvBtBV9B63jwAUo6KRvBSn9Bo8vHerYDub4fRhlWYXDMP1s0AMnFMvc7t\nt2d81k0RuyJejg+f+ZfrHS7bb+HW1/wqfVWDMNi1cdZp8xfX54ZfnvqQHs/A\nZHNbvwfvDJNFTrzFFfqC5Gfc3c0+ibta3f7c6jtummyUBF6zy3JyGFB8S1U4\n7iKJlul5cItLIIxmnkGKqLTbZ21Xp61aqEjpcpwuYrweddKXxvCse17ogK6I\nKNoJKzJEOGnRIoboGRvQMiYKkBuXdARiGlw/3UB9gQAlOo0p2LAK8+QfRRXq\nmUQ3\r\n=ivED\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUIyh+SJ2Phtx27URmubvsfiq0Ov/bFYXloXDPTEuP1QIgMQKw4tUcJR6GFe4cD1XcNqOIodARuR6ZrNmjcqrajes="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.178_1616684185990_0.444280489655686"},"_hasShrinkwrap":false},"0.0.1-nightly.179":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.179","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.32","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"559d676b901f44c86708dedd30e4e72c10b1d018","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.179","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-2JGOHyr3MQe5vvrHjGK2jWA3Bi768F6EsR/kMxvutxqVUBcK2IvDbU440OF11qXuTZgQVVLOPzzNwZjxf0ydrg==","shasum":"c78967a74e599dd66833eeb4fa0c42aabb4ae9da","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.179.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXS1WCRA9TVsSAnZWagAAaSsP+wYN7U9zIsE7RRZFq6wg\nnTaevCo0rwMLF3Aco9IAxwHYt0R1/XxIBrq/jhmzje/KdfgjXchi+NpiDRcK\nihtSQpLpLBmQTMPs+NqKGKT+IJ9nGJTvkBZJwcYG9itozH58o1bItVMVEMN+\nZICwzvPE1LGVsQKahHZDPj8Q55byRiBLdz3f3mq3IRWC8UVzVOqtreXImQIG\n3GETArgz2kkrSbw/p6+mb9DtDL89o3wa1OGDZIL+yc6l5feZOo7ClNbpfPWR\nTeRJfkJhENg7+/8OIOgkddLxEt+HeUSsGkpubCVzcv2d0qDA3GMX2NMqzZNQ\negs31P/CT+JIIw6Ye6oQkGpV9ZAn1lMkTKLkhC8Re8r/uJjaW6WtmQta4SN/\neWOsccQI7BnPrhahzaXSbGLVIm6hZ/GH5wZ18dEL/NbOhSOvwxfW0rDqZtA2\nxasCsPo3D4am16sV50CJ1f/EKPlkGMa5eOxjNMmJefgd8JC8E4z1Ci/bNpCL\nbDzBPXrhgJwmHYdNlQmR9R1vETPhsBS2HMFLp5S6KDAlyxT0ePDR0roAQN96\neo8FKt8ntT1/73JR/jKeRaHKoqpo4clqDKy+P2Y8OSHY1xATSjFVnAkQ/VeP\nhBJ9ikL8vkFDrIVcYG8dIw9sL/1VG3DqCjGuTScRmtB3dwTy8V9bTFndixE4\nuTtu\r\n=f+qS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF0s8qOrb5xKrdMhk+1CW1Li7ixJEe6OwVgekOBO/HQdAiA6/z93E3ZOZvbEOFihHU/woHlPOJ9/zKeLJaUl9lFZJQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.179_1616719190239_0.962412863005286"},"_hasShrinkwrap":false},"0.0.1-nightly.180":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.180","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b321ffdf51810a94c8bedfa17256a510d538df89","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.180","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-hxj92UMTxtUVT36jj2zTJzVfCg6jMmpwcnfUja6z/j4jNd7WTWWDDcSZbW8V3g20rOUI62lwcTiaKSpH+8idkA==","shasum":"2c0ece8ddf81eb0db0642b5e7bbed43cde3ed1f8","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.180.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXceNCRA9TVsSAnZWagAAxNsP/1h3OyEmifmbJ17OAmpc\nmg6G+2x/9WbvicDEMixqsxOlYd1NZkJhK/JAe0w7wFmIFqbVqDAUZ8u62Xwc\n6hdFXNBttq2wgo8qZpvJBkhNFxOFWTeRrtGieVY891yvhJwLMJupgBQ+Icgy\nv/24mJADG3aCGdENMR5aU2VqDoVKWQcyHnxNkwQm5TehjJsCwlw40eadIEPK\nDkTrUa4ZKcy1nRLS+26p6Y/vdxusC80CaR/ZX/lpEhf8x7oZnDQC3Kynl3fX\nElxYIlwpEkw5sajRxGIvezh2aXuUCnduTN6Dr8j6rpQ2NSWYd3sK8BdiaEnq\nKDgY0BvEdwg/5V8heDzQX2YBNckxWOjQF1pRFZFaObl1kmEa5rX+H3LWMQyC\nFG131xSvoyVsPZx4oRe+krOCatDjSWo4v3rnuqyl+fXteVTPZ3bVsKICtT31\nqHKP3Vt7vwow0UZk50xKuVSczL9uygPhxuYRMCHK6DzccMhSV24iODmKGaaJ\nqvuupEb3gMQ4ZBAYdNuZvwqLktCh+7rigMo26ko74u6STnUaZP5qrkkHZU5o\nqdR87w5ZR/yeo9WhezUIs5jmTYurc+cyXsEi3UffrKTA5ZZDHg7rF53t8A7e\nhq33ReAspmZdlfAqb/xFUbNXPLooSTUwlMpZauYtU0+x507qoi2XuxU02XEP\nRCDk\r\n=Uho7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGDTUwCy1rQ1bX6BEZ2BLzmB8HWsvlAQSOvUFhOd3W7/AiBTTxUL8DZkjvrj8NqhAnCeIPWKk+C70h2JGC6Jz1VyEQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.180_1616758669353_0.4363954294609236"},"_hasShrinkwrap":false},"0.0.1-nightly.181":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.181","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"62ef44b17d249c5193a8842cb8fa03cbbfcfd46e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.181","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-KGeE7Ckf9tvmxAZQzWRZbNrp7BjTNoeCrABwVzhMk3eXA3I7YHU04qr1uUnH5w5/lvXR12IfINHmuv4iU9rRYw==","shasum":"8ba57edb8292fde156610a983f8983089720367c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.181.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXfFlCRA9TVsSAnZWagAAWqMP/0S4jyvlCqLiWT+ZY5km\nw9SAOiUYKZ4HkO3CAGW18Q5Xq+Wch68KWDYd9Dubfu+43O2baHg5TVs7jI96\nVEfL/epHS4elebi+B/qVPSW3jeTn3igRIpEWqgLQ5siyqKCE9u5/F6YYhCic\nIZYVeu5TZgq4uFmZf8nZmQIOUNOa/57zMtbUEgLmENZtHVtzlM1Xv1OQrVnS\n0CZhdFRTcnlD2LJyglef7sPbFlC0MPNSRXY4mOuduC9xNJnA0vI6cy8sPYZh\npd5qsX5Mc6NVDAQA+8peZiBMqQKnYZaDcqiD05eBCKDsKjGKTXUp2gnDYg44\nVoyJAyL15V1/hEH8Tgu5lrZB3GF6nq8Dxx+UzVj+XEc8bF/i/OcwpaW73tYq\nfc1lCCNVf386/qKzCJQA4uYkyPCmbLSLOhMmX8PMG5wONzPpMavI7xrTvBwm\nO2AnRdaxWn54chrgKVKqW0FcqoFDQq3s4pW75sLb6XI+ftl9mzqJsa8GALxr\nT5hM5bPhEPD4z5TjwJiCG9XYQNTuOnuaRo+bcpFAscLNdHAsFi4S0Rf3UeXP\nXlJllRuZP4mY0cc2oYVF3SeEaMahzMXpfcxKZ9QSG0shoMpUKRB3z/jSsK0g\nfiXgf7J3RlcHozzl9pmOUyAlSivvgzDVvAqrqgR5Z2iPyt3nlgVldnfmI4Re\nSIFX\r\n=tjGk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2dMitVZvtPy4XD3h/4EW6BsVb3YKq/NI0jqs7/lzfDAIhAKJPHmr0lmeZH+1f07mXa8oDzQzh/E5QYbFzzoF49ulu"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.181_1616769380994_0.16774376535935054"},"_hasShrinkwrap":false},"0.0.1-nightly.182":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.182","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"44732a6101b65ce706d49e8d58bf3e5c719e4dfa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.182","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-UEN1OWP8HjtK73ah49kQHququ2gSydKNzx1kXjy1C2/YjKLnYFz9UoXtLhofaeM5iwBFiiI/65IQ24lL89+TEQ==","shasum":"5683aac471770e71656e21584042e9a85dbcdae5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.182.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXl8OCRA9TVsSAnZWagAAhxoP/1ta118xaXxYf51NaD0y\ny3ifZy+N6JlVFArC+dmmYk+kwfrJU85Mrwy+6AeRcPnHJj+9HQrJ+1vCtKbD\nBdSlJ8dKccSI1QPG86f5nYc9TOgsrPlGBj2u9NeWweR21X77AkmoIUT2Qewe\n698oFwpIYlhs5DfiIL9FUSXzgVjDHxmh8gEIagJ5zvoXznRAJkXC68FN+0To\nUeVptKTYQKMsBsrRTdMNaJi6knoqUMgJnSG2YaAd6HJ8QnyeSM7zenFTEenj\nACmvKQmTL6utDvfu9HSMU1zQbdItH6N6/hqZdWEhJUPsOaxRFCvwcRu3q3cn\nK1JkUXMLI1q9IQge3VjFL02fN7IKw3lTvcCpG3fcP187tvasc9dV/V6ICLco\n3n2diDtK5kEU9farj3QcBDRKpkLUI6dmricrr4fJv5b5kPPdegXmdM7SfFHG\ncS+BempJ6eUCk3nFmicGKa0W7D7ldDsY5H3y0nhU8grR4Oe/h7BVSoUpq6HQ\nCBvNXswYAxBrFL2S4onu7J+SUi6DPoPEGJbb1U295vR9ElFNiiXfUCK3tUw2\nz1J5DnxnUylhox5PdeKaCDyyqtUPEmoYsURenDsxxaRT9dk9QUiqywPC0m+0\nPXaMvgeuiIF8xIBSHKFbMsASm662XSVjTwyXbtPJ5hMxvVLIM/tIywHlWRKv\n2ArP\r\n=En4q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAIs3z5t2ge5EvHwaXY5wTtZnRjbwzJVlpCXjb9RgYmXAiBtUrNnhpsA/4fDt0UgILlGOUOnucC4h6fUKVxMjNPQzA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.182_1616797454211_0.5708033854814663"},"_hasShrinkwrap":false},"0.0.1-nightly.183":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.183","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"92cf70068c1e25adca330f7de524ea8eeede3939","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.183","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-+zoCOWu6Mh4xLmF9XrKj70ybATvJKH6SCKLuW3h4MMpXVyFZH7WriZkPaH80FJqH2WoY9TYR9J9KsftIa6fTow==","shasum":"45305a20c12d1cf1c01feecd8bd923d177774765","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.183.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXoczCRA9TVsSAnZWagAAXaUQAJZyiuMhXLT1XWOnaQoM\nwUZl6Gj4mFQ5q2zHCGiOOBEFYYCwR00pGYerHEkbjFTSMGKSQ4sWel4Ssj9e\n4V3WXbk/U3VTg4jdH8D5YbRpQXCajnDFpKn8s6+g9q1iRC9e/nK5QccEgUYM\nXAh0EWZUKeESnyqKY3LF4LpRRkyEkCUIRpJgHMJpWDdkEUqnP+qdzRiH+XpE\nHcUKafK4wmsPnB1blXrACUECMhZ5bLVI/9ds15l+jWLhp/1XMlso/rcgNxuA\n+f372o8i0Set9wWwb2WAi0xZ+EF4brwAITUTcjymu8jAXjr8FVq0bYQt07cr\nwAh/rB6fple2AbREPyZ5FpfGOKlmv7HMTkLnH4zGfCV2fo73TRGXjjOd/Os2\ne9kRTQgoRnS7njlZAZhhIA7a9s2ffSmLGE7LCqHL7sZdR3A44FpAC0pGv+u3\nPwkuYX8u+yfrZS7O+MgflNmyJ8/CQ/KNEj/7LMD56yjA23TEFIfQBt4HYca7\nEUDFWZboWDYBGSQmTtkXdYYq84Dk0wXt8mXLHtfEVE32FGWJrEobBCaejWnn\ntdRpbjNxtwpcK/ErgF+T9obQEo2kpGcIiF2nhrNQ9m4C1dI5d3Bg+2QV6+Op\nEuhGQu+FYw2UCNIB25E5FnYgcU/Frqx/jmQAv2ihVPdSRZ8LpY8GVnaPzGmy\nRXse\r\n=JWns\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCiFVYONOk2BZVM1VhH+wZrE88z/g3h8YC9K+xzv+KWeQIgIUFJSQq8ekuYn7+B3FZns7/ud4C9hKnGxs+8aTenBjQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.183_1616807730770_0.13346846407402535"},"_hasShrinkwrap":false},"0.0.1-nightly.184":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.184","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8a24f00bf167052bcf5a71abfd06138777b9c76b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.184","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ZxZQJy58x9cf9Ut3OPZ4qd1jxTFEnNpTgOnkuoddImNdAHjCoR5o1SVwbwVrW3HBPPdjjBH4vBgp9sJlzai9WA==","shasum":"2d83317f577833907c7e3fb5daf9e07b7c854413","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.184.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgXqySCRA9TVsSAnZWagAA14oP/1OEdeENtdqmyHdBpG+w\nuF5DoOiJ2g9xx1Y0Ld2KfOpZsPUIwF2ep47q3ncz0jdY3VySLclaFezmYkIj\n4KBEqSOnYNp1PgSrI0XbFAmBMIr8od5zn4DLd5KP0KgJtbPtNFYSCxExs4CT\nGA6LN2BwV4LrlQhOI6vSKapNjffLsRmiXZOWai8S68YKX1QydNH7M5MAB36p\n9i2qAWjn0MurGfjkraaZkg1jKRI7+pj9bplispclSRBw1YNjU6CgX52XFATy\nkzOXPfV2TGkF/3+oBs9ehf6vGdMaWqPRCn2FUXycd8SUrT6M0shOvORRLaiF\njQGm2vR+ANKTPNlfkN5dLTZH6AYY1bx7WzDdf/tp4YL/Owr1Ubrs6Kf6BpYH\nE5DH7JeDxilt0ZVhKmPs9tDoOzaQm56EdSeA/7jWVrSbxFlSPPUjii1wDJ2x\nb97NowCzaPjMqDCgoUKsihSwPAz2tjYKS2a9qZluRxLgtXo7nRtaL+a6kKHM\nYM8ip15fbI6Xexx7OlD1Xw9FzGlzB1lDzzDojF6M9Mm6i+b7KnhI9rMTnVdB\nXoD6YKPnYojsrbhHPg6z4Kq668ivd/7KxJyO8AZ7gXl6Ldh8cubhvt0W9sFr\n1yOJhCgTbE9uppegiroKCwcfoG3+IFVKxcBM40FaCAvjXoUOOe0SmBBMgzGx\nCbvP\r\n=Rp3j\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDNeBs/rdn0a4ER1yMtJhr2xXUsYdTpe7F2HrjHHSSsdgIgLXsNfWBGy9kAt6najECpTphLOb9rJTB90apHcPpgEO8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.184_1616817297803_0.6289492286117919"},"_hasShrinkwrap":false},"0.0.1-nightly.185":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.185","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6062c1aa2880b0071468cbd1c2109e58ba1d2b21","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.185","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-VkOK5ml8EPtSpDv9G5+s9JpF1GYtJ655KUBYX7Yxy+YVgsj4Mfmw1rP4TGGz7w6iq7VOUQ+7LcrfIgMuUqY0bg==","shasum":"b964ea02dd093fb000b0cc30c4604ad5ef6f7d9b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.185.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgX94gCRA9TVsSAnZWagAAKgUP/AgUPj3RPFPHSCH8bsoI\nPnaIv1ZwGuv/tjzEW3SBWqpS6yi041GWrU8x0VL+VgkScB8c3nefCJXnUFY9\nHrsOOvFZhJL1OrrDIwExdTSU6rIc1qrU9Fbvh7dA93FmP0aJ7F1RsiB6g+PT\nEMYDiCTsLOgnkO1fHZw0UHSsrSNsG/8jM2NHJLWE5rUl1oka1ljrTu7PdrN7\nIBaXbaUKyehTuNNKsvo4M0mlrfOj6FOlsC7cT2at4QFSlITZqcXnemn3F/TW\nBigUA+3148g8OqyJHg3Wzwq9KQhMWDAOJTVnSHgKSG0xNYGhWXLyOnra/K2s\nLr6tLeH+EeUNf5F7bBOPI+A6d8tSEAMGE5MHidMZ+gqy2q/vdGJ8lgEneeGk\nZKFgqlKg6fs4iKtA6vJRVE1QD576TpX8U7FaeE+O4LzN+ALYwmOZpdxj3k6X\nyor7YYdVfdh5E0AiYli/rWtCber4fyj82FTbjAW7h15xKSB6pVJgflFGQ74E\nBVIedaLguj7UBZv6OBGwAxbZLt6ris/1hpuGQ0cIvE9iI7RXUlHVJRYavQvM\nsHjKM2GEYmb8MBmJDKPKiFhjEjbAfcxb6AiBF3A7W1TI2GKHhWmXlgHmJFwE\nW+qL0eV1M5cDnfEQtT8BocvMyC7EbR0suBt87D+ubS2AXK2F+1OxB8e8H0/6\nzAcj\r\n=sWCj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4ktNRkXiqgvbRRb3I123fld4s5zUB1RcxabRJ/ASZEAiA4mCGvmSQUScq4Hb9CaXLoc5T6s8DlssF8UFGwW6Eugw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.185_1616895519569_0.016922993553997845"},"_hasShrinkwrap":false},"0.0.1-nightly.186":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.186","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e504caa4e3eb8d67cf48f790618751756a0e2ed0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.186","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-nY9g9FahR80my94myLHLWIsc+QT8paMIUjpTbSablHPxASqAdKYlLUtwfBWsTnPkJejYf4ckNZZwYI54y9MO7w==","shasum":"fc98f9d213ac43cde029c14e93c8299abdd2b4cc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.186.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYAM8CRA9TVsSAnZWagAA1roP/1ZJ5J4TUojqzMR/aJDp\ndGJWUapM4v5ByqJ2lzG+TD3J2dCluGEmKymtTMvMtYb++D/LwuB7ED2J6WnM\nPNKwo6QxwDh5WvJmsSO9eConOZLGA9bsqSzlrWII6E1YKRDT8OHWl61E3IaL\nSOPArLCZHrFczMcz6WkiemRwWV+LyRutMYFaF41e5q4Y8zLv34IAeqN4E0E6\nj9bGGRrfjxShn2p0jE6U0D+XzzrocZOdtlXUMjRwh/IJ98wJn9srOzj3qjFZ\n20pBnRogc24Urz7Bgn0hMy+sKJkQ3lcnmqHmOulOdg4vraSJyh4K+jJoxJ+2\nNkVS7SSz2WWa/NTfGVGrjmT/44bQsN97R2fuMXzOev7VT1CoO2KH8RXHxvAS\n5JmkS9e9GeUhbB9+rLEyRTTBEVdguNjie3Y8j+z5FCoCT6TG8EYA4p6jKvkR\n4ZYQ/5FHU+hMlVEvGlB77bz37Q01sKmFcbFtAoHp6jR+42PBLx8TmrTJNwig\n2QC0CGkU+txObe1FLG86jW+Dox2wMWoRr/bmME7WF0RiiVvZquMZNNuUahqt\nb5pltYfc1/4TFcdL/kBSJCblmysd1Wzvi4tWwV7GkWnlvypFrDiaBJc7JUh2\nNwHWVFOuv+lMCXzBR/3RuXIXhbsndtVvj+cn6HEkhP0gYGgswEA48wx+muDB\ntuqM\r\n=FWfr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC7sIzvycloZQXlfhDQmZGCKm2uHdxN9qDEO8Jlw7z0fQIhALm+uHB5/T2WKDrvkxGIDrfHlYAJsqOc7JDjgdbUFzgW"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.186_1616905019505_0.326625462903404"},"_hasShrinkwrap":false},"0.0.1-nightly.187":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.187","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d23e6ddb1c9d9bd7876ea946ea9f3c7fb998f066","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.187","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-cZwQF9oq24BjNbDWGz7RfIE89Y4WyejEdSNHRlS5A4R1vRF6mFBjK9IL3jh/0jQeiNJZdHE5bUWVX70mGGkJaw==","shasum":"c8b5b32515884e10a722e2ad666a47d50b930eb1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.187.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYK06CRA9TVsSAnZWagAAaWwQAIEJxnewAkd8mL4+5NBD\nrmy30eSWg9sOMwzmFIbV0jH9WOIzTezdNl+KKc3dbhhSMTjfiPCuluzdmYEZ\nQ+P+WoyUDbfUdnxXa0pZ0kU4SHW1Zoj/CPHyBppNE6HGLtc6wxZb5kXgEsGn\nQOL63T+oDNY6y1fk714EcFyZgaNhpJ9pSOK0lfwSIlicJZR62QJtv2NQZVWP\nfaowWA0BHVvWAEAvgYSiNSdOcnHPwazgNYIqaZJNYJBg89hrtLJ4uWb8CWHI\nCV7I4FvQ0GqceZ59qRAej99ttBIUtVICSeBd3XX6Eq+PUxwwKHkiBufdNMZT\nS3dEQ1Luth3r+TyvCpzZailmEynvFP9/bl12sBMU1QL7NoieiLTM2Eml8iba\nXlQOyGvbxQghOUYjiYhLoLDps5pAA2spAZleMoDcioL51aX+vWSezZk6c2HW\noKuLPaBn5d/Tel7G1BAyqmjR4bWsEW0ApNiWFKDlm/JkQSmq+8Mhh93JlHLd\nXcjpiVTz0a/bQJKCpp27KcwAfHHXFsQmKlh2P3uftQ1b9ZoZOFUfTkDpeLVy\nn+ozFRABLbJ9SPOkph3rTj71vvEaqVUZ/MWE+H6AIodtY//ZfKs733qo2P1i\nyha3bBR4rVxoEs2AiJiNYjeeymxkiN5eQcA2bqsvbNWnlGs1qkR9pphU0q1V\ndn37\r\n=iIDg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFsgav3vNJIRupTIwyI9oiGOL5XZRRoJvbwYOvyqXgYBAiEAmuEPmBYRlqMfQbco17RtaYxMN9wgqkj1tWNuv1MDkSw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.187_1616948537610_0.861363315866581"},"_hasShrinkwrap":false},"0.0.1-nightly.188":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.188","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.33","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e86c30150cf9d000a9ff338e15aef5d26e42d02a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.188","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-N9N7mBSC5UjqXrU5tcLpzt02UwaBx3YRaE91HM0xiHEYOcyQyGPGey6rMChglTqG98KsrZwlLj9zXfx7byll0g==","shasum":"14c030941ed05a4b2ceb5e7a8a560c614e53118e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.188.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYObuCRA9TVsSAnZWagAADDEQAJolTirYs2hDSgNunD6O\nKJa4eVXK0aHoySVX2e4nYnYnO52xFraqoF/OIv+AHntDyhc+e/UWTrb6a2uk\nf+e5RF6LCLWBZihyK0VqiEJuIz4j1laZ/CG9/aZuGpEiTlSSS2zzksYWRu2S\nT/CPSdtyu0JkCbz0dcA/EoHyvsp6/FJYo8nV5LE+8KjSONn98BsoQULclNNW\n3hhDbwFg2n/3I+55qXnl0d7b9VN1nonOnbcP7wNiZlZa1aAPrz0w7D+AFJsw\na4Oe/tIlfTEInmt1joQ7sOKVzlgQYID8AXT6+QPlI5Na2RSmCLGxdyihlPjs\n69HWSaAu8gltlU+GfzqOP8Zi2DYZIcU80m4KMfCXVy7LSFS/GGSg3bBM4Dbr\nLa+KhkyTeXk1jobRJSsnJegNuQvn/4BcN67qov+ODq28KOrOKovcmSmYGkav\nLklGT42rjqUB8yHF70GqYdj6dJzXmMmyZdLBPxyWtDTIpBHGgu1ibRGK0sPz\niYOJdBZN6nBP59OaC6nK5a0YWs2w8AuW/1gn/+ac/abKec1MmCkZaxRqK5g8\n5YCtdwm2GBEprTWSqGlAFtSOE42fx+BP6X3LjqowyRcS96E/1y9U9ZCtRlvn\nbG5Wph2HvKf5A8e6LKli2nFEWSZMinTNt59PgtQjueHfGdMF+kBTKurZaQWq\nXtkP\r\n=L26I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBONATG3RM+xdl3q3cucaxQIjSeQ2EFsx8Mb+hzZruUlAiBE8UwXTS5wR5A5W2tewbX0NxT7qceFf9Qut5EBmD2ECA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.188_1616963310279_0.22324105000637884"},"_hasShrinkwrap":false},"0.0.1-nightly.189":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.189","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.33","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8bcb74b08928436656ab7d0422368a83afaa3397","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.189","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-ogRHchdkFQQULPSnBwp26CL0LIGd1/ouusgwx6+dp6GcYErs6vxVhBvIft/gZvNioeo0bhTayCAR7lJk7mGPBQ==","shasum":"5bc60a2c20c66aa2ad739239046885fc59134f39","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.189.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYU6YCRA9TVsSAnZWagAASxAP/RpBgginUn0YBXMYP+IV\nEy6a74uF7bpZ/iJqECwKVaXsQ0s7Yj8r7rVot6OAZaS8L5Ab8Kelm2t+0Hhj\noEmPGX5B9jGPJlmQQfP7aMCByePzabMxPFjivltLcRK/VBBaNinBKnlAaA01\nLOOcSdzPoYzQ1wfXE9eWTF1NrnXFaeo09odmqAEY8QDnyd6Idf5qWz4ob8lN\nHAgn7AkIJ0EjDsJ4imMtK23rxesWrbYPlDGQ6VtKCe5pJN0/sAAFYwfYoyBJ\nzTYriYbG8KLUxkHoIFm2YA7qprLfZ6+S7zQGOXzR+FyV+GpxAr+FsjTnWyCb\nlyMgXbhcOdU0+MA5O+tYIlHqtHMF67O35NWeMWtjJbk4kXAiUyrvKoz+QFDF\nIlzEO/TGSj4nFHLUfP+BjolqO6QsYUDCne4yx1kor2LQNqOU+kej6SU9tw2y\n67seG2ZdEwQEqp3rZ2tizTdkkEoQaWl1nHEKDUDuHmwWxDa9nbAe7iJdyDe4\ndBcb0YTFq3lmVm4eobFGPNMIC77Q/cXfp4F6uAmvRRpW5sDOc0pAaetYorjG\nYz3wriKl7D5qfQd1TH6iJveF9tirSVNtipBXsnFvZdNurKVPJ+/36w3wNebU\nsJVHUEVv4AKmCVUxd2aP+UgyI7iKHyGTKj+b+tEIlGSuZuWyFZcolEAWohCs\n37Qm\r\n=VOjB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCvYhtIz0w80FG0Nd2ptZilul2nbXJMDPJp8TRfpcqCcwIgLn8FBkldBgilrdji69VYCHQxz3wOsCyXdL4c+jIX28w="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.189_1616989848208_0.2914516059115211"},"_hasShrinkwrap":false},"0.0.1-nightly.190":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.190","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.34","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on the Structured Wrapper and Interface generator for Dart (SWID) sub-project under `lib/swid`. This project will allow for automatic projection of Dart packages (like Flutter). See https://github.com/hydro-sdk/hydro-sdk/projects/5\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0018ec470ebd947bcc97b7f7bc0809089c7c8483","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.190","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-lvqflvUKSYdfwP9rmAFDGfMmwkc1UM3EfbdKuVrn0bdAcHYp3yd56mbMF8gEkbyF7UUx/43N86HDZbT+DXA+Fw==","shasum":"7c48e0a711329c2c0663f0bc1aad9c0d37980a36","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.190.tgz","fileCount":516,"unpackedSize":2232223,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgYcU7CRA9TVsSAnZWagAAbBUP/ivGWoeAov7XwFI516wm\n+EYTW8UOi6Y/bLbCf1MU4iRzc3UOc4kxiIEtL3I54ydJcLmVurYyWHQex3AE\n3bN7JEm2X9L8HmkUW+5BoiBxqJLmg6tgzbU3aixBTHF9ohEZQHxCiwOoMVuv\nmrtzki5BH/Pclmf0CMZLnni93jp2v/a22zYEaOy97OJw68ICRFS/UROkcjxy\nsvQSmOHYJjHDZnd97JnELXfAc0O0+hM+mXhHKUH6O5YDYAQ8hq0P9r7htZ9a\nGpfIsEwf9uglCWmZ/yP917Wro0iECqUVMoRUgM25m4k/Uhd6AEZkkdm1lFXB\nL3334duk+VrQc+yJNsMPMWrAcjxsW9ANClxpot6rRV2Bc37L9Vij67K7iKtv\nE3T3OIIVaN1kkHcwBhGynLYsM1RE97abYbBtxrxOcT/MrZ1Dl4lIh4iWKkCm\nOHJ3i8LzN5/QyndfaeloDRq99sTpyb+awRaGmZoqrmMyUkVNx9Bjpa8CwTO6\nu8QE6y8h8va40Cqy6iC+R6afuY+Ss9ADXed83m9HW5ELJ4almhRORW52d0tW\nzEse/Or+w3NQfTKubusChyaxbj16j64BIarC5YaI/AuxvNwgGIW2ZH83K2tg\n3norO0VeMyvKeYRa7qyKCeXM843ckTDuWQCycmxgysHQXHJ06oAjDluTU4iu\nuxwl\r\n=vlvk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTcXcoruN8akONEW3qc8Ap5wFAW77km8JEnDdqsVOU5wIgN+jej/1AoUo6UvvF1TN/mfc4ZLhG1RpV7LRbAcZiupA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.190_1617020219340_0.33815968741708824"},"_hasShrinkwrap":false},"0.0.1-nightly.191":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.191","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.34","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c6daf2bfaaeae64a96c75fd631549605459a2403","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.191","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-TthQllTpbYSJhQM+ZhjuC8bFfVNiimRagUheeDPHAKO1mqmTlwQLmXdJ8w1SpcYvW8B25Km3rwQEV1rBTOw3GA==","shasum":"17c8106dd1f2773c444b0d9dd125abb20a2bd3b8","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.191.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgZji/CRA9TVsSAnZWagAAE/QQAKBYn6tacdBLUucmyiIl\noYKMnHNriXdbzVqrHpVyrirfEeXFFpT/spcXVaL61Bl18P0o4BcBIDIOsNsw\nUhGHHizSGooiGtTP/1zPHGdIpQ5pRXER2IXdFkECt/JiyVtDZ/VKLnueEr73\nAYq4wPYt9ueNafKOLTGYUL0+/gniGwWZSmI6pSqvTJHXrqIDdhZ/TKpiW85D\nXFa7Hd2BnovxYaAIHbZatZqwZwpDDF1kFkE3E9eaI6knB4NZZOAVPpFJ8xTL\nqeWVIDkjwVuD4v98oQ7p6qbv+zVw5hC3A+gYqboPU9R8npHZ/ML7ncORVR1d\nIbE6j7aqatMEtFh7XunfbCJcwk9XNAzlCSIjKUISUZpAHUls6+cQb2Rx3pbE\n0xT9PyLrEYgN6FXlJBdRPcP3em2GYvNOHpMoM8ScU8BIewvIMoGkk04fAl6r\nbcWiNWxKF4cf9XvxoJiAX8jR67FdOxsrEGTKymygcDm9rfbjYf8z81Ix4d3W\nQ4Nu3qjijZRu7z4gYAWHfMxXiga9fE07vBjlMfT+bF7pHJuIc0DJxKP4gvpI\nlJXiKXdVh259yL9FblLypIv8zbCy0+3KwO43Y6gEtY67Ar5YCXgO9y8a+Vz2\neiJIRWNtI/r7G+7ScIavx3kfvkLt/jUv1MqngpfYRbs4SGceiGhaqb6fOR84\nR607\r\n=HuXY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvy376E0Rd6IICYJ/VGNFfA47C5PDo2eilkMrt66KrfwIhAPc9E6UuXMzcvckP13rZmxDk4vYwiWju2TmVBf5zugRp"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.191_1617311934632_0.48497453265746593"},"_hasShrinkwrap":false},"0.0.1-nightly.192":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.192","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.34","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f6feaedb171a79681c9f2ec4c552dab79e11fea6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.192","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-0kvWuctnnaqgZd5jor/a3TLZOv8iIrC7MbWpU3yZkatE28/XDSO8G1xsO2/lGH0t2YVhc6+XE+0WD0rUdTQCkA==","shasum":"d2023ef5835e7c779147cc3815a2bea63118a785","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.192.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaJz3CRA9TVsSAnZWagAAGWgP/2nsUtFgg3CeNMarqhAC\nWnbi+0POUKJYwJsWl1PNjX++nyUiZHgS4Rs/Ty+QEsciNM+7NUtcVQqYdYLQ\nr97eq+aFN9CHC4cUDKro9huK/n+dLp7xL+/4ULXrHJs8JBb7N74Bykc5FoYp\n/yVDv8Pnzw+3k6j5MttTUsUBT2NlFYYXcq+iRZ2nWfrZw2+J5Pj1FfPhKX1f\nsVIGrJKbyuihGdcmGw5w2OPa+1/PsV2+oKmfuMUK8UTyBE2UxE38F9jabkzi\nqwe4DokJlPY17S2IjySPPlBOgTaN+ihFMKb+tp78UxYt6eIwTyYGgvh9HeQP\nTgGqKk/9otQGp2e3HafgTRE5ycwaFsDIrmzdbQ9V0YPb22Nz1m1ke2wgpF3S\nDCcoUM+iNecDOSE23t0Lodttm20MhqemMjyKdJTG3Ho1pDjVEwzP1MTVuvUw\neNRdxkJpdGdvzkir2F+WN1pwW68M1xkNHWKrwnWr0EAUilU2k7hqqiCcnjCb\nt8jwNH0AyJ9y7gI8J34DO55W6cV4EkLBC8Gyj2sMx2ZCZAyblN93XnWcbyJu\nl+dUzD5NbWw2uv9wTSjheRHButK0+34SsQM++PyObVPOjhfyLzCb04XzjNmC\ngv9j+ApQ0u6aHX3GE7nEQzQ5ACXncgHJL+EQ18hu32QUVycOBHuCT45BrZ1g\nHeix\r\n=NxNj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBXykCo39xkB5VSv+aQpZnmX2lxkUguRyrxaz0XbU/FvAiAcEm+eSzeowHOeJb8D0iYGxtYJztpD4XqwECNBk6JLbw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.192_1617468661846_0.16430166485707276"},"_hasShrinkwrap":false},"0.0.1-nightly.193":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.193","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.34","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2266c6afd358cf2c6645f5d339dee51921fa6f5a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.193","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-SyJfvLfk+30LOeFXIDeEa05757CvnU+84jSrByZsMbFWJGT97VfJ26vl98/xcsMuvJ/L8IFFzgtTLM/4iHvDfA==","shasum":"17a154406227d2b6db11bace44afd1ffc6b04fff","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.193.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaNp8CRA9TVsSAnZWagAAiDcQAIieNgTVgv+3SFpTDpCi\nSlBBC/mje3KUqKtiVH5xkCpsFJ5jM9Gvq2FMyH62cJ8uAx6pvnaxa5zKCg8r\nSFGzjvLyZYzjX0MpiFiWvge4Qs+5S9eDTeFTiWdaxh0mkdIoEb9QcCImN2yY\naqabA2LKMLtPmxWxecCX8rSPaZz5kNRYheyMF1AjUaXhU5jkmkKrY2xzLPTl\nwV9baFkcdpiMTpXIEL4zQKBzMIrrMTRRgCElopKnKb72WwJVXu+kZi3SFJ0t\nMQAUZWSkpS2JCLdI/NfGnNUmj8Qxxy3up6HWWzq4wp6w2puzvs/Nm3UrcnIj\n9Gi5IdVj/89TP9krNVsj2GhJxzvcW2Xw4B7VDSJsWy5/2cilz7ohnhEOVq3u\nFths0YY8IJaYhlsa2+619b2x610sbNsuDUhKwhQ5768DIOQX3qMmB7oDYM68\nbInMFEOKBYNjj7YgJk/sW43HGs26+Thd+QXTvcz5+TNK5VZzgNKwecxi56R6\nR7RNXFgEwJ3ZFfb3B7pCKmyNkx0oEAimjUUB2CDuPN19PgnXB2b5MCLqGmor\nt/DHr+N22Ckz/L5k5zCioemL1NBWAymxhXdyJti+OPscf58KmrNpQctffQCS\nn5S176QjbI2tuVcRw+qkXyJu/NVgCV1r46aMmBC5bvfgxQFJEQbRvO3m/6q+\nUMqf\r\n=7ZLE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDITZMhW7bk2/JLuNKhj24dwFYUWrgRVSUMY53Wy9OMGAIgeUH5JZ77H+13Lcn/jeiBqUcaIQYqmz8qAcLiaeKWZjQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.193_1617484412435_0.27031305880464784"},"_hasShrinkwrap":false},"0.0.1-nightly.194":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.194","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0d562e3813cbdf147e131fe5bc5c7d512ad3cd51","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.194","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-gPzaf/2e+yFWglP9xw/+rb88PRMQXUXppa3oNrHhIps8/KRD7rq5DkUZOvnNFlft+BGF8qyG6VJjuM4v6sdtyg==","shasum":"86ed4509732aff26450fb87c759bd323fc63d370","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.194.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgaQUrCRA9TVsSAnZWagAA3aYP/RfRp5iMZcFX/8djH8/i\ndHTpH8YWIFfuQznc1AnpwAYInXLRd6PFJY3w42G0qPl3L+jt7wLIq+hE4/9G\nuJ3DcO/ZqFk+oZIb/MiqrdtvET8QQoP7sJVZzLp+X6iOO+hCOvtm+G0nLsKg\nvD09tllvdADyqwJfL5rgAZMI6S6WmUvj4BfhfaLIThoAIXQizEMOX+csCXoi\n0ncmGRaM9J+YmtxWmyg7DbY1w9Q2LEUN1l0KJ5eHSjnr+QWUskLz8SAxQHxB\n5Y/C09IHIosuXnutUXKlYbnwAwKdRJcatn/lPKG4IqCbGxVEh4Z5H+Onr52e\nMxmWGKoUoYOuxZ3uOjtBIxD3RsYRH/5Rlto+dVkeD9JlDL/EQEQGVbzIphLt\nx8twifRJftHdOnfCsxpqLpka7X3wWtkT9eTbzFX5W26wEjNPBTN7jO+7OaEq\nH2TLaFPn2/gmLePbXJGZl70FV5gFVKE993qqYODFmvIWaAEP/Cl4Eryl2RLq\njRGWBLaldFw3+zUo6RU70JmulOWW8U74we5AvLEJjMExhW+isVRSqOJRLm9B\nhJOmY9gdRAOtlbA2KdR2KEDvov1/yHUyYq5ajipAxxho71HTX1o6H4CDuR70\n1n+93WaB+0lucOD0ezfCukbh4/tz3ZB32bGqcSc5xxPq6FNzl6AZwuKdF5yW\nolYG\r\n=D/Cr\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFvGEqNUTZHeoTtYxhIY99X8Zf58GxoYRwLPzUqM9zMiAiBSphHEMEdZ/OcU0STkeKTgkNAnIjLsxKxKnOMu27HaNA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.194_1617495338941_0.8501795454617476"},"_hasShrinkwrap":false},"0.0.1-nightly.195":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.195","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.34","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8997b848011ad6c14e194b817c03811aae03a22d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.195","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-kqodbPI1pQJiXePLnZ91MHRji2T6ljJ/ku4tu+qtYz58Rd18OH6yJz5T3vA5//xn3F7VIeb8/GqYK1isH8cIyg==","shasum":"8dba1b9bbe7ad6e1acafa110d1bcbc9086640d50","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.195.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgakJtCRA9TVsSAnZWagAAHr0P/it7ix+WkCXbCTf4zBjh\nMrdpz1874V6aELwg47iX1tIPSgNiRcA7DEt83uVCAXcyFIhS2AGZwFDaXJgg\nVPMtOJvrnp3+St19RUEileNKikbVCQ8vQeOdRioQlnuEdKaOdJHHKaHYqi2s\nuLZeCB8hW9Nb+8AzZsYjyPrEB5lMWs9rrrpw+VcPvhiNhMaQIebYGUEtlvb6\nBZMuuQRmuBtDB4qM+6VD1MuKKRF4DlYlo/0L2JrbRPXwNmYCQw6u/+8L/C06\nXfHhyAFWWFW6OvNTLAQXiVUQ+xOWm1JaA6V6zAYiVup5IF+2Et0sr/mguQ7P\nfgaprF0NTU4UhV8ThdqRvDdIaFruNRbzqmJ8V5cOtur0Bub8j5QvEPRtxmgg\ngglCOyliajclMlEF3cL8gqxWo+C/HVrgtD4VrTHvkA7/d/WCLvMYUPDdp2DM\n9DO0kDqZtE/P1z5BbjhDE3iUa1IjY6Ap9lUrXgpFFaC7N5mLcCp3qdT4LP7B\nDf/czfpiN7KRoxAh2OmksSbIwS6pf9SjzR80krTrJUmZDs2LZ/zdeYIkuL+b\nk136B0v03dKKmwWWUaVaKg2gceu9VRPe1nd4DSzWSs8cixrKsm8sxoG718Y1\ntgDDQguSGPOfK+SkEr1OAA7bWev5ycVnFYYKcu/K3N30BWc69yT+cxRmgo5B\nOl1U\r\n=JBEb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDI4pB7RjDn4gMYZ4E3LBqnOVNnK2BcD07k4zQ/kn6XdAiBFMVuKvNgrd/TYexZ76UeJIu1su+ad55/9GoooMp6tjg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.195_1617576556810_0.645019269819308"},"_hasShrinkwrap":false},"0.0.1-nightly.196":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.196","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7d66d58ac22aa4ae1841a3d9b93dccca2e0b3a41","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.196","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-YBGpSlRQVT/3at8dQb5huSojecId+28O3k91bClk3CQ3A1Z3axxgheYN4xdY3KfhFRgEuDwfJ0MuAM0JOzuosg==","shasum":"d96fce82b77b97a97b59079df49bcdce29eba8f9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.196.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJga8bfCRA9TVsSAnZWagAAV2EP/jqhNAxaNa2UdQMLENMe\n1ba3qBfnz3CyWifUDaZAOPgZ0sAb/SDb+MDHQD1xY6SfUNxtdwjnZRZOs7qD\nJ+UsH8N0LclUDfuah+D3cKslgrKqqi2nc3XV+XIPJE7ru8rYvqVMq0LNin4I\nMu59DWngb5wkj26PyHRGN8AGQub1s8Vsr0vAM4yjrMN5T5aFFPHVdJAP6ISy\nNciIHEoQvuQVmRO/1DHVqOdzjdAQ8Thbufq3dZM7IxsOwwJjU6/slVvwCZhv\n1sqpPAlzo21cdpBnJF/Ege/0x3aLMn0myUckaOxNqpzdKrt0NwrdEVH7Iyw0\nuarsSrCXKOxpq733MhUxz/egp9LioJx8i5hBbPiFZoJ6Ot/nwnd+edfVUfX/\np5h+2jAGqV0FEPpvTTThdRH3Y6v2X0YfU6opnffd6Dzvoc6nQL8BwDFIKxg5\nVDt6JHHIRzu91k/+UrBDCqM+XrIt7mvXiGVZDkdP1dw6acQVdktobGSob/lE\n7AfnHVAR2DxkhnjrLFgF/qXL17HmBXiilJNvAC4sxgq0JxAYIScRcwWnSZB4\naZZVOpYHXHXwMsBRJwoIsd1d1RARREdmw5RIugVu+qixo8EvTLLVF2ET28VM\nDtgnVaGcvmgPf0ztQ4FwAHP1lZtmMAxEOp9e4FBWl0UtBeRD67oLIElqVZMc\neAKN\r\n=YjDC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUn0fwac0bEJWvSlXiY2Ho/aK9tbJvJ4dQW8Co5DNQagIgKlGM6muXcxOsu0o+nBv98XpzWcQK0XJFg9sx01vXC+g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.196_1617675999174_0.32405096872711003"},"_hasShrinkwrap":false},"0.0.1-nightly.197":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.197","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e057b8d45ef874c39c5eed283d117ab5f1c0cf6f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.197","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-RK6Mn/dBh82mJOd3pktj8JGUvSKgClystn/HAIbdNetJCQ2I6Sx88A+G+6WO1L2JBRME9RQdDLaQenUyZvsFcA==","shasum":"b9df47422298c7e3bf9b3fc4eaf3cbe1cc1461d4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.197.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcDgCCRA9TVsSAnZWagAAlSUP/3bvBsPipABDSJ0VNQKO\nfxyI5oCFrqWjJY27Mn6/e+dGtdIBOS3Vv6nyg6HM2lT9jav+b++LZlLkpOOT\nGJzYqOXCy42WgWW3ajXwSV3j5OzTYCD7dgA0BJurA0Z2lTCC3mi2aedoIaOz\nsIn+0nQhBA3+YGuREkfal/SsrJqBAphl0jIHFe39cAV5mOcoWT9AUa6maWkA\niLZpwZC0SROr9f7ymJG2KiyqLLcip65v1kWwsO61qlafaHWq4VV63NOUNW7U\n7DW18n/OGNomCX7o8zZYtBX6TfIfi3j7599M0CBT6+a3b7opf51MXFEaxFuh\nFrZP1ZZ8cNchK8+lsqys4CRjB95Dw6jcdveDT+ELPNIqCWmKU8Ih75F/hT7l\nzEtfoUm+/RrZojjG9xeWV870LU/AGXMHI8Ndi+Cu7bgxjBX8iD2nk3bEGkJY\nU9rq1PwbK9YnulhDAXyH4u4jVFcOvk0Xhsi1xHT5CPWLGKMahm3cxKWMHPaS\ndIFH+aVELaFmdR8aRTvEkTGiUMIxuDAVBsu4ClglKNKROm00z8UiJI7Ry6S6\nlusrEBhWQBmjoRUxMek5M1S8O/v4VrKUKkEdnrEmACJ8lc0RwgONn82YJ5V+\ndwB7COySQevTwcoSqD83NjjgLBppx24yOIic/WpcOT9LoB7r+gEIeLP3h/QG\nhP7c\r\n=T3qj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCybNbJx3Wf7hnsANmsoyLyeGzcaws+5CVFwAlgBmCbWAIhAPUXVfgGCIqA8q/h6rSYnW2MIgWmObEl4anPNhVmkGM7"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.197_1617967105902_0.8095724378635889"},"_hasShrinkwrap":false},"0.0.1-nightly.198":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.198","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8f54ad1f0b4ae344f47760709f8ba4cda86b9fb6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.198","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-KHdOz2hs7mqdvh/y2U8BtW3D63vBFDuCI8hnyuuEBRh1SumWdOfJsv+P61XY4ySI9mt3kKMxFleyNO5dogy8Mw==","shasum":"989b609b2c6c52037af12010a4ba16c5e9765044","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.198.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgcPAJCRA9TVsSAnZWagAASuQP/3wvJ9Nm7pRp9kJg0clw\nHbONHdtyHz7ame420SvUv/wYoNYF/lD84sqabxFC+bp2EOGeAwnPpcdBrj68\novMKAIsQ9kwAonyWzAPEFW25JPUhxu8FXRHB5HDS3GbNY4j5tan6vYV+EOF9\n0Er70qjPtMqyIn4S1PAmGj7TPMiwUUvPetms7ap5dVWmbLQjVKMzX4hzN+Qr\nzaIJa6XN0+aLSbLNvrzPmOYcqcIx7UCCdQD3BSvXljYZGBbYJOK1KWRvr8Rl\nHE9gCfdyMoWP7Un4XY9bkE1chbPuWAgHja0B8+Cm3GKYeYjcR2vuGUmzCAnF\njsnwl8nQNzBeo5F+W/zHJOj23MrZVTdvu0S+L+qtXueLH6sAxO+oRZYiddzO\nGloO2/sBkM6mYxmf0mNeutzuSUfCYCkGDrDojsqFdnQJFxYB1JSAxWk7dwc5\n1hGiSutKBLPKIR5O1tKDJWXgFyYto1i8hPWIGdJNVhc56csUkJTX2iJFDK59\nzxVfZC85/Na65mO4xe+KjCqZW4HXDg+ssfP/A+pHmBRix57vHXpTDoMIcvzv\nPp3c56Mj7KXu6d70rSHb+HUWnhkD78ii5jgSnnTVNSwdACvtDmETDwIhI65S\n5Zhqo5w1C3fOQpEl5ra8SnnlEmOJg3h6IBTlLaM4+F3ibNvIPVjExwDICaVQ\nVOv0\r\n=N9Hv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCazLoi7VsrzMzKAPH7pGzr7jJbCzyXSmYI5Bo/PfsgoQIgR0RrASkIVbn5s+3DhFtB8jODGy8Q8uIt9LiiS2PxR7w="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.198_1618014216634_0.8966257316656023"},"_hasShrinkwrap":false},"0.0.1-nightly.199":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.199","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"72e70b8f43471e9efa82c6667b61fb024d1e0815","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.199","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-QVriyWcOhKj3g71YXnsS4a9yaNGzFuAY3kjJN2oA8EFpMH+QkFHZ31ZU9Ln+TkSOcgDdLG9VRvuQJc8wSxo1ig==","shasum":"5bd6b497381570423054aa2ff3661a1d54206b17","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.199.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdCtTCRA9TVsSAnZWagAAm24P+gKp9k3ICkX/Sly17vXD\neq6FyMkQ2SuY20xRJ08huYxZE9ol9d/GhF42eHrjOeu0XNpqFW2Xvw0Tm3XC\nF+qhApKVx5PlF0k7V2lNKeop+1/TlWxU5zu0V5EbUYdekG/r3m4ib85XZs5i\nwntZed4UMGHEvcle+Zc0WqjK6XGi0+94hWnqdJ1znvK1o+WbyYPxG9DfR2jD\nzr4bF/HeTIzzCPqb4vc/qbvmQzQGP4C1EfFFh9WtZyOzRXJax0qOPSDvpEJQ\nCBR5rEHjVd0BMGcJuoHI0OkV/3QSPy3bZOJXjzRo4+uwSiarpxiLXnvqUxZa\nMEMckCeFtnii73q9VZxssK7ydpIeEzWwzHHTr5lCgckPbybVStUaGnL/XLdD\n+S6pjbtjd0hdJ1BuYIGLCfEuyw2h/bJSXkNlt+4tRV1aRpgvCmtR0Nx3VH7R\nM9o9wqViWsOcwflOuVZu0I25BQT7+VzbUYc1qtkgzNJSMTEs30avQKBBEGCd\ndCenxGMnABhm29A+v5GCFJcx0fxE0Fvr433GT6nHkbuVC6Uo1tqLkZ9wxH8F\nT/n3Qs4IBBIDoUuvxw3UAL7Ozaxc77TkiQ7sjRPsrK4h8TrxMqs4IL9TO2t6\nkNa2L2GSLC/d/E12PcInxpm31cm9d9GoCzLYc8HKI9aKZqXFxKNf0mXdJ2Kh\nOk1H\r\n=J2L/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJgGbzZw4+PwW6BLLY0EwebYalmoehiXXEfVQunxCzaAiBme+AlzftRLrJknfzG98+37rihhFLSTFE/jMHQl33yfQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.199_1618226003248_0.15039315999089453"},"_hasShrinkwrap":false},"0.0.1-nightly.200":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.200","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"39103f467982c5546dd4f96e6ba32c014440634e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.200","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-xtych8YbF4Fxt1X5h/kegzdK04Tnvxsewa7BjreCidya9rzisvuJS6ZBsW/Kntkkdo131RtELq6L19zPpwN6pQ==","shasum":"ce54149fd34d3b5200e94248a6bebb145ffd397e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.200.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgdX14CRA9TVsSAnZWagAAcNcQAJkX+TvSxZZbRbHzHL3v\nKaQp7G4MGT53l9gsF9B5HYLOt5U/ugTSSAS4EhKgZsgXrvl8e7vRQcXEeq1i\noL94Cz/n9+9KR8/lKet8ued6e0+gFnC8W9bgyUP9IMTrdyU6b2Z+zO4AIzje\nhCJXW9WmZrqj/HRyFZzaml4fPSKXhFROrXbEY89n9gFPCiko01z+zePdos4y\nKhLhc6hLiBS2NhoBilDMNj+EbXPCmHA6oKp7DMiUbUUWSyhoyjBCv9it4qe0\nfgD0BvQPdC2j9DGLLEIobjCD7Nhe1hoqIVNioB53/ZGVGFFmecTaJxwKMbXY\nBe9KfWIQW3HabIt0mqACkC+pc/Z7FD6Sk+Wjbj7ZyXl2vDF55hA3kz37dTiR\nHtBWpLzA/0GkvaluDHdQBOyPuQ/GzN3qZt0d9CUyY26XnjDwwoqXwVwfP92z\n6qKiNwLDBgelfqyu7qvTmMfSnukjWRzQQPnbLW7HgS5Ikj6dOr/HXNHKjYo0\nADLbjmEdsio7JOSwxQsz6YQuWOxPFgPVdsMd9K9c9MeSfS/Zwy9zmOoXMA1R\nXqYqy/1hD0WrrCsI9fXhLOW1RcxS+dWic7ZpzrQ1L1PkXVZgDXqaMzTRjao/\nz447jtMO6XitMiyTJ8jBO4SkXl4fluAm0ZHLhveKErE9AvDjlAIZYFRYCeX/\nPocl\r\n=XRq5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgjy9Qvs1uV8oUdudI23MmJFYeknhTerk6dX3kAv0pLwIgMMKZe7lSlFy+yrtcWtQR2mA2f3OUCiS/9jhfJWGLw6M="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.200_1618312567983_0.9291089309086678"},"_hasShrinkwrap":false},"0.0.1-nightly.201":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.201","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"20c575be4d54cb5352aa6f08edeb9820ce7c587e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.201","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-/TEK2feoRH8BDyww2wHNrA2uE6DbpPeC8offreabtGkNotf68I0QMEIvsegawpMWr9BMKJx6g5xHtY167ul7lw==","shasum":"91506957ab5d156b59e2db8792b071161379df42","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.201.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeB/vCRA9TVsSAnZWagAAtZUP/iezteKXxLqpyPNQT0fU\nmquLA9GD7iajcC15L/dEFKH6P1yDsns6qQl4iCrVKSKOlCJ3W2+oPBLpNFIK\n50a52yOGxxNR9VXyGo4VqZ8+RbtQdlnqkHqlXE2Ir7J9BoFZHz2Kdu50+C5G\nMoPCYIXdjY28GWfpussB+W2HVcpbNxk45Ti1WhshKxmDGnpnZDy0lnMXVJNX\ndKV0UJ78lhy+5gps9A+S4nE7kbTEzHnrzcWT0IAWbTjPFFGFXWGwpRpEEH52\nRD6GxMbwpnBO6L2+i3pNTcGWXTWfX4LRSSWfRWMpxD+t0A1zA+d/fxl4nIAX\nMlfafJ3xfcAjKGRtDr0v3MdNrvDeHsy8Aoh/Ew+dSuM1zF8+my4uNJdJfGI2\nhMPGqeZ98q/kM2Ozo2q5Mt3rHV0HKHU6r2EebOeItEtLp15qDIr2AZA8iuHp\n380B6vEIlASIRzLfDOB941v9Ln4bzY7HCzuoNX6xSZWRBElVpP00BHPpM07m\nw+5CB7QReDI0/FpstPfiyFgh2os1/9CFxJ7j/iSuT0jpcb72/OIpFsPjHGl3\n92fVM0npUlsNQ8iFeV8Mes+7SfKuatdHFcQlWae2YqeGWufGUj1/qEZuCpfk\nHXNanN1RVnYCHdjeSKuBZgKpxIQglQROIWAPojPexLZADM45rcH38O0/+Bsl\nSxwE\r\n=CkNq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClK589nnVAo4kGEVU/FN71dBO3tFdTu/IZhRHxRSzNKwIgKwW0QQjruVH3cO+LcaaGCv4ttNUkmvNkgPGo0rJTDbg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.201_1618485231300_0.09044721446836723"},"_hasShrinkwrap":false},"0.0.1-nightly.202":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.202","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^3.0.0","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c6e7253587821c919495032ef64fccf046009e1b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.202","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-wS988TR2TDpwAIWWl9EQdoMm58OxEGfbemKXxSLWNyVGfQk8NZ6XZ8tD12YQHTBKOHRLhHZLwW4jni/ztOJXLw==","shasum":"3f910f95ac4625fd864e264a580d9c1104a6e5f2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.202.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggj7nCRA9TVsSAnZWagAAy0QP/1T8pekmqnyiwdZgJM6n\ngObByy7STZi9rEpMvtfAaxqQAYZ+QUN7iSXbVrNVQk3xvtFysSz/bxEBJW75\nNDYSmdvdN7sBEAJSbktmDyd5wuGic3vKtnhJQ9uvWfXlGBfqFzWLkTP1cDID\nv9QKPPMmkN7HE+QyqZN4Mau+rvgijRakidC9YJgB8ZmSK5Gnb91gA1zVd/Mh\nyWS19YTh0oU8C5zy5NwbPlFuWPcDRQugjIKcZeFJhTE+gKffPP6XnECYu04h\nCTGpWWFHBAjaegGOhQB0MDLxDPBhUkamQlJu8qch0Ax74H6zKFf/6H2R0wbq\nv8mohvthnguYJTDNNxo8ttCzwIQJzR504ZMBMdCtQICtIEe+GTDAsioTzHIk\nppXh5dmgcG0MQKSIFsLrsOxHl+XrQRF/V04B81q9Ru7bM5thBQOa+S1XNMMX\nQjzIEgzV3FBieuX/1EarMe6y4vwggN0YvToPHq5j0f6KiuyCmZNbECoKz7q0\n2Cfk/lD3FI9QxFVXjuveNgbU/r3L35MioodkB2WABXIKryfMw2PIUuXrp1Ts\nZ5naWbAq5VVOtLXvpp4AuAY1WmfYigD8dksId1bEDgrYBLEFTM8L7FSi9KYG\ncOKIo/JxZea3Oz8sVrcvaFZZJgUUfwEESBlJgEAtbIlIETsx/hkfqcbGLExF\ndPNn\r\n=4kQv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFfYlkgkw1J87lHByuMV6txOogvSouj+NLgFMER3ccpXAiAMBt/78oUGDjNOCcQ0ckCmX+Ql5iBKZD/sZQ2PxnQzGw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.202_1619148518444_0.4662642072734873"},"_hasShrinkwrap":false},"0.0.1-nightly.203":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.203","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"431c16429c034ceae59e091a597bf48f1dedadd0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.203","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-MVZstqRcIJq4i04ledVmRyYxhlGazkWIJ9xsaDT2fRBTodNUoXeE88qBsQpHWvU6gGBipRr4HuF9MtpTfzjACQ==","shasum":"516ce6fed03b9319fbb5ef07af26231ecb6a048a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.203.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJggrK5CRA9TVsSAnZWagAA7X8P/RIeGkBAu4O87uO5fvHP\nj12jsCyneFjXoo7PlfJ9+L4vD9pOD6zpDucUnYhHmZ8Vs5D2qzfM1uAP0nDt\n8k5mbg4xOGUsmE+uo6LgoSR2QE/yLaK+fc+bRYGQOZAhjf0cw/iL2443s/NR\nl1iMJgsP/aerSlew4M5R4pnLJIpJbIF1Mp5tTuYAuDsXppyuwh/BANqee88+\n+sHyw7WIooqjr0YY5bDjzCFJVuDL9xJ9hwpxr0vV4o/PoO0bqrWbxk0AZqd6\n5NbKwun7GdQKBAlaUXY+gVjtI0ill29ELtbegUMSaNtmoPkgxzbl2G9s3aDx\nMEgyQgEXZolQvdoXauB2/K4Z+b95tS4E1dt/B2xVyRJrGgDOCkDIJ0WkhDaz\npwf38+tToCbMysHJ62jzsRJUT9sKbeaacZX0CsKGZg0PuiaOwKpz7VbpxeAz\nRJ1DNI3thum03es4DJAW76lmViA4WFTUKOhXgnxdbHQ6MEzkQcm5jmZLOZiM\ncqVbZh5QBsY4+PvLNp0euJyhcK3HO5esW5J6KqS7teZ0NNVaUVLeDOXwqiPC\nS4Qo0ybT9BrAE+9fKPhmgHDcx0KXAssJxbfpmWjAsI9IVWW66MPwYoSVN/SJ\n8QCrr8eeqCfukeOV+Uq7EKtY/yLtyTP1my2Haa+OrTbWU4JxMQPefb9uHuG/\nz23h\r\n=BIXu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFlwQPUMSGhmx1mzFMIiE3JLR/1P8IrSbVQlSiy2kNcSAiEA3EtgvtJu5f+a1eFzcsWFAx6so6gPWTHYQjFKDzVvy0g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.203_1619178168448_0.6856128342368033"},"_hasShrinkwrap":false},"0.0.1-nightly.204":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.204","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^4.4.9","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3814ce4935fb5a6c6ae7cd1f2af8991212ef91a6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.204","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-hh+OMQmOA9SV/SgZZmqTkUDAVJPfTCOzDfhGQ94j+IVKc7IxwJXWWeWzqWPNZXakpLavg407jKrDKM2JSKtKSA==","shasum":"0e9619ccd1f3d3d4919ffefcefd3a705c9efa8bf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.204.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg0gRCRA9TVsSAnZWagAAVgEQAIhkwXxgwsbfxEEu5NSr\n8Yc06LVCC2iLQBCaGLve+g/w75xVFo+u+n7aLN1hAEmmfxIrVlO50Bgve7lt\nhAIcGzNBEDLuWUaiwYba+pEPUbb6feX8Nn2w46Pc65up0DTpzonr0t1Vr7Mm\nuZ5VbRA1OC4IgSmQHLnL7D9kTlYahLiFeFLLm0LNQiQgMjzH9qH6cQbIEYYb\noSxlEccXo7TxzC4PSyJY1pBosocKLsLLgZiNMd8Ah2/BN+882Vjlrsa5qFMJ\nYXi+oM287w56Ub6ojs1pBBDYsgXZGU9N1ZgSUMOQKDiXh7evYlT8IV2/zRHW\nqq/Nv4/3nPN2av/j+ik9av423eaXSAbaD+frSxAb7a2uEqw9TUKVXuJnAimp\nC7q39ZtiMpY2vl4c3KgNCriIdhDidSYw2nC40ZmMpfWsNjSWWAKVERmnhpA5\noqBZWQfuOuHhQQS0IK3V9ihOp1f9Yj7IOUtWJzHoejNMVRBF4nRU1p7xJY0v\nGFLE5Eoiian6vB06LCCVPJ/Jy6OQEp174LBOu05s9SOR50LUukTF2X81R7KC\nXnwaH6syloopBnQmnfyJlCvk+2dm1Tz6FoYURzNRbMwZPbrpncU0Znl87Cze\noz73oFMfEGfcrgKp4+fzJ/1KgWKDDjfNl2qJpjGkotOZ2JYtFXRl4GERKgAQ\nr+li\r\n=WuPB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG+2R/Xdz22vorMUVv8QMOPXzI5qg2XzqSfwODq39yjRAiAs9hQYku0x+roDPSV8+MnkUApb2eTDGP6onMXEVDYDwg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.204_1619216400837_0.7580310408740543"},"_hasShrinkwrap":false},"0.0.1-nightly.205":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.205","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.35","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f9abb379fecbbf57ec6e4a2139ddc306f497bf33","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.205","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Nwy7Z7Tao1O3EBMakywuHVExJ6WTPYIS2uwilRUY7Ullg0RreqASDMSXY4oREJaSqI5+zDVOe8M7gBzTv1Jt+Q==","shasum":"e066d6fe6c8dcf86cb90db15883361192d4f2114","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.205.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg2eoCRA9TVsSAnZWagAA1d0QAIGGmrAPYWftywE7hI+x\n6QG1CmJsBz3gvty7vIh385MPCzeM83a9MEVoShXAzq4l3CHfJmdEYoE3YCAv\n89aVfYJhcZORhuBygj1YD2jzDV4osm0jNeIHh3q5iPZLf3I9liMNPf4YlyDa\nJvDLag9Mlk+JdzmPMnpIB6WaSyIxrTg/moxlpx6rc/J/7/wOrY6aVQRomn8P\nWdkwLY5Q91t10QW7nNphse8UFGIiyh16Efg/mhRxPPV1aj8IJtwBN91hwmL4\nQ7xCScILH5TH2uokms35HRrXtz+IgXvCFtB1lQnu2J/epZa2GBWjQAhcj9cw\nHkOBDZlfkhvleEEa9keQzf9nuEa53PC6Ld8UFcbiNeeTKqblSQxkVLdQzm5H\nijLms63UUx2UixoseaE5l/e4v5gu34fOEbAjwUiqEi49U3xPNNUIHVVxw8l1\nNU2YnbpX31548Jqnf+a4L0RVSlQw7Cc56TgTKv2VwZHhwltBUaHalNd7mVCS\nGVQ+HTHs0w6RpCrxiT8BJrfqXFzSEh9umpGKsZKY2PZgUNsq1a1fuFvzQUm5\n3mW6MeAot/0K4I2tpPj28JfQT+5AjXjYnjgHOBhDmvy+M5ZUIcO3CAheptZ6\nhGwIPD32xWm4OOAFvFHWBU/UjKQquSINIXppesrhE6qHfxuYZUFJWNw26LQI\nhj3K\r\n=O7MA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEjQfJBvcQVulNhm7UTG9QU6yRPgQYEPDE4qvTtRSwAPAiBRMiRB/ZLjPnIrVJ47OpLm2iFnTayGwii4XEWvCaK6Zw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.205_1619224488138_0.8325393014150253"},"_hasShrinkwrap":false},"0.0.1-nightly.206":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.206","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bd0831a8686dc3bd8f94bad165cf33c93b3a19ac","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.206","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-v8kTuygLQoAX4iybeQbXmVbm26IvrMdFe4AjcCXVVnf+eSS6dabfffdlaA/yYdV67yEEWeNpRpzdyrbm62y0gw==","shasum":"1ddfd2f07f3e0a83b313c6968e4572d338ad71df","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.206.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgg/37CRA9TVsSAnZWagAArLYP/1BsNViKTdNZBQHXyvfE\npSMJm2klP5ai7T1KpgbFUM88IsYtlxIAoxbKsuSBCCI3JW4Ti444bbJkdpCi\nCYIYJe/PTOtvsZqedWhgD0EnCG6HLPPl2wgtVaVYb8zZpKGENpZIrO+Dx8A/\nQ0RC1IsnvHy6bpaj2olT5pTPXEU9GclPhdMwgzWPAC19WhBj+wr9qmSwUAX3\nPfuOUaxLLlw9EFpSr5MlRkwWCXjGgUjxTxbRZyn/PsM17S3c32z+TDgX/5lT\n9kQg8iyU0S1r0mXj9W3G/lrDOI2hFX0OcH6a+SN/iLcVw12nAfGKKVPSAD7U\nK4Tm7L8LPrqmelf77FLoYaJ9cJreBpkv7BDtETvboO9BJD4q9YclKKv63wP/\nxiDzDBXO7cUVFU9lSRKShEd+9LEpVVrjBbqMQTQKycxw8lJ/yLHCqq+C90bG\nB5jx7J/t96swPShECj35+HZvgapnS890eB/AvYKF/HUzMWz8npdBCoPHDtH6\nzzegyey1BoZ50r5XtDFIHzw+4v5yfMQ0fuCAa6DOmUIrfVFkGiy1UR8iR3P/\nutgzKKxSnL/H8nUU4ld0pS9PpamjXkaih4QCtfRbnlb0O7IG4wcVctc1j7Ka\nwyOA8RcEaYuznDxIDXITP1BTJZvw5Rb1IjnFj112DugPwZtZ+U/eNYA+Zbt0\nJH3q\r\n=2Jhj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGlmViZUqjTpVTqPAYgaJ3/WcmBueWg0VQJqvIeupY8/AiBY/IEWFhJnc+BBo3zcdzTO528mWUARcWDoHBGDNsFBYg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.206_1619262971082_0.2872405426886342"},"_hasShrinkwrap":false},"0.0.1-nightly.207":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.207","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"69d013cd5e60465aea017edb4e11f315be65e309","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.207","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-pLmK2/h9q+aRRbsq3/WNGrAR2IKy5nRiE3mYEtVEdFmbmCJtQ5mgScE+0fZ0gjHMIiSiZ3C9ZMGgA7/R8yzeyQ==","shasum":"b5bd55d874480b5532a2d5ba6ef0be5eaca23edf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.207.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJghcnuCRA9TVsSAnZWagAAKVkP/RqmXt1+907/YmM8xyHa\nYzLBYBWPK+EbALUP5nMv7Iudx0rUVjgStaM0dqZwiDth9MHJvGKhyYuu37b+\nDDldTmE7HQA7XulSzK+wP1rk8914yZz8roaEt7dU4n1PLRgLM1Hgldy5PryS\nejnI8sJYhzQx4YmKA/p9XS/bTCrHxBAjGn31QFyPGeDLEXuObDmcj6VsHhSz\n9NGgr3TAqVHoUUrM7iXDYSbRxnMUoyeg03Hwr6SyQokYVecUh9HVM9ZU88M9\nwtgK0SjXJVfNl3w7TS/8NtT6wPigPuxUvp6IZCzBRpAETwTfD1PE9ZbXrxxz\n35Uk8wMBSN8q4c/fBEULQaoXvH9/fXDebjGdYPvjTq5StWkUk+D4YTXz3NF4\nXAdlGgcvww2vWt0FU3Y6ZaF3Nme+n/DlfrSqeujAJFlLev7zR2eBbXjffIFe\n/YQe3OQ1KutlVxY7/BIh2vknV9YlON2wmxA2V4j58ZUvsPcj8SFLJBBa1N38\nxfOh7eUvFvTkfJ9tHmf5PRdso2j/m4VW3sE4D8DdJNAwEO2T983HTwE+rJ+c\nPaVIgXtgX+QMZeA5khf3X241QTzsAxjT6fTDfIg4i4ylJ2359j/NTg84G7i0\nYIaNjij43lJ7MWiCV5WzDO55PnV5gIwAWvnkcjfQtWcTjOb+3ImHbwMb3jsD\nKzCK\r\n=cUPz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmoYGZ4RDrdHWHht2ci9OAaULF3hFLH7xlmkdMlECDsQIhAP/kXr5wHV/8rxC+A079oN0CiY3JMw/2GOrSt7bTSow4"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.207_1619380717472_0.3910379462972857"},"_hasShrinkwrap":false},"0.0.1-nightly.208":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.208","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"cf1202babcfcda35309d44fa03b63826806861cf","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.208","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-b/VKgJqMIYOkCLA+RrpARBpHLIbpZyPK/FehUBz+90DKlkiW4m7ub0cdbIi08OmYy/n4q2Fbyyl1iM4wCzRE2w==","shasum":"01946801bc17858b06c4c242bf84f8d98af4b2f5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.208.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgiH6OCRA9TVsSAnZWagAAOkYP/ib9ieTlSelApeSl/b8r\n/A+GUOdh8RFspdrg+wzC2Uopq9IrBbYEC2L6SvTxUBl0WG3AFfRM1+sw8va6\nfNXToYXzfAQK0Ya8+uP8riy+L+pAF49dZ1sxYPjn0Vkked3tC2gEccRulrh5\nv/JFQgWOndOvfitIiO8UiMMwe9RRk5YG+i0yMbEDdNvtnvULqnuJLnT0Vpq7\nYOeutV8THkokjsPcclPSe59uSluU0jFJazoiVKW+Ri5aJa7Ybz8emWMSM1WI\nuUySjB6hPPDZXNIaOmuGbdPoocqEc4/EM2Qzs2Y2OOZrtCnnesrgW8Mkkrme\nUXoJB/YI+5jXmIAMTxyov/liCN1hJ6QieU92JyTtCsvScOmFcK22D24/iNRh\nqTMMjfOcRyKrG+0bDNsae3M8LbiyJvYWUYcn7drnW9+0uxwaDsGKpfa8RHAR\nA9MPIqyVOc+pa68KxlNRkVQIdibyN5j4vXa/KY+OmPEua3PXEqiKYfE4rofj\ntMQOYJaI9cjtU7+3Koofrj4dRoOSF1L1cmyqtxCPyy+QNTTJdl+rlFg35P/2\ntpqi8U8rlv8RchAPl57Y9wskwT5SXdD+vHQ1e4HaFLEkNSiVj1+jfCu2EAcn\n/bbXberC6jvz+jQQsGtA76D7+3113KV6bgHkiy1x4ly5ZRyv4RxLxHoQNQCb\nnals\r\n=Hp/D\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdEK6UeQQWYefcFV748/Cw/n/E2WTmjheBEGLh3dp/jQIhAJAn9azKrQVz0FizWn1QcGuh/b+Jt+KOBapojJAxDFa6"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.208_1619558029292_0.839896591268287"},"_hasShrinkwrap":false},"0.0.1-nightly.209":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.209","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^14.14.10","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d7f35f8708553d64e61a057f22b79a0e0e4aa69c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.209","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-VvFnN6xfv4MjnxRfoDs3f8CilzsXorWijvBSokZhB4iPy7CF5buyfP/ZLtDHjcbt5H2HMqcmsC5sWLuCKDvkXw==","shasum":"52c09f1808c90df403260c84486818bc1a60e3b0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.209.tgz","fileCount":516,"unpackedSize":2232103,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgihG1CRA9TVsSAnZWagAA320QAITr41qFwTipXTh/5Cyn\nLG9sWlLOTnUxTaBHnUJbPxcBA5TUQ6TLKrJUHv7m4ACiQCkrj/HVuOtX1kge\nT3wNOQ1Dsz6XdSWpPUFa2NlSBgluP3ZvFG6MUbx/WNQnreoaeaMZF0RrAo1A\n9VyZ9ljaJ5Xiem9s3QdxMqaQaRNc7E5btJXSUDbKA2VO+hwAtQSRngQwuQl7\nbsfGdd9sYQGmbFdV/6RmxWsmkV0rqQrN4n8EYIL94Ubvh9Ph94baKVyDdimW\nBTBEmCm/WwbzRnXCNkKvThqKFPMcbFWhDGHGUD7IRtzQ6G53bT4nRaO5y/Vb\n/I7vGkKr2FPO61RPwTlodlJjqgXXwPlEaDtbbsNf7V32kKrHF1yHuxkyW5X2\n/pUWpNcEaY/wsalJmYi0st/M57eSYKkQAroBHdZxTiK+O8IIt93GSYMWo44D\npjPY/iShOjl8moHic4uNJye/++a4gaigT0Gb8pDPACXPAj10agR/a/LM4QdQ\nmNffkSCpmRQwIZWQwqmvt0LLnIEzQMZuYwVST9xC0snCMQCN6SLvfsxovLnT\n9ORGwRTPledKZVfz/yn70+RSQxL3D/T3QZeYceCtvJClHYJSPfc3fJMiVe+U\ngGCxte+IN+odyrR6C/2P4g9Meq/+JRjVTu1Mk1Xn/q95KSRlYANFcIpCrdY2\nSuop\r\n=WrZO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICA59aiPtvkfPvSUyjrc8WG6YPlgPksCjDUEfXX3hMgsAiEA6IksIM9TB/CqdM/IQnsyFBe8ETuYu09vIBKqKMm6jg4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.209_1619661236808_0.10848333937360266"},"_hasShrinkwrap":false},"0.0.1-nightly.210":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.210","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bcc200d5d38c502288de9e51d0b27389557e19ca","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.210","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-2+/CxGytcMqvJMsGAQTprTTeY+Vpe4B6yZNrhJYVimYw8unWy2e2qaHgLfXdG5k9wTcXfxsigVlMtBG8O0vI9Q==","shasum":"b3b4bf9f0d6509c92bb107e57c5b0b8f6d36bf23","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.210.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgip+KCRA9TVsSAnZWagAA9j8P/3tafQ71lQgOdDaLPYQ6\nA3+63F4L0LkOlZago9MLYx4N01B0vqB0W64/luEO/nh17bWTx/iBJyPrrApA\nf0TDkBLtA9SxgtOIFVCh4Er8Lz8gwPv+VkXbfhki1oMM/e7L7jmqeek0bqjJ\nPMKSvVTCX6BUwwfhv2glncEAq9fCEUMdN5gJ7/bRNDx5fRI5rZ8jlts/2waX\nFXvqrnJi1+Xonus5/caFwlSt27/sGPorgH+DxyUzWnAXcvcJDtpBkg0/TiDd\n7SwfnPHKfV/Lqq4apYFlLWjt2x1se7ESnLTzerNzEYToVJPcqX66WdOybZnL\n277ZTxp3SsSI+nmLfYNYWwC+JMAsZ7pJ+Hx0cJtJ3IRVzqQKrG47jCkwoV57\nS+mJrcwxj+7YJot6B3jMbMzZWM4ackF3LjtswNLHY6BLavnjtVD8j0unw4UM\nrvE1uJyz8sDgWWgky587xKPgjMdzCODBJMiHeqNc++IJ8QNbSvpbR14bUfuG\nYIujeHvCokc8RY58BY8Q0IaGCthPFs8umSPbCpADLqiS4JUTJEgVSopyMonD\nIiBnmLBVr09qKdGEsF80yRMG19a9778447pOGwHnkUDJ/BVPOfrz+X8HZHkw\nokUFi1GbqQ6N4rXokj7NDxEvXUUXv9gyl0qNSd+iiEsrxVXizKIKAZeNq+4C\nC+pl\r\n=r2Aq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDX/ltFD/MIGdzqCmPQZc26yhGMOnuSGsbDyRMsDo/iHAIgVleET5Ps2tEEWkatCR1tVZ7B73c8H5i7VFKNgM+cEDA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.210_1619697546053_0.22208242343661078"},"_hasShrinkwrap":false},"0.0.1-nightly.211":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.211","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3ef41e51c5cdbac7ddc895db1fb0d3f90badbd9a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.211","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-LHDjmxdY1bDLGaKy9j3hkCluFwSPDtp5m8wRgidHu2QaGfmDcjDhX0rnTIR+zPFVM/JgKbxxNKUgsLJdjgizrw==","shasum":"4c6ebc60744b8cdcdb26a050ad8c920d1526ec19","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.211.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgitjdCRA9TVsSAnZWagAArKIP/jg+LnU467VqL3uf56XM\num5hH96/Cq8xl2JZeYvOXb35C8eCGinQvos0Kdpk4xwEa61ChL8/HOCT3nsQ\nJVScbFIW7mquezBe/lsH6Sn9g73+ZXxcl5+5B+nPN+khmaxyT8BgfKFOu8NM\nkYbrLiZwljXAc2UkH92CQyHLpgRi4IWYUW7CR2faOBbs9GTniIAnhU2VpcXh\neCNtsgLYfCJIhJ0j88LNK4KOneXl6M2ZjEhONfvjcogtbXg7cSG/JzYca1kr\nNVTx8CAuSpRFqT67aiPGB1tG2R5HqLF3cOOEYoHEeK5CcUw3VaVxmW8ekn+C\nqqUwzqP50cLMz6dUDpzoBqpn96gieMcnLirr9mq/3/FVI6SCyIqKUvJC3PlT\nWejBnNP9fc5cnqkb1Q5T/iYjzEe59ezHJTETGR04l5VBtrIZ+oNvaJaUFVyr\nXYhHMsYtZlWoalTrlm5GbLqYz74dCJrFHQVw+2goYHPtXU2jYnekp7FDF8wh\nYXXxCrxBlysqTeuc09gKdteb/lMW6FsjtPmv1Jx7n/AZcKTRNoRWdmHBIRPE\nZVU4fqPwPeA5BSUs4wXBy7mGuaUPoeb+B8XXF1cVf6N5cKYHTvw8ip6F9shW\nEOSeYhLcALUoGeftzrpdis3HdOoWHstW0MDUo0tyrANKhvLTM4BzUqa8qu7i\n0xM7\r\n=8RNi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGSYWbrd2UJHIbwsuJL8pY1dGxMvPy31h1HB5jDP74AiAiByBoX77eLHcYlw6/uBlkLdnLVBLF3YS/9qjqKeVMEEjA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.211_1619712220934_0.5626408778525684"},"_hasShrinkwrap":false},"0.0.1-nightly.212":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.212","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"03377505f7a343d35aa2ccf2161832f474265dc8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.212","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-7AOPitIomJ8eEdacrLAQ6RX7ugXmQsGBMQ89rtX3I8v/2UD9tLAle5eClu40t/6qR8PZAGqzyOKRN9V8PwJn2w==","shasum":"7868848ab2a6e1c86b8a3cd4818678894fec803c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.212.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgivryCRA9TVsSAnZWagAA6YIQAJNvxaFT2gCKFpx9rLlK\nrgnvbyEvS8rbGQE20wZW6inoqUDNxbMWov30AzcO3RhCmJRl2/1TgWkz5s/v\n6t+DmVNyUpqWfol/sCU/5PG5ZZjqdTyjYvSQVYiqAsNeXBp4jvq2CqBBG6w2\nRCGFC65qDvGnfkZzGPkkcMb4F3ly4hrQ6JX3jo5lNX06EEQ5iF7/YU5kR1dI\npFMxEb6L8VVF9eX1NW+rhHN2ECLL4cfnEqPCEKA91p2Xo76gjvWz1U3A0a4A\nhdZizJBu/N6TLCAez79u0jkOp7WIr0vEErw3PC2UQlHTvrAzKQQOpa4nfIwL\nm9QsRfRoTeSvi4A/gRVzzAyC+ig3A5CKRkppfNVMaFcAFAN6ogBI1e6twHIJ\nz8xGaqVQ+XoAys17S3I4WQatANCcdZAdKfsOKa5X0qmh8Sv72CaIPg7mMDTf\n4OBpspVcL67kAO4vSwsd7cxXkhocEKVA71WmN+enlVUrEiP3z3lZbyV3Da4M\nYUkQ5di1Bi0XZmI5B7Fny6sumdkCI4dzhx5q4p8fDkH4rF+sYCii73nguFV4\nRIYYh10vIK4Yw4EhKp6y5J8r7Pil3gKcJxrpGUmIx5iP7ljaQHOhIrqKAbiT\nBAgHKvVMxuVR409bVft2Zmksug9sUW6jSEv0KTdEhehAbKn04jimU7FQakPC\neAq/\r\n=6Min\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS9vLvYETmt8mQNyqRuxqkNGLFp77JrZ0ABVMeBstU2wIgFPTv9PgECJdsxaVLzwse6vqgDA01nfTZ1ryyX2tffpg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.212_1619720945920_0.03588736991920438"},"_hasShrinkwrap":false},"0.0.1-nightly.213":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.213","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"411cd1bd438e4b4bd7c86990b7b04712aa3cf1de","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.213","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-QOnr1PPISot9NkuMBB83AjiaBHp+LqATRqMEiC/pZl05dSt3lfe4nro9jAGMM2pK13Z+ZvmAxwr1n26BjdM59g==","shasum":"0491c3fcf3be1d10170e1013909745fb4febfe7f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.213.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkTW6CRA9TVsSAnZWagAAYKEP/Ao9h4h+k63tCC6RcZa2\nA6vFbobSEzSYdaJL9HJqrT0I/VNEXyKA97lApauZ/ql7CmUMXRwFazKkV8ZC\nAlMVB1jyLhGrAM0E34iCwN9H0VrGNhKkPxeXwzymY+ZTjNw3YKSsOyVEqEVI\n2H7PccT0NOLZWBkWSE4CtTrWkjOxTCKMCyAB5O5CP3zRk3RuUb0ird81SOaZ\n3mqNKnKzRuO8nM3CD6xZoFIsph/KCgslBgm09e68z0yglmux6EXIQp0QF6D6\n72XKy+GlfGeQqTB43X5w5ObBXInyS9A0Rc0pWq9u3IHi0UWxDWgZFNIoz0VK\naMTErWNnsMrFmWns+QpXUkMBiaxhz3cQTYb49SaCG4SmcSyWwT/ayqtjkOQX\n45A3FuCuzKOYpKhKg4+4KfR3sgr7P3Or7vCM4lb0BFcV++e3Psl7E/KH28MQ\nDHnRex0LjkWx7t66oQl1T8cYCn+313cPCUP6Cv/lnTaRX4dmhUGd6sIIrfE2\np5g0tl1Auzb/WrScVYFDGi756SnXqoW1Yvw2Y69QbGmX09W+ftwCkNaXmB+b\nt0WAq2sOm3hzl9nWBgb1FkbFmHfsMeeyt8yevJhMSKoqPhz3H3fViCHByZQC\n0E/4feTgvoJM2AiMGE4/uGxS1B6FR5liYTWtnJnXcWPv+Y9EqX1X9eXBEcos\ntOi/\r\n=/wgz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDNl+fVNh3DCtdAT5F6+pnKouiAu+PP6RLMmxPRarKV4AiAehNZcq2EUpYwei/NH4K4zcn8i2++o7TC/jNNquxYAag=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.213_1620129209657_0.5478248498180311"},"_hasShrinkwrap":false},"0.0.1-nightly.214":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.214","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d9c3c20c326e50d16f8198e952b3c5943ed14fd6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.214","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Jt8Wj0iZuVQS5aYxFhNRrfjfQ2+cVsjQNk/0O7B0EpvY893Rnrxh9KXQsOdB0OsfN7+nv77TiR5SXlKYDqyB/w==","shasum":"aa0736c953c151fb787be162135d802144bf8db0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.214.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkc31CRA9TVsSAnZWagAAAEIP/3+sWF9pF1xumYMMQsMn\nT4A2b2WDRnbkBZjOOwRrEuLfO72vGVa9cDyQZ3Wg/g8xK/77d7Ew5qpuk0iR\nql8ZUqSKLACsgxthL1x56nM5PorqpncYzh7n+cVYp9L4g3AygbXk79kS/yaW\nDP2RimsymtHUrW3q0vVIFSKhQmXmUNjpCMb794NP9onjl6eow3oCJzp4+kDx\noTKA7DUgKR+J49PVMVbx8Q3BGlEkmbXUnjjWT2awmnVzfMtORwivG96kDccY\nlexmXA3XzEHehjrhs+1pGsPUd8H2sLkDBZTnpFEDzeooIPOqgCcmBtsekcOo\nii3kdOINrCLP8DwdXOP/ulxoIuY20XdpuNXkNJq9mcAr+yOSe5rtBeymbkbs\nN6YyRK1wwJN9OUdmUeGP+NuYIZJ43G8LzXrwiKulLXlQoHZorcmZJEs0ncMZ\n+Gtwr2lnWFo+trSeVALA+SRmiqq27XKEdEgObv9sevEr5zpo8J41/X+dWNAR\nGgzvQkXUEmCczaWQknIq8Wb4lzYHkNyvE0YRtZsH5uynhGLNhizYqY9rP1d6\nRueORFxJ7LQr0lGQN/wNec9Kmt1YQLDYRipVxW8NTQli9Vsrx1Ym7aLMk/oF\nanJw4KRcGLkhB7yTkbUU98PdPzI/3bAgkKEwMQY4x/xR2qNnT+lA5tpVZuHe\nJ+by\r\n=h0RC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBZgYAkd1FZwXFwFG1a0xIFpHZvgfEd1K+Im/KhLKNGjAiEA/SNbbfbuxOwNY4NAide7x+Him9eyJ5tnfEBC55samEk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.214_1620168180650_0.9666903326936866"},"_hasShrinkwrap":false},"0.0.1-nightly.215":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.215","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f31201fd166bfe854ac497727a2bb47a44ec8279","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.215","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-8ZXqnJvBWHIUly+MI0ill7zCEztpV0t7YhC6SXF8kKSozU8vH/a+oI2mdcWu8Z0o+fei6JMsnrr93BDsLjK0ew==","shasum":"ab3ff443729259b8def6c3a02a20fda61936ec10","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.215.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgke3FCRA9TVsSAnZWagAAmJMP+gN3m7eDQvIsypTMUBF0\n5h0EazXTkeBqu8zo1UHr2/NX8WIq+bp3oBHPhAjuViHElkfhW77A27nBfV0g\nn5YY+6rQNg5FPaWkKsTgHxsaci/svnrdsq55OU2grG5XNaz0BntOGJET35U5\n4C0XZ8NHhW/GybBva4id0Njb4eRx6geH3ULvGxzKWGmjXzXoCEcby7DG0if1\n9ZflE20aFsuGuJ4TtdPWw3jiSOwCel5CgTX0GhxJUGic3D8uiAxCLmzCNGKL\nrjFYlIFv/1LdzaSdtxR1O4LdHDwGNyKz8Tb5Hg975VcO8HIEvSxwFAsohCNK\nzfXpOyAE183iBecyk6zr0GBuc0dIhZWWiS0OlYS+AjKnV/mNHfeuu2ExchWE\noy1xYybt5/uWCkyk1y/F9zE3M4usvb51nkywFL/wmiDvge7jPxZVxZyd7eJf\nIHpj/IueMfOQ0Ecqwygci4Pvjnolzq1c9LeW7jwIGf94zTcfZyN7eePy4n3B\nd6FMsRhb7eOqfEofwcqs3BgLX59j6mhkFPbyRK1u7FcDcUnEiCvXFRjBxsR4\nR+b7I4japjHTdp4ZkP9cKNcNR1yTykle+0NwecAfHboXEwb31fdPSmhkcE2G\ngIDczPmt20iJwuR7ajiO+5vapwwHSSTnrA9wZ3eb2fiyW6ElzGpRKERPddH9\nnqm6\r\n=CEIm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAnZi00EegsutSqHIrLq8V8Nj4oli599EXxPSdYil9W+AiEA1vnUSo3lIaeXNvqzVITrRF53fPymElDyucvCZlgXD7w="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.215_1620176325175_0.8385558988804278"},"_hasShrinkwrap":false},"0.0.1-nightly.216":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.216","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"cac23e445a109ba25d425becf6fae0e72eb13b51","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.216","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-NjLJEtPZg5vunEShjoYBJ3P6CZ88fg1ZscB2HCCueYVPWqVjgYzZD9LT6ZxmrVymUs7LlD6UEVwSXKJefrHZwg==","shasum":"0d2c489becc087e6caa703f65c160875757dcc23","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.216.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkgBTCRA9TVsSAnZWagAA2uIP/j5ivkYlzH41JnXsbGM4\nRwiUP/PbK44/41qkYpjx7+AzqVuLmTeNIwrxXlIh82FjHxBOX95yjLK2hhrJ\noB2KRQqlBpWn020BY5+exOAa9VcFfGVwxGUV4sVQuxkF62GIr3aQJOzVjGwZ\nhMwXmWSGFwbgOdIKWfhj44mk0VBWum1OjSNJKuzNoAa2/suKY13sWU09ElMC\nQd/bYmXo3RzEPEmKIy86KOIdWWdKIAyzDa9UGYZjVniaRvDQKBdeQorS4CQa\ndsq1weFkb7N3//lH3SFRunKjqxh1HzF23xh19TuezA62tYHrQzggmgYHpR6o\nhK0I8gKXokHhTvo7MTIbdHSSW2Y4zuwUB+AXbhO7BQRld6ctt4hpB2aNRaly\nziEQ81PFbKg4+0hz+x6mcrfDwCjUNJwe60zAQq+/o/zLSmW6KLM1nfptjGXk\ns04mCqyTwy8OTkv/CdrdzKyB6OS9y3uVY1hZfgn7V4mK6KDjoVwatRzr4vnL\nRlYYoFUKEZ1xeAQheIq39TX1jE0TeQF56XVpGvxX09c0gL6iQZrq+B3O/TUe\nTo3CRfTV71DaFoMzMUhoteGqWe/O27JwaErF01b90ho0ccFY3GmvLUzm0YOI\nDG7EU+mrPqQYXF8EWT4zH7/UWQmn7uFeUgQDgrfLkaVyLWKZ6HzMbU9KQDHF\nrBEN\r\n=2m8z\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGCBK1K8KVrD86Rt7rBGS0ApllGjFK1jPPLUZ02WGEjTAiEAg93P8WnVqvJrg/qvjwhYJG8PdPiHcTYb/3J3+cC0UrE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.216_1620181074781_0.8181332589158594"},"_hasShrinkwrap":false},"0.0.1-nightly.217":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.217","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c212ae3c7a9b11d039c063c58001d245cf25996e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.217","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-DOFg+IEqWNe9KREXZAc6UztvCHaMdoxxmCCWpfJ7yoRhUgIigFIFf5q5JLJnvhy1cmPjKNCrXUudAf9PswT7bw==","shasum":"e7b026c1549f5abec98ba4c2d92671a40ffcfdf7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.217.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkg1ICRA9TVsSAnZWagAAOw0P/2bfJCz3k349/noiagYR\n2Qv6S4zHxvZjVO448T/6gprY2yQjstDDf1Qo8OiMCK9+xhXp4gdAP8xovXy0\nJGfBTKyZTGvB3cZ7BdUg2OSpjrxezg+SQLMgkdDsXRdiS0pn78a7PhongL0e\nwtshyxu+GldjIIW7UI99fyDO18Ohq/rArCV6NnLM3zhb/gRsgLzRmvrkTAUn\nr7RDESA0QOvX1GO5mnnGzQUvVp2vsquFurNvoyc3g5LShf5lQ11pjuSoz8ax\nmJtVR+Olucx2ru70ZW20aE+5/Pcm4biCwQyMqpsZan2HUFFQcDYfYXOCpMvW\nJt8BmuO9U+1ogauSIT4nl74vcINkKH4ZBsHP23e/rDJmx29lS3EZtm7PlxN5\ntFLQ5cAqq0+9bvd3LizadKEFscXw3U0i8uSqeqp90HyNXhNAAWdHbdRbNVzT\njUVO4G+QWgZANzPdN1b3rAKv+XRUF6lkpLGVZq+yPfyr8S5aUcvMiAE9WnnH\nI7A6VuW3jgnC9KCH+Fq3/wzM+0NW1MmcTMaGKrP3GRguZFpbDFfIr2hl6Ifl\nckjFvkoCWli2qkOaZlOoQtPqV4yWVUVcr4rIpZ3mnId3/WsS84ClcqPC5Dnn\nMocZaKnn/DbG3qxTw7YnUXyk51/dMbgssJIqjgd8X2Im9mllisYojPURdMyU\n5tcT\r\n=0e+/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDyt06/WTrPqYVW9RtWZ5cnBhQClRwOF4eDhsLxc5UyjQIgVHZNQggINBmE4jysuvxQ50EcdtXOZ10X65e0bcnqgEs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.217_1620184392083_0.4424510272575459"},"_hasShrinkwrap":false},"0.0.1-nightly.218":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.218","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6a53242d28252587ed3383262279fcf345a4693a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.218","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-0TEaQ2fXn1RjATQRMVmzXxAjzXP0CxYIr2MazVKgl26W6BiqKmk139ONTC6ZcrXonAInAuxZr0zroV9/PKcEUg==","shasum":"1b00d8b867eb48a637289d43ba0703a471b8b79b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.218.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkxl5CRA9TVsSAnZWagAA9EoQAJJCbNk3jZgZCh/dB6hK\n/cHBXp0+EVP5X+uTja32nHlCSi4zvBvF1R01vP15ynXvuGtf9nRmWxRYd5yy\nhZP5d2M78AryHLcENASDNEvmkV+JhQ+p+P5NTPO/nVcmmwAQRZHJ33D9CT1W\nan5RNwmU3WaJjkP+tK+J8vlwhiHr7H6hg0fK/4p7p1wa+uPO89LxNxx4l0eh\nrOXgFgUBM01stJswZ8xdej3aphyHZRXoGf1hObPan1M4qCkuPLAa/yukiYSw\nerFbnEagtwaMI4R8pRgQcTyv+YfoEqvGOHG1UHCbqlIe8fCZF8GzsdIaMgd0\nYGfUE1Vj9HFOGri4HWvVdrzVBePh10MGGETjqs3cR0q4KRRr9+/ogKMhhz90\nsZVESbppk3NJUAFgBJpiVFEXnjHLrOReNJqols5pQpf2xLPmel1oqw4fKFul\nY0EkiYeUdWAMsQhtgGPlewsShgG30tA9MbZcl5EqnIOwlFZADzZjSsqT2hF1\nNs9ZUAGpYR3XXsgy+o1U/bvuv7KCSpOCGLFcJH94NuUnZGDLGbmRSP0AfKbp\noQww80/9gweAgCyEeOGD2Og5Fn+Nq2E/3VEq47JzdaBkhsopv+GzW5UM4DeN\njOvvpZq3pAsAep086UGnw3OaE4DcPJk5qjvo6FGkcLw86rjkf10H7V5E6kcG\nAb2I\r\n=xhjL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCTTDfn67ey5gmIcwfj48cn9Xnef7hDaUy+dzdHun85PAIhAJ4dJWdasSYVHI1d3ul4XB8k26Itsg9IeFF+vkspqWY/"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.218_1620253048970_0.7372068483932213"},"_hasShrinkwrap":false},"0.0.1-nightly.219":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.219","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9fd3198f22fe3413556b9fc345919f8e9f60377c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.219","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-FCiKDbb7l8khdVdToAtmi2WTKVq/wJAp2Bt/hjuNmzPaSXj1LATdndWjFiv96isrnot6gwzTzo03PQ15t6iLFQ==","shasum":"30f7a35f0de9ac0fadd678092f4a0f70a3555129","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.219.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgkzOeCRA9TVsSAnZWagAA/ukP/0YhepW+mByhWGeTSoxa\nDorBf7x3lCwNC7amBgrymce+UmRx2ltxtbH8BhSB65mlzIAJiAgWO5W/3bHo\nyZ4TViZ8IILZiQbImw/YtQ67GUJ5hQUgtrwIfHnC48PILCL96IzYTDChcUKu\nLUg8s6PKWcSTLE2AWluvTukFyHcXSfeHFD4xUXLvSE/+nkRwTg7sfWBFHga3\nxmWrffGwYHTCeP5aaYSptj/isNs7PLeS8e7MOaPDxnL3lXt6MRNUqkHcOaiy\npvTZpKmJlr4qaMeoepTg8wHztTOVL8E1tEMabWfbo56Dbb07YQh/QHKTo1fa\nOwUjjgMtiBTE4zD4qQ9yRe19QBNgEfgku2dMeiaY4tpZSLBCZtFWxHWGzuYR\ndBWhn4tXubMk0j8yeZ/JYpgM6/SR6BTLySbiEA2h24fy5hcclmXyzGCo8wLR\n8tXs3Y9yEdl+0BswFk3myvBYisKoeWBB6XHemEk8cBQrZ42pVLNwCO654gL1\nLz7lyoY88Ab9BVqVGEywTFEaoxzs7qW750dimeu19rjpj2vu677l8KsWa+rL\nE20S0tSMPo6w8oj16TrFfbHbB+55uEuojmq86XUGKrceOOR4NfbaSGTPe93V\n5D3XCXmeRTD9vngqdjoveE4EGiUIiKKBh7sNj3CFNbvd6UKi2Gs7TP0RTUur\nZ822\r\n=62Bz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICZiMkVU15Aa1OhS3ib9Os/O4qA9qiB/9Q3Q4DUn4A6iAiEApRMe6Gnf5tFnG90/SZKAqG1eAWn7rz/YUu4aFEhcG4M="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.219_1620259741874_0.5762076404158887"},"_hasShrinkwrap":false},"0.0.1-nightly.220":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.220","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\nAuthor native [Flutter](https://flutter.dev/docs) experiences in Typescript and deliver updates directly to users over the air and out of band.  \n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n\n# What\nHydro provides a projection of Dart and Flutter into Typescript. Not everything Flutter provides has been projected yet. See https://hydro-sdk.github.io/hydro-sdk/  \nHydro compiles your code into a bytecode chunk which can be easily packed into an existing Flutter app or loaded over the network.\n\n## What About Performance?\nWhile your code is interpreted, ensuring it will work on all platforms that Flutter will, most of the heavy lifting is done in Dart code by Flutter itself. You don't need to sacrifice FPS or portability for quick iteration. See \"Advanced Uses\" below for documentation about compiling directly from Typescript to Dart for maximum performance.\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Source Maps\n![Source maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n- [Why](#why)  \n- [How](#how)  \n- [Examples](#examples)\n- [Getting Started](#getting-started)\n- [Advanced Uses](#advanced-uses)\n- [Edge Cases and Errors at Compile Time](#edge-cases-and-errors-at-compile-time)\n- [Edge Cases and Errors at Runtime](#edge-cases-and-errors-at-runtime)\n- [Limitations](#limitations)\n- [Supported Languages](#supported-languages)\n- [Prior Art](#prior-art)\n- [Interesting Links and Resources](#interesting-links-and-resources)\n\n# Why\n## Easier Delivery\nServe complete experiences over HTTP. Deliver updates to parts of your app, or deliver your entire app as a packaged bytecode image over the air to users. No app stores or long reviews.\n\n# How\nHydo-SDK provides a Common Flutter Runtime (CFR), composed of a virtual machine implementing a subset of a Lua 5.2 environment, bindings for Flutter, Dart, some Javascript builtins, and a set of Flutter widgets exposing it all to embedders. All written in pure Dart. Hydro-SDK combines the CFR with guest language projections and a compilation toolchain for compiling supported languages into Lua bytecode, and Lua bytecode into Dart.\n\n# Examples\n\n## https://github.com/hydro-sdk/counter-app\nObligatory Flutter counter app.\n\n# Getting Started\nCheck out the example project at https://github.com/hydro-sdk/counter-app for documentation about getting started\n\n# Current Development\nCurrent development is focused on a closed-source package registry to host over-the-air update packages built using the open-source Hydro-SDK.\n\n# Advanced Uses\n## Transpile Typescript to Dart, Run Code in Mixed Mode With Mixed Native and Virtual (bytecode) Functions\nHydro includes a CLI utility under `bin` to compile `.hc` bytecode files into Dart code. The resulting Dart code exports a single variable called `thunks` which can be passed to any Dart-level Hydro widget, allowing the CFR's code-loader to swap out virtual functions with their native counterparts at run time. This effectively provides a Typescript -> Dart transpiler. The ouput doesn't look very similiar to the input Typescript, but is semantically equivalent. This can be leveraged for applications which rely on many separate `.hc` files at runtime, or to help keep the edit-debug experience for large `.hc` files fast and responsive.\n\n# Edge-Cases and Errors at Compile Time\n## `method-name and other-method-name Defined at some-file:line,column (x,y) and some-other-file:other-line,other-column (a,b) both mangled to the following: big-hashed-name`\nIn debug mode, the compiler tracks the identity of functions across different compiles by mangling function names. This information is passed on to (and required by) the CFR's virtual machine in debug mode in order to enable hot-reload. The above error is a santiy check performed by the compiler during compilation to ensure it hasn't accidentally assigned the same identity to two functions that it knows are not the same. This is NOT an error with your code. If you encounter this, please file an issue so we can make the compiler smarter.\n\n# Edge-Cases and Errors at Runtime\n## `Dispatched function prototypes are required to have debug symbols but the prototype from x-y in big-hashed-name could not be matched to a debug symbol`\nIn debug mode, the CFR's virtual machine needs code being called into from the Flutter framework as part of Flutter's normal widget lifecycle to have debugging information attached to it in order to provide hot reload. This error can usually be observed being raised when trying to execute `build` methods in Typescript classes which extend `StatelessWidget` or `State`. This is NOT an error with your code. This usually means the compiler wasn't quite smart enough to find all of the anonymous functions/tear offs you're using in your `build` methods and report them to the VM for debugging and hot-reload. If you encounter this, please file an issue so we can make the compiler smarter.\n\n## `Failed to dispatch to big-hashed-method-name from x-y in big-hashed-name`\nIn debug mode, the CFR's virtual machine will enforce that all code being called into from the Flutter framework as part of Flutter's normal widget lifecycle is looked up just in time before it's executed. If the virtual machine fails to lookup a function that is being called, this error will be thrown. This error can be observed when running code that is in the middle of attempting to call code that has just been deleted as part of a hot-reload.\n\n## `attempt to index a nil value null foo`\nThis error can be seen by regular Typescript code that attempts to access a field `foo` on an uninitialized object. If this error is observed originating in `hydro-sdk/runtime` Typescript code, after a hot-reload is performed, it may indicate a limitation of hot-reload. In debug mode, functions have their enclosing scopes refreshed before they are executed. This error can sometimes be caused by adding an `import` statement for a file which has never been imported before anywhere in the life of the currently running program. In this case, the code being executed is having it's enclosing scope refreshed to include the new symbols being `import`ed, but the `import`ed file itself is not being executed in order to initialise the new symbols being used, resulting in trying to index into `nil` values. This issue can be remedied by performing a hot-restart of the Dart code running the CFR virtual machine. This error does NOT necessarily indicate an error with your code.\n\n# Limitations\n- General\n    - ~~Flutter, and some of it's most popular third party packages (Like `Provider` and `ScopedModel`) rely on a lot of widget tree walking with RTTI to identify ancestors. The interface between guest code -> host code is a natural type-erasure barrier. This could be overcome to some degree if Dart supported generic constructors.~~\n    - ~~Most patterns that look like `Widget<OtherWidget>` aren't possible to express in guest code~~\n    - ~~Stateful hot-reload of guest code works with some limits. Incoming code with a higher number of function prototypes than what is currently running, or incoming code which would force a relocation of a running function prototype to a much higher source mapping will cause an abort and full restart.~~\n    - Incoming code built in release mode will cause a full restart.\n    - ~~It's not yet possible to pass arguments at startup from Dart -> guest code~~\n- Typescript\n    - The compiler toolchain needs to control `tsconfig` options in order to control compilation for different build profiles. `strict` is always turned on by default.\n    - No `async` or `await`. Though, asynchronous programming is possible using a projection of Dart's `Future` class. \n    - No `yield` or generators\n    - We make best efforts to create an environment where APIs written for Dart's nominal, reified type system feel natural being consumed from Typescript's structural, erased type system. In some cases, this involves passing extra parameters into an API which in Dart would have expected only a type parameter. This is most used in widget tree walking APIs like `ScopedModel`.\n    An example from the `PokeApp` example:\n    ```typescript  \n    public build(context: BuildContext) \n    {\n        const pokeHubService = ScopedModel.of<PokeHubService>(context, PokeHubService.staticType);\n        ...\n    ```\n    Our port of `ScopedModel` can be found here https://github.com/chgibb/hydro-sdk/tree/master/runtime/scopedModel\n    Full `PokeApp` example here https://github.com/chgibb/hydro-sdk/tree/master/examples/pokeApp  \n\n    - The current compiler toolchain is really bad at tree-shaking. For example,\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/sizedBox/index\"\n     ``` \n     will be more efficient than\n     ```typescript\n    import {SizedBox} from \"hydro-sdk/runtime/flutter/widgets/index\"\n     ```\n     and\n     ```typescript\n     import {SizedBox} from \"hydro-sdk/runtime/flutter/index\"\n     ```\n     - The compiler is built on https://github.com/TypeScriptToLua/TypeScriptToLua . We inherit the same limitations https://typescripttolua.github.io/docs/caveats\n\n# Supported Languages  \n- [&check;] Typescript  \n        https://github.com/TypeScriptToLua/TypeScriptToLua  \n- [ ] C#  \n        https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c9c297cdf880a739323beba916e26a2f24f3c7f8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.220","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-VUvnS35uW9NSsbNSJFEbGn+apZt3tNcUAXhKlhT3ocbTWcfig2DYHHQloyq9K6JYTiif4J2V6liDIL1kButekA==","shasum":"689c91770e7983182d629e13f49ca3e6e82e60b5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.220.tgz","fileCount":516,"unpackedSize":2232101,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglJ0ACRA9TVsSAnZWagAABeMQAIQSc4lQYC8GAwthoNS1\ngS8xQ4fGAsvyUpGwQWC7NzB1ovirumMs9MMqsUeLQNaC7WfUWUo69upECy9W\nYv4T9zK7+cKueGfJizdwFO2jQZExB379XuU0AvZhu2A0UNnPNSCfXcCtvrXF\nJ1L8ro65uQknFi7XDV7N1jG3yYNcIhE5Y76Iw3+zBzjULLi1BNa4KskjtuWI\nMEGP9vIx1YeiGgOx79DaNqU5MLDrWvSK1On38++/okZ/a2DxN8tkTjj0Ex6z\nFhaqn519TeoLLP+0uRKENGqFC5ku0f0gmpLCzokhaiDVAH5HH716SVx67NyA\nIhzG9QXbbjprSA8EsnrFOnLsjyeD8O7j3IhqTMUh8Dgi6HD3zdQb4zpKHoxu\nfcWKdLlC1w2O2tp6OzwI/PE0djftjrwSOvl34tHy7fKdYvJcicMvGZdpEAlf\nowp/c2d9rr+mzZaLn4urV509TQXQv7NyMDzoQEw+j2HlLK3lPnOSR85DyTch\nfQohIBFbz/H4aixVPSjC51pMUuc8DWzJKHO3ArpbbMTYExjuTjCnG9G56Iox\njM+8fCihoRiX4Z0yc0S1/Vy27E5BgZqKMf0aIojKTcAGQ/VynlmV8o/qbnBV\n39fzpnudsC9gquYlb8OZC78gEI7yJOT9w8CcmWUAXxz1be1O3GffRdPVrLMY\nfvCR\r\n=TIRf\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC+yeWgRaYC8G4bzf2CcnpR5smp+TUsaczVdE3SrIbjQAiAnLedqVkILobpWFfgDyo0OMB++rnK4dzEECI1ZhSP0Lw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.220_1620352255896_0.19897768879129973"},"_hasShrinkwrap":false},"0.0.1-nightly.221":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.221","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n### Lanuage Support\n#### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n#### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7138e3b33466e1f1adbabcf44e9f407848b6994a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.221","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-ES0uHqIjn7PSPo2a/vcY6uml8RwOhkzZUpaFr0AS7BeQUV6rfF+i3AOMlPoawdL1YJKWtCVTNrV6ox0pnOU/Bw==","shasum":"5d9c4bb1f180dce54ddf97501bf85358e3d79b1a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.221.tgz","fileCount":516,"unpackedSize":2223921,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglKrzCRA9TVsSAnZWagAAV9oP/jFq8AflM9PLkXX3X2pp\nVC++DtYUrxTIuO0qv0gRtXXyNGusKRd1XXRgLocSAFhXyUJd5WFE0uUHVBZ5\n0c3oD5nxe4yzE8ToaOxW4FZbrlx0fX565Cb4hCnryiwTs9wBNoNeOt67aD/o\n2cIv4mPpozQzgXhQEzNldtym+CrfseKVNpqcxhPJvY5BanMd9xd9Otv4clhk\nzprcqMZfk6eRxBvHDQrEB3sh3fEywVNyufiDkzt7Y/Mbf1OYXF6sRezynFtO\nbmsZc3JKYERoIEjcH4r2NOilrW9w/qPL3RtifQiI7sR0Pas4Qp0w7q679p1Z\nenSC1bBTDeTguPqpguMEhLsz43cOAc/BkLPkyyP8Td6pYqIqPExo0Uq0A2jN\nEdmoxts3cQ08JfYyDq44yfcmkSjwmhme1x0hPMT4r+0Y+6G8s8mCWZULVHja\n6DGHCBEFYUYt3RiLGmF1Gk6rsnIg67IYrzJlydUbTMnYCWGSem7aAP7b/jwN\nMLlpk7p7NMsrxX8IR8reJn+GCwtjUvxKa2AaIKBgeKRjpSnRMc1dU0ezCt26\n2hlDDF1Wn2Ty8vsm0eIS+8XdsswzylEP4KQo/W/EHIqb4vto3NZlLJEtHZ2y\nBojf3nAPH1tp48AeR8VGYePztBQiUhChRtIXL4n39ReQtBgOrBA9o7VNwQdJ\n8vVX\r\n=vWYu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDULM6ylIeetPgI+sJB2g+QFfRRkg60DncDRphhOGCmRAiAwUPxcO3yHc55CV8MGtHipjBnprxATX3c6kF0r4aippg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.221_1620355826803_0.04695469736687197"},"_hasShrinkwrap":false},"0.0.1-nightly.222":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.222","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dc28cea9efe616272486ff4cc57a0a7394c1efbc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.222","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-p+2hStJIhxIKPYl9Y0DaS4HzS17RySZHoGTPGy2GUArdcgbaz5wLXyRw64PK1Bh9SDjWBzT/ySzxc5zGMxJctA==","shasum":"de2109f04fb4d0cf25f24fe662f1b9a5969bb530","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.222.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglNQhCRA9TVsSAnZWagAAe5kP/iKUdijfn4QizAF5M8JD\n8ZvgIjUdBW965oPf2JN9pWu3T74dRSNZfMJE1sJU7njMrpv0UxNjxgHAqKJD\ntxXv4YBBztnR+iiMBDLEtDKhEVpiLzkyk0qhaWdQa+/tp56qCr+eivCEBDrP\n1AFU9Y50rduIlQyMRua/Tw5r2WA9lx56mICUJlZIc/aXuboccJQ2/kbCPybz\n9rM5PJZ/3Z2mN/xKIFHk3rXKK4usIjoMYyTq24cSY1sfGU6Abg9fFGKZ4HTp\nPq52NtKJwNzIN7b0KNi/2WA0cnoZAKlv2dSooDPlkfuwmV2DMO+GmS+g0hcG\nMmdhKquE9i9FKl8I1nuMiTsr86+5dqeqEFtrvyVpCMLrjAAHyLBsF8OXU5fi\noA94VVjRilSy9pwx+ANptd3XhVa94stqFcH2E3QeusYzR8/d/tevEvDedHSU\n2xvI+OCBzbCkdG25s7TT8N5IjG/BV4Ql1yFIO7nBcYArEwrClm1jAjRxf+3i\n8F7TuDWGDj/u6fmbmG6jwfXyo/iEgyYt53hsZ0NxJ00XBEaJLS27wj4a5GlV\nN8dcZ2Jdh2fRbGTJ0V+7DDu0IGLb9fpF3OfMdHOWAwv+WZsqcNeWxpRdwlEJ\nUTCqpm2K/REN32y8QktVBq62Nf7MTbkQxGEXPwsG2x7OkPiyW2pr0LhWXtWk\nREUB\r\n=xirD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCq3YKBRIIHXjsGOuYxbJbAq9wsbn62u58GMWK6Rbl4gwIgJTJECXb9gn7oDsgzCW6I3SzXHF3cIXl1B54RI1NHVZk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.222_1620366369429_0.8656119272789082"},"_hasShrinkwrap":false},"0.0.1-nightly.223":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.223","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1367d61515c5a6144259a1523dd9dba858fffae4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.223","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-XHR0SmHthz4MG06VBYxE3P5Y6WHi75K0Hx7XX3mai0fYEv0w/r0iNjLaz/E8JehOLWiN6TvtlGK3+/BeaFuFlQ==","shasum":"53935f8b1e852585df03864296d968940ab98c19","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.223.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglqFVCRA9TVsSAnZWagAA7mAP/1uF8tZGo0lPtAQvfouu\nb6/tzLncgr+9zZEND/r7hQTquW0sGWXKKshyPCUM8X1YrNx73Gqkk3kwAewk\nZR7awhFdvq+NBaedD59lfIX5Q1s7HVUugiY2dB1p1sxCVf/fb/ztg6a0ud2q\nVNm6bivpDa5NvG5AMCaMgMTia2H33LqrArRfc8yNeRw6BhdzwFrsviksCy8Y\nwcwqzQyjjRi+1GOrAhEpQGyhXYzjLLQ8dTnaRWVleNp5CvkoGVv9JgH6oAqn\nePHhgYxp4bkEKEU0tPtqAtIUpEq/1nSD5IuL0qkt9dUFJEYspOKS0nzRiAhF\nFD0bI1lOZOdS8x/o2ZXp8ZL3PF+nkpBlUALPbMl5hwZa+M5Ah+e38dVKalyu\nxh/wdHCTZjWh9G1aSLuLplV/Jm6NGyIvHktT6TB+NCvCVh9tQR84IdvT1WPF\nzL4AwyUIC/dsnuFrb+wU5kGWUE/kYwrQpBi6aQ2B3tK9Dlfa+viM2+K0+chP\nmFBivH/fFYp3oD33YJSEs09Hm26sUm3kN8/VRRgeSSHZxz20zrDPL/M8xoej\nP7mSQEKILpNZKn2/iVhZFUxvYnpI1hwagHFh9knarrxoI4j653QUSpNwIdBO\nMPh2CpooV7JsNgnwysbNP56HgItgSXMLtSoQ0upL5ixVLhHlUCGMRe3w/MhY\nw07z\r\n=HTrU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4gB+2TNVA/jVH0/30y0/MMuAkB5/EFcX0xFpR+QLsSAIhAOzqMvsjapLdyCwYOwOrJOrr5RcQDcaPBRfoAEDGhGtq"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.223_1620484436398_0.8323791124804623"},"_hasShrinkwrap":false},"0.0.1-nightly.224":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.224","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6b09dc4c7586c59531d433e1bf62d8a20d2090c9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.224","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-jQFZ9rNQrrF/cNbBbOa5j5AX7RaWVHIJOWUhdLJ6f0SvrfpbIJirRNoXnTybtaHSTN/u+RIrl06GhIFzOLZLaA==","shasum":"1731fc65d2d8bdd37269a72c2643c30e4f690aea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.224.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgltGGCRA9TVsSAnZWagAAjHkP/2dvCeBaWOEfqMzEWXWa\ntuW+xCWthcGkUerYjpOPRWy+ZRhVDwdKxMM7jAqmE7kklv2NmyNJyiTb68ZE\nxWHMLcg/FXZIUdyl1wp+WBHyV3m6JOX8KWpzc4xokOPiZg4wdek5iIa2cNct\nUPcCcyrlIFKhri8B8PYU2bjN9bde/oz6IgvAlPmWr0TdtVqiX5nI8puy3hSt\n8THlNjhnKx+0qDAdMQntd3a3CIthUf6W+x6hkrz7nHnQpznwFAd1W8/m+iM0\nbhHckxq0kKjddlDbBWn2oQv2TGgcTlAm8igWP8jxnhmMM+BB8ma3IlZkf41N\nq3ldfNpuElqVqyxyoVoFbRRzZoVavwZOjrf8+tPEAm5pTWXGyjClvj1+bqup\ngzcBfs1EOO6Et/p/DXCI43I5QJE89/tqgfb09JCEHaIuqRc/ZZsLuisVTQ31\nIjS9cydBiU8YgwaoNPkZXWnh9c0oY1nPNJNSfqh8pEudHgKuJeyp8afFWDV9\n0747O1oTGmT83/JO+IJr8185QTX9Jp59cbobZwqxDSzWg4FIJLbcgz99iStv\nTeDtdV3vpVgmmEgsRAT1hAn2ZeAQluz0Pt+ssz0/TkMokv+AAKOG/L9+LjWV\n4Fu56T8W+fHoscttG3jDQ+LYcmoCxz0gLkv2pnN9dog7kWRlPdGj4UQwk5In\nMTGd\r\n=AWdU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDEBUkGgyCjEq0oZCb/l1tCF2SKVd2JbhBqY2xy9CC+zAiEAqFTGgAUpSf+KelCXt052GBuYj0CHDFqV3umqkwYWBTA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.224_1620496774102_0.6797528780261428"},"_hasShrinkwrap":false},"0.0.1-nightly.225":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.225","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"08c1844bdbc254be73c63afea0bed35e85a4ed9c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.225","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-Z0K0bPCe8JIShFMeIYoXEYZGu1Lu3LZ9FQ4LsC9KWmBsoSADGnrwaVjoFfze4Wkktg8dOqioGDIxJeC+ArS8qA==","shasum":"3dcdc071d191b5549d75e3dd4ada2257265832fb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.225.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJglvweCRA9TVsSAnZWagAA0eMP/0TOlneVqtsjAOeoyPtR\nBImlyWc0u8+Ex3mJdn3nVJ1uwCYXtaR5DgDa8eSSdvrxh5eq8cdQxgorSC9C\nlcnHYicnClkkaWyoIpAKwXwZ4EtsNobLzFv0lZFHDz276O4bL+hygVFvqaRj\ngPyBMqBhBldbdlkKZiB8luMoBQChqHj69xLm2yWy2wYuItyHcpCq5kkzQjuO\nh6mHW8nYPfTXMoOtoN7BvD/5bELTNXZAcunMOQdv8jl0OahkZlxhyFjzO2K5\n9kPbF9UeYhX971X4sKxBXbRvv4gy/Tqftcnhk+3PPaJTbiKOsQhGnZ1N1qC4\nZ2IQvsDXl5rP7NJqo0crKaljTN31/ygWsGRZLzyHt3wA2C5MoCpxjVNeU/Ni\nSojpbqfIgHKKSkjAgb8cdGNosGcQFU6RnEqO9N2GmIDGgzCumEgeYrR5A5qL\nG96s9jH/kpuApITv0COnVaiPeRO83lebkvk2BHvYRyGjq5I5HAwe4Y8sPvoS\nXKJV3gaSO0qmeNMhT8JkG/KaeKm9E48wNfCE3Bl4iIAcRUvwqu0BZpxnbIm5\nNomMJ0Q1/muFvfNDSNdYhV366MmRB/dLRWmhrsmfkEZcb4/P5h3XsXnt6QjX\namPT8mi9d1IfZjFcn0t9+2diUCyWzkcOjCB+IAlSsy7znwpfWdx1sbIFnzSZ\nwTil\r\n=0AsW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCds/h07NUz40ZcXoSU+d4YckIIGjOClxWHfeuNDU4f9QIhAK+WZSSSrChTvT2zkmAgcbyJJlcSL06x038OcDw8bYvt"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.225_1620507677030_0.48884817513224377"},"_hasShrinkwrap":false},"0.0.1-nightly.226":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.226","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5c52c7f3c20b0f6fb77eed626af76a6468b538e6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.226","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-MaY9Esfxp5fkdsYvtNggLifL1DzDP2FEsFx6FutsFoth59WqYHDBd6Qag+DhWkWZKtFkg7VidE+nFehX2VphJA==","shasum":"6c050d7c662632f11936464259476022cbf0f5cd","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.226.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmIseCRA9TVsSAnZWagAA3k0P/1Hdc1pazW1hzqwJDZ92\nb3fUFrRkPGSpb/geQqJDYY1Zuudue7qXShP5MP8w91Bfocr015N+D0k0LIZb\ngF1DmIfoAscvLP8ii2wbAiaHWB7MnjWvrK44Xuc33cozMxe5ZXro6aM3iU8g\nXVpIbHw27KQcMkBEgWOtB5Aud+Rz67Bdw9WfgTP8DSILIKQkYX3yDIO9hE2F\nH8x6WFsV7HeKZx2tjI/eJvUnjhkxKkCZ3XvM1KY2Ip1Z9sYjcRqrMPA3Nobc\niFfqttu5Asnunmj00aIlFfOw+1kaV7ckfwedCS/htpO2qRL0549evgZe3mnc\n6Pb3Sfgctx3iEt/9ZtbKv4ZYtmOA3quASIkLgxatYPc1WiSABVpJnqDvjrD+\nrq2ZnCyuNB7Z66jsYGaqHUOYDTEa9j/BTks9OGGBJexFcweOSxxkTKNgTIor\nk5A8IN7aZ3VCiGRZz4GI9jNZ8Wkip7kbs9xhcU9ezIdjMekXe3exzN6BQx95\nQGJPrKrl0l2IBRirRK0o/FaK9Iv5QRzNDt+Ws9GorQbrzWz1srA4ok0Wb2FW\n1nFkvWBSZJ23MsFx/Gk3UdI0boOxebO1rzlZojw+68Cbulie60LnZ1nK8OY4\nLJUfjY7R515XoNim59NYBN97Jg7JQq+s9Sop2JRfMoNZ7VMfS0KttOm1W86y\nnPfh\r\n=0l1s\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDXD1tMyIiUL9cgPCjnkLH2GEVZZrJNVpHIgdaKoZrjGQIhALNYXGPI6v4hxdKIjnrgmFU0SFHRdLcEuZW0SiOZYh+5"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.226_1620609821519_0.31335065419269004"},"_hasShrinkwrap":false},"0.0.1-nightly.227":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.227","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dfad344958baf73df030777cbea14cf2e5954169","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.227","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-e6iPSU8NiWfgT7KKvnCwTWmynSeViog52daRpFaZ83nvhk6p+LhUAvY4h+yaLPJo+PbopOPavk7aAIylubuPtw==","shasum":"d0cc04b1f1598c3bb5ad57c7f906d8ad5600f4b1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.227.tgz","fileCount":516,"unpackedSize":2223919,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmR9FCRA9TVsSAnZWagAAIGkP/20hBEQQf2/+9ntAsnfA\nsG9AJx+gf78hoLCzTS4guetcRnKxYf8oXNFYJiPUeWQDBEKrBBmMXKKc/HSA\niCdug+7WwHvO8hAb1XV7PzxG21gyBiiUPpuHaeGvhnH6BwATosQcs+BgFGx6\nezojRuzEfOsNS/YgquAdjYvHUtxPET42aKg5z8oLEPCjrvTS8F2P9WA1mxV3\n6A9610meh0GXDUxDZyxfuuGhCFyT8B/Kj/o5BpnRuKYjpX2LoF9BHAmHuZ78\nEc2ojwF0bA7AS0LaDMa8s3e8u2977+76kMvdqBkRUIVBUEHny/pba1MV8N4m\nJiHr5/RyP4CFl01KMbenIYNzsFObspuGoqnw7dJnScB2MiZ02kdcWkj8tu9v\nYkK43VMT/S9hyiMdSNFlk7hjh4cLONbbSejtGl1nEbQ9et5mU/h8Yf/edT/z\n4PZ10p2g6b7MdjH2zpBUC49OxqyYJLKomnXV8lu67N/AteVwI1dTGq85oICi\nFV6ZhDmlt6BRzVXfPRSuEZ+i7qNvv5TP7/tam3+viJQvzH1stp2f9FfZaTOA\nz5Ea0NMUV22qNZnHMKfpCy5vHFVUZ0r/RIHHgfYmzV2Aj8UTTAQ+FlcYeDGe\nVuPsKns14NJs0nhNaqPJ3xkkfFjfT/0nOs1CnIvfnQl30bHk51M30NLYtE5D\n8bRr\r\n=gUzE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCdMRpfjmDbTTvdK6IF1LDC6flBZJgOzT42S2EauKzrGQIhANE2BkF24krJyQdiDFqbqEOPflRpBzjnH8Y3Agyx+PTn"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.227_1620647749307_0.8326441350618161"},"_hasShrinkwrap":false},"0.0.1-nightly.228":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.228","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.0","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b7403b9341115062d200ec3ce4386d4dd9238ef2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.228","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-cP3UF2nI3lJZvnyd11YIRJCPNZ2Rf4kW3ETjaEvfaHbt0iRLe0UWI3ztI7sJi8rIV3dAfQC0iA3K7t+gfz/Yww==","shasum":"fc0f59a8c579981c28c385be0424c44d59e250b3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.228.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmaMmCRA9TVsSAnZWagAAa3cP/1NUD+s7PzlKFBSIwQ5f\nhuZO3RRTArpg9NDc7qZqrsSbfGUp76NoLv1MH2OvUcHkImLRyc1Ke57lJHhg\nO2gyayPABRUYr92DJMOJn4WG7SR8oPE3/3xMbAoardY+FYMcO9/Hpt6SCZGC\nCjEcBxmYAUWC1WLN8i+z5laiPIekrPY5WJG3vfmcV6UA6nKQgF2G8GCAOxRs\nBhO1lLS/mxBtyVk+x+fKSeo4r0eQzhdclJwVS3VascWfCEhbQh7uZLSnD1G8\nW1PcOBzF01jcVh9LPzMkLeYyNy8rgQxNOBtzuasbC83pcSjv+112VDhgwxxl\nA/QbBdWJxeUZ+UKkoTE7l32KD+bVhH6C2tHxWUfGAr5VbbTEDai4Vfc+4ymF\nstQdP4oWRj2mzIkMMBImtV7UMzUpjupfA+CslGfbi4hl3BW0vlwgqNkGSzyM\nYLkrZOc6bGGNgPyeWtRPYoQBfi2/Kj0xzDYvBiBQPHHllxn49Lv7H1uYnmPf\nHq17EgFZGmqFVVpUzIUGlEf9eRDmMGLnqHpZe6BHEBUVCCjuT+9/vqh6bJlt\n9BXUYZc0eSWR4zz35Ifwuyw8N/pnaY64dGK/UkEc8jUWOxepx69kk7ds5yLi\nvHOXVqz2ALuTDFPYLl0swHI/MJAAVgYsH3BopoB4NcFO4bLMsqDfMSViLb1L\nQ8GH\r\n=Qypv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAHsrFbRaO2SDIQ2SmGzdTvCRu1eqzhyspsxZJ3yao7aAiEAgDfG63SY6BT+bUUEgj9v8nookcdVJAB80GLx8PB1gds="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.228_1620681509670_0.3986936503829479"},"_hasShrinkwrap":false},"0.0.1-nightly.229":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.229","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5f9333c58f2ba56dd3038bbb4c653d4c6286685b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.229","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-blYENPsnQmGW1dyyLTHhusxcUqUujfjNd9jLpshLULbuUtC8IS9kHblraaLmFFLSwXSe3dcl7cip0yKLjcdXQg==","shasum":"b691ab2889de41080d96e4833f950d7f280b1a11","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.229.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgmvOLCRA9TVsSAnZWagAAczAP/0TfPt0Rvjd7uMHHUTAc\njmhMgxoPyI4xIXGeRECA8XgnYqMvoPjlJcaf/3Wt/Zp7gb/sDrcIKjpDCc2Q\nn5oCw2PYuR1oqOXwYBb/qZTw9ASn0ukK4rWA3qFRhHwJH9dL4kThBull1/N0\n8atYOOgERtQlvEyHgT/e5sMtuTMKEkrX/k4SQWcyYQUFqw0AkGdxOlpTYy+h\n8pfu8SYzArEVm+VqApS/jPwpo1lLFiOjkCBb0iiKqmdlADQZOWLT6x4x920B\nHN+q1OP4S1E2cQA/X7mXE/YKVsMoKTN7pFNS376fPcquB6nLTHhmSTPmOkxD\ntgjHHfYS3Ghe6pbp2K0NtlaPoaFaticWvkUzcrcC5t2NUxZZDzXlSJbHjh1s\nGFW7Kw6i2S+rXIRyEG0ESwNtwywT0lFRZu2+3wIzYZhqdCCYnhRW2fiTa4Q1\ncAIPTX5NeQFaArbn4h0Yxc+8DhPIPjfnt2FJ1FVm7uLTv3AGPW+kl+M1s4BF\n5El+iOn3N5tX6BFZdC9/qxBf8YMDH3gzkLU7uoScpR668Rv19k4bno4w3dUJ\n1VJ5B9y2tEKYFYbKCLGvfqiilYcnu4Vp4yRh3WFRavl6+/D56AKwto0hEDCm\nhHmfagEaHwj4BlMd7Srd3Eg7puyaVacUZMALlj6thdhtgnd4GfuuVg0uzfLu\nC90U\r\n=Jx9+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3MukM82gunK+wolhq3PhymgiWka7OIf7te8igu/eXzAIhALCbly8qlAZrUIVwc96LxJ5ckqxJoU6nwK0EqDLT2Rig"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.229_1620767626717_0.03185916494396035"},"_hasShrinkwrap":false},"0.0.1-nightly.230":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.230","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f95afbf6736e326dd4ce7f56e551ef09198f9da8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.230","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-MOwjiLFavUVxkQjsHrXoCYUEPNXr7U9AojwoRw7Iupu9VpMYnYczQtAqWvt/UI5hD+su+SoYpQJ/c3sn1e08wA==","shasum":"3da4bbc8d4a3a0f0d19b52b2a69cbe5109eee47a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.230.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgnb40CRA9TVsSAnZWagAA1vQQAJmDLjmeQzeGtiYxHud5\nI+e/U6QHb/SIqBMt6zjFC5a28uPw+nn0a8ToJTFCdEP8Tj6JCkwln2A9e5Og\nrYec2sJJW7lGJHXQnYSsOjv1DTA87XAXKPeftZm0Sh2ZqnxM9n2IQyJnGSlD\nj/yQiTLbTnL1yEgTZn1JD3kYfn5+M0JM05rftn6CUK6GRorcsC5uiwy9CO9K\nzmJf5SA4oAC/UQYs3AqwAzZMoN/7r53SYC98iviEpi4BqdLSibBAv3Uv9Oll\nP1HGdBuaHYcp5OQDsLQYuk9XE0ttMCOI94yzXJnAfnJt5Sa6j9ve1bkVLw5d\nwERIHApfRcNcHLV69piF2opibU6HjnzV1MXwQlgmeCf5UJ0pBcufXvZlFYZM\nUKkORl5frS49KFb81TwvaT8y3cqbelqBnPWEg0/q6DWdMX06+A7vibyj/wJm\n8s0bfiAUbyWjMi5aQJJU8OyCN+Z/80OUboA9emMx+h9V424K2jATmXrPRBw6\n/LG/rYPY+A4+c8Q7teIQDmncnkIxnKLsQsh45yiH8a4aLnDwCseO2wJLCh8b\nqZrJe+mnAQO4wu2lF451QxmXupCznFqGeroTzPFRfrq2tOCP/8waORenFteu\nhRvnt8C7QVyZopbhRn369FG56wuLgSHA0MR8Prl6FIMoVFTyisZLGoEW4kop\nie0c\r\n=wqJn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcpWheXPrBJwjlWr64Rx2vZ8Vp0YdNphfS8u4U0MCVzgIhAKOkwYQ/2g8O8vLt6Lp0dtmLZoC65tZipwswyG9KJQxl"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.230_1620950579572_0.8905798424106139"},"_hasShrinkwrap":false},"0.0.1-nightly.231":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.231","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ef56375e103352e58d245d313b5e86327ec3ee52","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.231","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-SVexJhBJRttNNHc/tGAb2teOtDjxM2tqWyQnaokbgHeXn0qULG7HQoT+Z2lGYmWciwwNLVxii9d0CDGyPVObsg==","shasum":"4552514b80c7276042eaf8dc66bdd07332af822c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.231.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgoWfpCRA9TVsSAnZWagAA2f8QAI0YXsfp1TD/amDhpp3u\nGSLFCFOvTbq2yD4ZrnRDowiK3etQhKRczPqaIasHcvXjCgqwSwEejOukqaqc\nWxKCnWsRvmn/MKrMS8K/o/MvLA6lyl3bM+5HuInAySfHNiU3GxJeD8Tr1dQt\nV7N1OV9J2rK0fnUfYCL4MHbAlZkUnrfiw2+n+JjY7mTVfUSjT/wAWUHl3DHT\nqxkfljqrGaTKkkX8EKblH/PzsgP4YZfEy7iBLgs9rVoFIrK/GPs0L8wcQYiO\nLuygZwihuCVjL+jNaWuh++2GvFPgVeHafsTGim/tk/gsEBx4Y7SQlKOL2M/d\nB0qGrk1tDWXmS+YubcBQ29DM/5WWq/r/gu1BzQ9SU5ug8AbFA6AxtSO2JlfD\nMe1/jp21eun+4kHxKw0x20XewW9KMkpBTrYryRw9A9TtlfXBSuFKsiAdbhWS\nbQdaM7bMbh1D/91kCYzMhQ/n5mFCNYxUh11TKijcQ6x62XjR6N3HaKNGaPoF\nY44N0gbPSd4IPw0vHnMWB82HGUhl+prVfDA9DxRC/Gcsj35qpmxEtkXqT9sf\nx9ADAS2RV6fOD9GQwXbkRX9zQCPHmZCV+2sl49TndvEsqcOjMbytSZsy3Nfe\nneCPowFtlZTC9QsN983hfCMpCTB41Z0ef1vWQ4SIVeokKbw3gh/TC81Pv8Ly\nTcfM\r\n=aUy9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDxO5nhiX29etn1aALf6xmeJOlqGB8pm76cpkc+blXY7QIgVIGGdRaOkdPwGDMFFJZMR2GbVwaSE4Url1fUgivdYBQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.231_1621190633008_0.5885918035856008"},"_hasShrinkwrap":false},"0.0.1-nightly.232":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.232","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"af81bea20d0725d9012dbc41e23abf178a37a85a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.232","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-1UIe6KnxnFblqyhq4Qd0jdqcbFkxUCleRLxGLC+cNYiIdAsD5Li6a8yaJyiOcuqjp1d/DDfOQ/I/ZJPjAF9fbA==","shasum":"6d750fb816713068ffc9214fef0b776ed4ffab17","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.232.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpGI7CRA9TVsSAnZWagAAVFgP/1AIyEkiqvFyWXrxhUrA\nxp7Y2VbGirpiTz65fmhmrRqOTqVTeFzFGjvIApfYCkYy6fS+G4GTJSuM6neY\n/iBgP3PDdj+JRfWgt1vwCjlO1gzEOli2Ptf+x/F2Hoam6xkRuW1WtHpGC1up\nCMV9z+B3hXFYbwODhl8xxS3j2y2cRa9Jj4RyV8WSy1nGTA90Z5Lu4cItnq7D\nFooyvejY9JgverQQ1ZtRsL2P1XmhopjSkcx0HcXzDOwwsh3cy/fGZWHB3PSH\nv8F0TFsYXFA23cdNV4qGLgn5WJ4pIUCgqERIOpk3rUJQITcTKmau8em1InnZ\nTdd3Bgp2KHwGxrtCawCnmzyp4F7PZ1b88XAtzkNzTmMg0OK+G680ZpA598C6\nBLWR7n3ACypIgsidDBQahxmHwTMosBzx3z2M3FgvPpzTQ002tyhqS3drh+SD\nQOxRmI9bGWw2xg5g7+AlG14ujMzU2n6ze7oJRrSS/jIf0Sq1ifhf7ShUEXCf\nG1jdIwBcHGb37CUaC9oXYFcjIubLCl8CfChybih9x/Z8QFxXb6UTN7xjkveu\n94wI0Ou3Z6qQLgTMXXChmf33DyYMR0nzBixwObop/BbSBviy22/XNlvWSQ7e\nHEU4pwtmKGcBQ4+5U1NLe01hAr5ugvW0ydFpInxfmUFYTKtj64g8G4skhKuA\niALT\r\n=g0SA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICacaxCkEQQNwu+Fznwa6Wgn7+Ue3f3HZZtX4FydefwtAiEAsiXOXwW+ins0XtDnyKsl3DFKmT7/v1clAwaSDpr+IRw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.232_1621385786593_0.365256826506104"},"_hasShrinkwrap":false},"0.0.1-nightly.233":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.233","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9f4060498c54031ba62b9c8ff8d64fe1fdc1ea80","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.233","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-ynAcvAui80dSWO5eNz7VZh0STgGX4qq0wgRXFuf0SFYy69PpOe9O/0MKO9mXjsM4bnfb3jfWjeYpV9Z69Redbg==","shasum":"ec4c9835d1506c79d5f6e7aabdb8a7941e5f9029","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.233.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpdnlCRA9TVsSAnZWagAAV9oP/15qlUdwLFt5Yz0iibfQ\nefIWMHERNF0ZH6PL9XLC6c1TrJhxQdJAH0BBkJvljgwlUmbWaQ48SSjTTJG1\ntYdYnf+/wHDDBeQJwu8kIDmzLCfeqCe7sazbFKeFG+3kn1AkaVS1T+smiFUe\nu9Nx/NZINPKlu8ogtOk+DQbd+YiIQuFk5Z0hr0E7kLSfTAkNDZ+pmROgsqsg\naNVK9pEUHzvkJBe8F92MzzOsiBPYd4kQV8aLo58tPllvDdkXeMFG4qhnqWVX\nPib9OAnymDLjhUk6Swn/9OCXXWaaRdJ5DmBD7gGLzmnmAPdarxbg+ivmTo4z\n3O5K67lIaOSYwydFB3199Hf89gleYjhf8RjMADprEiEgQOjbSROO15U0qR33\nbf9ilaHIeSZzXkqDxHlDk4+GJQiKzRPyHNp1IOAKuNLlByqcvQ7qM/Nblrnw\nEt3dbjEkJ2DtNinzXe1dXhfPMmODMT80eKL5+td2v/fkxPgTnVTshxyr+n0M\nmzkx1uKzCPKsA6ZNY6FdTVb8pfBpRIh/cE3x1VBy7xFX7TNEtjlLVZbamH+B\nlYkph+GgajEbg1DFtNr1g254SIjRD3s9La/lLqftpMHFlYhM2e/UFjGXgdt5\nBlj1V2rr21RlIhF9H/fWksaVBKFOVYLWKP9OyOTbeupdLp/WK928vVkmsC7R\n7UpN\r\n=zLnK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmTyrAz69SL7IdqrpbUSJZR1VrMNOG2IBo+umjZsiL2wIhAOqn0gPMPYoC732KpPn7zvFu5kf2NqmYxvzUPFdPMX7g"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.233_1621481956488_0.8438675507454181"},"_hasShrinkwrap":false},"0.0.1-nightly.234":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.234","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8d8214b67b490e2f2b41996331536c0d08efc136","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.234","_nodeVersion":"14.16.1","_npmVersion":"6.14.12","dist":{"integrity":"sha512-FPGwuSleozln2qsZR94eYqw9IsVJLcv5OZ2f4Uh2ztDwEvNGBrtc2lWpMNF/lbnYxr4Uyc2SH6Ao8jrOck58Pg==","shasum":"3262f4a5650a652d6883685bd023712c0ac46000","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.234.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgpxRHCRA9TVsSAnZWagAAdRAP/jy5kEtzCbrp51pN4fLu\nRW7n3xj5swqgYZDYlZlwQ60IqRnEiWJe8auHF1JVIm97ndp63YMBnV+lvhZW\n1yLiPSLrw8WB3ChrqzoW4O2r42i6xcUCOdT4bX1dZFCeLgG8uL9X0bHjKIpo\nS5gLdxyIg23yveYds+QJ8ijfT4Ca5c+BZgVhXqC2si0kXLZuzj417tVdGa5u\nlHl51lTIFoLjfm05Y4Ivj16Bb0uU5aUrRrDuzp840qpd9uedd4Q2e7PcU9R9\nBo7B/qA+CJpUbjCPpySkurkGC2EOMNHbYq0qT7bIGh+7oTr/oLeeVklxGqBg\nycVD77TJtfLyPgO1n5LoUfP/r4Lmv2hoDrVOst+1RuEFjxFB+N2wJdn9v3WT\nDicmFuJYvyxOIAOMpiQE3TU2SU2xixRadWLaAAkPtmHLKg5lBQMDc/gkiW53\ncsjMFyooO2MN77VubAgKVAiQo/klifJLNN+DZ2md3SeFqcmDsTzS65Rdf7J9\nzY0K7cgXpC/JGPE/hufm3SoZcf7hQAN3pwb1shbP1+PTUSuhPuFT0Cx+Nv5F\n4j3xF8RbvA9OUKQXO/gWkKrmC1kYaqB4Ga01wZN+R1w8WE/zCS40yv5xvG5X\nBpH6C120KFN6C7In4Vps7LSZprn46Km5PGLQ0O51pAVmDG7dR0/6/RFE0+sq\nnUcF\r\n=/ddF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGbQk8mN35xiHWhzij2IBdEczT+vzwyzbfLoKa1WyPG0AiEAzg1ZA6KmB0yTfepOZmWLS0uEHdAbzaGp92VvacEsDcY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.234_1621562438823_0.8801562522456841"},"_hasShrinkwrap":false},"0.0.1-nightly.235":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.235","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4ad362a7eac955b315c9c04a2ea8f85813afebfd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.235","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-1G7LVg3zLP4Z184ZR7Dgn3YFYm82FrchhrQT7NCgik5EdVAPr4unI7s+q+/6THZ6U6hsDPyEJF/JhKMSx/1d5g==","shasum":"97df956756166b8d6feeb13843c0e9b892769552","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.235.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgqUXGCRA9TVsSAnZWagAAvp0P+QA74B0sAXaCxo0RooaI\nHiLsg3jR14ChRnQBeb3J3OlmWODIh1PWf+qsYO6bQZoUI4+ss5ko5jg+/+j+\noGNW9tFV2ZdOpymG9tZYdDBgSunxvBLqhZP3QuWm3aXIYeAT6jQiy1G2CaUj\nLHsX04Si7LefNKGhe4qratBTyCEIgSGmNeZNYrTs15xh9XOVihTEbyfm1dIU\nMMeZO3zvVu9CQgdYCpaIoI4Yajx+toU/p1nWnmi+uI3NfjUm9xAER4864mJ0\njv6wnPzuFfrow+KLUzLq81kJ1NPW7Q1s08md8HEJb3VmN0rFO5pIbSz6lf9n\nRvoTV7vnNd3TPYB+npQkXl5F7joVfckJhQLQvzudrx0rppCVW4c5wE4Jzvrl\nw2JE7YfaqFfRR24xJKW68QMyiuKyJlqEFQwDnUFN1roC4bukYTpGjV+zOo82\nOnq/Bveba/WB7yQ0AcAXGByCgsXkAx38UkKSTcDLu4E8xWqu2xaWzShIge+Z\nitZsj39NS34xgkTieUkWg+utlbtJ3cbQiHLYtOOmTFc/2+pa00IH3VQhHLa+\nwgSF5wDLpTMKNEekq0zJDZlUO8joRTzLB3VJ3Hw/vxo2qhPLZYVW6cenmden\nyaVsF8JjIToiBJi4k9O3+WNeMMifuGcFEkfzUjiqQ0sZ/WQcfM5em8uJxdPG\njMQB\r\n=eL6r\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFHX1vc+7Og73P0y8WZxvv7xTuC3w+81euBpokkMUtpcAiAYTUv/4nek4v2h4RxXrzIQefNnLkaB/Sf6bQyTQUGxTQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.235_1621706181499_0.22681230632858496"},"_hasShrinkwrap":false},"0.0.1-nightly.236":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.236","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dca0d4d9f827e96ced473145d9be7c7ba5279f37","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.236","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-kfTFUORP87DkUb63pILLnzntOSkPZ4NM/rVfnAo10QxbOzixToLuBuvRcWRrJTh0wgBNhAlFJSe+msRbZPxXlA==","shasum":"ee8c3ee140043736c211d3d8e17d85f6e68b0f38","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.236.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgrGq0CRA9TVsSAnZWagAAA9wP/jFJOf0HNIIW7fvDpLSB\nSIq3F7TFNpO2MnSj0FnGhVIPkRV1fs54YOZGy8k+zbLboW4OaF4AwyjBIHBU\nogZax6915cEWsUmq6vsysHylsDLW/zfPZ52l6gjtNIaPV4x5RLvQbHB4Z5z5\nW2GyZOIebws68MVZbpIGglsBzpwPviYPydYRuUfgfvgpXStGNCSrB0l4fVAS\nKjPnXpc7chVkz8ycQF1gtxvTucjrrZ6cLIDGr+M6Suy6mmwDClGor0uDXyiQ\n/q4CDONxc2aN0tYUW70qGPFvTvr4+q9nrLIgSy47s0pie5lOJSBzmGok4TqX\nQK0udJRTS7N7mNInK2+Vq2d/c0x930ZXKHLbF23WiB+CCq/UlzavgU1uC6oC\n2bp+IEAmGpAvybf+EjNd3K/UaP/kkCOq+Q0fkXGuuEpo8Fg0C8aVhwTjyhC1\nMoAVNEs3vX5GbIM83kdhSDeWl1mCxWS/HL6RQ7/OrWujFsfKNtRq04so11I5\nriSA7LtEE/edQo8jWauEhDHXX+ng/IGreEuvgXuJqeVZ4W7Cf4MP0Ge7IUGQ\nM3jMbUO+6S2ONrHINJRI4Zbqi2cukb2t5JTgeo9QXgqDeVspT7cX4pz4D5il\nOp/hYySKt/rBDmy3B7srufwZv6m9MQ9yNxXJXkQ8ZAfFdPQ4PKGxUwc8xxep\nGQuu\r\n=+4RU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFKU1xBG/iUpvX5a0ii3sBzV9BZEHzEBNi0/lVRlhnxxAiB5zrRcyOXEnwZmf0cKKzyPoG7mFG8nzXfewfO3lOC1wg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.236_1621912243745_0.1885304296087158"},"_hasShrinkwrap":false},"0.0.1-nightly.237":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.237","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fd7010abcb746d2e9b734891787971f3de914947","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.237","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-CwxfTBvSQVghlg8GFiqc6fDNj3X8T1LgEKyWbov4NPlpZBCTl5H7pDUsVYJZD47gVnJmmVghTijjk/lsMixc1w==","shasum":"c891863b20c60783223ec7d6fb43500d53bdd3d4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.237.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsEoTCRA9TVsSAnZWagAA3xwP/1CDSBAhZCevTtxP8ubN\nSGyptRpIDfa3PgJds8HHwYA2qOS5vv5GTiY0G26KE1+nwmMj8wWojDU/OdBr\nTF3dv5Cd2s2MvJU6bdmAhlTS3WWJlKYLCyIWw3jvIt8RNCKrvXay3NxUUgvD\nEUPgIDfU5HTb4X/durXetoiRCHwZSQYi/exQw1NeyODx9HAM625CX9JXbkNp\nPdL5EJQ6pXpRo2rZvzIj1mnHzGNJJFdLD89srJP/Vm0kzLixD8WFfyypKW4d\nxRiNpfuf2ElLXvFTgPZDKvx/7kgSfw+vLfDv8zQes/yMTDtIZ3++14DZfL0m\nDGI0bg7uvGjOzqz/0+LJ61d9Iq4VWy3gbl7qDjNbLWJT3vLg/8ZDPAuiSlUm\nrHqIgd8kTMixF1bWjsHsnD9VTpbF6qqgH/uSSTdW/YF3iaytIoCAZ5rbSn8U\ntfcpJ4sdhpzB5kgzZgL4eKJUBpBUqMk2+bEhULytDuBhAK66k/IrRr+oGpD4\n8BGGUv9PWH3/KigekWIRCl0+2e0Bxzwp7kLlqvbKequE5HsgIax0Ztr7B62R\nrRUS9fb4YptUxHMv/lz9+FEA2BFQOThX1K/X38qfGTkHoZ7rpjoYwlXnv6f6\nJVy7q3KQjfeuWEcilv3trfjpWDgwKxE+wLfHpjwXcZKXkaiKd7vRR4atDecz\nAd+Y\r\n=bYgl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIChckkdVdMB1MVvNvIkrSMjbEi3s4NgTSt4jh43lNX2DAiB6/p//G+jfD7lRfeFrfu1cwl7I///bgp4+DHbbatD9fQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.237_1622166034362_0.4472129837298846"},"_hasShrinkwrap":false},"0.0.1-nightly.238":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.238","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a233fac728a3bc75ce6d3b0249ff92bfcf4ed878","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.238","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-W9EPhPPLUY4LCEGNoR2aqOtLckfO4xER+w8XCqhebGbUXFSxDCUrAoLCHfER3KDROF582epcT2MqLmKOGnP1hw==","shasum":"887cbae2082bec07a4de8c2a8e798c73674a7a0d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.238.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgsWUACRA9TVsSAnZWagAA+HAP/jWSJYZ9VvpbcgUgrJEJ\nQNdagdxygyAxoc8G0iI0ypxcC+k79XQy9/gKDT6Ih8TfkCYww8ONM3jjSEtm\n91HMFxnpfiQjhqtkY0Jqc+1sx4F1z4atDRWxrkUCFVwI03r5CTl2eLY2LQ9g\nDVYEJYLRBCW9CSaAZz7+LBCJd5fwobuj0df/dj03j2iE9+n/j+xjPkRGbTrP\n0ZSDeC46qMQOdf1j9CRADSfTcwR4zNOYiSsGT5oHw+vlc9IErdcTnmMK1/Gl\n4xSGNmlN6oHi58gf2WBEKXOLpUcgG0PhE0HcCB7rMEM/wb4/WSqKfX/RXfLF\n+1A3ts6L/99agNmZKl6/ybDFr5PqfGArAWqd9dKHdcwrLoZ/z+116gr9ym+3\nKLetO6WLm9+CROA8ZtudL+CuD6jrOCXUJ3kZ0Zsn44jNbQhw4ks0DmRCpQDn\nHzqtp2h0R4r/oEvY6WLCCKM1SEae3wwwTufoDPuLXGP67uxDWDzGz0mnruSS\nIlnaMejU2LTc+/aTfVYgQzSCOJC0osAlwF22oIpSl19Alctoxj9H1GH9QBsD\nzRbaBj0QPlZ1h7JistT8qeU37YGNZtU9GloXOPEJD0BZo9LapcQaD9otAkcv\nWTg9m4s8+rKKdYOArSYhA3aoQ+oXEVajXnKyiYwUYYPbTkEx2eWYRdPZpVQb\npgfG\r\n=fDX6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAcCFp85psdwHIhNijAHZk44UAqx23gGBcLLKPhznAzfAiEA5wsUQ/1WJ6ca9A+OXSCBAf4InWSviqg+wPmI86JrfC4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.238_1622238463622_0.7543924771006072"},"_hasShrinkwrap":false},"0.0.1-nightly.239":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.239","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.6","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"af37b86e13321187c27f92abbb9ea0c952ac441d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.239","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-yZKHjo9LJl79/nBX5S5eJYevGvEGdz/5RrWHev+id6sGxycJbs9VMmtbPsuaHEaWBo6MuwWIIQ1YXC60gLoHtA==","shasum":"f8fccdc3d986d70a6a2d28632e10767581673806","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.239.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgslEXCRA9TVsSAnZWagAA4XAQAItzCXxRa+rwv5TpdElk\nI7sN8eweKg9watLy+Z64yh1PBqVv4fJyq2bNPy6zB+NFIIcRVclDCXQ2/ViE\nGo75bixwU+53i3FLawoYy8iz5eWhp+KNskkh/nBkNpPoUImWp6a4ql6pS2ty\ni+fbxIZAROUB1M+ArvsnvKBquEKZQZT4CVCHbL09ZQ4vfFcZOqa+E1flZvJu\nk6NDXoRrjpMXXB07JQBq9gljDn5VnQT8n27UF/yR65kASs+AL9eOEy3cW04h\nLfkvO3TWjUNU9+VHL5BhnWifT2nVzPEQpuC/BiWqW36ReZgoRNr9GqEW6QRg\n+eCrFhN8Ja3dl6N7vBoHZQLro/QeFqzb8h5nR4Z7ujoO2YN1LbNMX74Z39+O\nNqroBA3vFalH0kHB9syIBvKPMB8aTeYjvcT2nDIUKYbtmDcvlyVBkteijw1F\ntOYR6GEc0pLirO6g2LjzeLv2PStN7excz9w+wZ1EBAv/tB9MvgAE5N8fuXFk\neTPfam4RK9BnYHUH/DVC1BxcRFuGKhSZtdVnlk8Y9+EcYAwiRGuYlgX0i2le\niNmsjdgQn86CxKYVOJYWgmF6QMx6aBZratS7lmLuATFRjV2786K+yrsqdGwD\n8h7gEf4093o6tiY/moqX0choPEJisZQsmrRGX/3XvesTsvhVo5PD2uM+gG+C\nyv5x\r\n=pJ9S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBnqMLelPx1KqmZUy7vVnxCDTsXi8LECDACIOZZfjifOAiAkkVFiQY5gTH7+Dvwond8V/27XvhS8FlU5LbRYb/xW4g=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.239_1622298903152_0.7479822809012919"},"_hasShrinkwrap":false},"0.0.1-nightly.240":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.240","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"04f85ce11cf815ba8ce79902b8c84538ee6bfce1","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.240","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-cbRxISOEUylIy11wYdrlTbgwk9wocQOvvsOY8eYEt9fqTarzIjL75k/QiE4IWoX1yKiiPXz2635zuN3bT1FBWA==","shasum":"994a107f2103d009ed4959840bfa52b9d7b2a20e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.240.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgstxnCRA9TVsSAnZWagAAuLMQAJm9PH6XBaEB3KUVXu/0\nKo6JRjKVpaRJNdtiPt9VJkX45qooy/V9k82Qg2vvYb3MF86TKlapoXiw+6Bu\ne0Pnojr6TTaC+BPskfNeSOqqTGcuXRKaNYj5ydHGc0B/UPBy5vKPBy1O+9Xg\nWnl9cr1CjY2B1Et29wbsX6EYCJmZJCsmi93rrEWwuTW8wM7VKQFuHDShDlYp\nvGNke4WSZZXj3KsVArTB0N7TKvjxr1d1PyMldzopgxwQalieYgyle0bUU/FJ\n+H4iVR7IFKEBuxaS5KsX7+10ku/Kj7oaK/2i2WVRlOKDiM1AtqF6Oda/DqE2\n3OUTl74AVUYJJ5I+6Axw03TvhDTeDG8xchzeC4BuXvVEaTeYn8encewZHEN1\n6nfHLmjiHZL7bArgZbMMUZ8eBnGvW6YvWvKf8YhLjY4S4YPeyC/KvMLlMYZ/\nD3i578bGYxM1vPf9seSfaAr0rv6ygGyPrstnwANOOcRJTAXCZrJ6Fw6cSTN9\nQolercesmKDQGMigppsjrgnPTUpQjYK4rXjHmD5UuMXHuN5mmDjnvqps0TgT\nKGVEChmbyFsISZ6FS3P8X0hSNZvyeWUQ3FQCP2Kn/i/IUoFD5JKMGeHbJv3Q\nfRxshSd3AS44jWli4Prz+bxZ9vSFvoXp4f5nLLJpL4weDkHzBtu3A3haCUIm\njLsR\r\n=zm+d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYrDxg3XF5G6RBTBgUVshseaUAbetZ5AKwyEP56MX5HAiEAuNoWsSP+caqE+ECx6/cvmjVewbJY8IQXTcplT5nr3Mg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.240_1622334566914_0.1570819002441579"},"_hasShrinkwrap":false},"0.0.1-nightly.241":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.241","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0b3e7d2e3bf08eb96513cc8a3a616d6c7f9e02af","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.241","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-GqgI0DbQ9DIfKxKBzvTtU+NRYVRqf1JvfN4B/GuiJA6AygMuNmPYoQofQFURBxCGqmnGgue21HbvfJ2VIlnFHg==","shasum":"d57f8c0df16a960c1297dc781e4ba128640053cf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.241.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJguZh9CRA9TVsSAnZWagAA1aUP/37iQTCZ8wWIrkkjAj2o\ndFBopAjnLRwtfOa8TH6ci5ClX5qxf7vwkcX5KA6PNOS8/BDwuWg+MkU4gYBr\nLEToucx4Uf5OiQe4Frd/QYEBMREmLkKwN4x83aCWVgDelNI+6P7/objtesyh\nOZjTidBFgLHSpwAj3mU9YzsZOUi5NhzMwMLzvP+R0eKwZ9rHFdJ7iFOGYVTQ\ncNkcLjLEZaD87kHOGDnUUgzbOu0ie5j5oh1ycYetuqI74qO5L/7OMhrTdT6q\ni3h8DdvmTPrKqguekTBOxnzhWZgSU/LlGaI8DNbA/eEvEx/uA98Me2kH7HBs\nqDPwtSG3cYZ/8wDsD7CqX02ErsHsjKyzA37fuZWbzzk+4whR46WRshgywTEe\n1fyTqPILhhUyEaDboQzYVmItdJ30IGFO1GgNBpADR0HgiJYD4U0Rw1KAIAOa\nVTrardaROHr9Llu+UPLI5Qv9GGbuo3j+sJjpG4jlBizKEgSismvkt3jvEW3a\nBGKRzJAXISPDPJPyfl2fOXR4vANiq+tCMi8jnHc86tZUFIbY7VkOkA19Jbm2\nLHfJxqOHXGeWX7ke03mhTAI0uAqE4NySMjdCkrA4HhO/ggZ4l5bPwoJqZ4jr\nL9UhoGsEEtGlbpMm3zYmcbSS4X+GoVXRJ520bQZVsm2gKgwuIZwZ29QSNjM4\nOJFg\r\n=QgyG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCPe4kDXbv4ycDRbK5PfReFK6+La8pEHshZKzfBxmw5JwIhANxzSiR9tSbwF6CRV1sG5vWf3e3hFwKTnCgAUrjGR9pV"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.241_1622775932940_0.6530699643654174"},"_hasShrinkwrap":false},"0.0.1-nightly.242":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.242","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"096b8e9b6889a480f86fed873bf4801862076c2d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.242","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-EX2FSiM5ghUD3b/d3d9IUvsMfNe4Ye6XRmdHRKuQizOtNsj6lw6ymMLoBWzxtDUg3nMuTlMVHanja9X8nTxpIQ==","shasum":"8e4222674b888b3c3767aa7ec02b59bee3705cde","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.242.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu2DrCRA9TVsSAnZWagAAkbcP/2pqyMF/6XCezwZsaimH\nG1aM5GRFnx9csqVokJRS2924aL7lcXwWyQxjP0eMzgmL7peEAye8dL8LYfe4\n5sAI/JfSZDSXr0fGKS6YGio2COlvDXyAIapmb6QIxQfLzRhunSaa7PxIQvPt\nudoTK7MA/9zmJXY9SQMqf6TeeQ3LHfnPAZbSIMUxZlUwnU8U79QdSLUgbxof\nldbt1A5ajPA0AE8iUHO5FYAQOZTlBIv9kcqxsP3/crLaLRTFMuBbFl4KPiec\nBIqhZDpt2EWArZp3fPGp3+h21jAirUbvTYGAgqFQWM6BOvv60hn0gKdr6lVI\nO3mMMW0+1J5qM7R4z/WBMy/fkSD2lvHya/HH2bn8xVbRiESrvBhiImNd5mzH\nw5gzkdv14vqukkZ61qhTogqdLDUWsfhxZZUynRJl/ngAnDgomVo9spsCxaMR\nE5Ua7AjlMFqHC5J2Wq44lAwRw/6k4TCkPj4rE60OQ03AIXrmzXcK46infauZ\nqgk0+uSb6mb8a0vOgFg/LdUupMM116mOTPtp1hUymYBP6MTT1zcc1XgAPQRj\nItOH+b29Vnl55bUtfR3juY3427Aw3/EXHcLVCCXfoP3qh/b9TBQHq9PNTKpw\n8EbK0v0nVZTf3kRNWw5r11yDeBNtEqDOjTPtNlp0T9YVlH1opBtaOrhFuVtZ\nL5uF\r\n=zjZo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICe3ihncDAZQ03PH+URIVkYWFLIjyboaBb6/vsKOpc6wAiEA8ABr0JlSzKfrtRA0/dgePgO/l+GaW+pzdeohQ8h52m8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.242_1622892779018_0.8974035535846496"},"_hasShrinkwrap":false},"0.0.1-nightly.243":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.243","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"52a8a32bb7c4ba24a726b988cdc142744c76aa55","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.243","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-tueXQNYCiMIkOMy9IC9+X5xugTUTlGiwjYy1N5NQL+0nFHgX8JLUITT9KxgAAJKyxIVlNu4Zgb1ZkHplS3jIUA==","shasum":"c22f634781a89e62d106fdb092eefd7f3a428b4d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.243.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgu7eiCRA9TVsSAnZWagAADWUP/2p6h/1DoU0jf9pGaigv\n3DYq9DHurlIGnG1Yn/XvZa5mUdUfnsYKM9clRo7Zy8uVNmxNmnhvo5IFJDV+\n52b6QMra4zzPk/Cdc6sdD1kiGQFqryReSYDG8ad0X8pElju4sx2b1MXesyOM\n5BRH0UHW0Q9t8AfiwB9LOsyPnLhjqplb6CX0Xgd0qusRPmGN0TJEIzD37yP7\nQWRnwzFUoi7TPJxmQNTNWqz9u60WUezL1PUPxQqNkZ53leM6yPryTs9A6SXk\nIv9xp5+kZWNuzKc/01G2Q7ysWYRhHw7DM9UuID5p7GCRwTINTlQLKV/z75tS\nlOBnZai0VVQJLc9c9mJuR55MeEdWZunIg4Wkb91AOlvj86S9bOZ5S9mSB81O\n1HAcx9k5aKqePp/KV0sGWeZWMWtOWr/U/7n48UFBjLay6H5atd7UKDyK4Ygn\n/X3xrFj+mpRPPTcgsSQbAC0FwBk4LC5XDxcF11Ztl5elW8eeHMUSVTVK4hH3\nABY5b0/JwYWpBeGaIgzO87XQ4CUAnHjZ6Kg4UUYlVMBoLs6HOrD1b18oLcl9\nqmbt4ks5DRzHER76/E6B6bd7EmxHoVMoiSFZgyEuWF2XTMlM/AEkx1UyPSSG\nb9IzZWclnQOLPxEU+5cHNNOdkYw74oL7tbtz4ElTEzcaT12X4F/HFh2Fwdb6\nSyVI\r\n=rvlP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD+TI4Bt99s9laJzGQ+IEcSsTFSKjLwKGBcAdICa8H5gwIgc0Jur+qbMxKt1Yhq7wtUTulMdIhAFZLcJMR9yzajISY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.243_1622914977858_0.042138578165514584"},"_hasShrinkwrap":false},"0.0.1-nightly.244":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.244","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5eefb430720d2758fbe7ea4ec1a5418d26a66f40","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.244","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Q9hhQ23acEXue96PMTXO+COLWta0Fnb+7rkMO81iTFJngERLuouYQ8ummyKdRWRhcsplppE9Eb1mdUxxh9W1XQ==","shasum":"a5e1c4652bda78a5709f0a68a91142c7fa02c2df","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.244.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv2JQCRA9TVsSAnZWagAAeF0QAKPNKIeHVoTT+3nUrEgN\nG7VKaGsAlPhI2X9/sG1OAwrKWaaA5A3mZiCpTIvgCj4u1+/RCFr+15byHzAQ\neN7+nhcXepMABKmkR+JtVXXawDTnt1FyAQLdRCuwGrTaYzxERm9idJKOtbrH\nYrZ7Pgyv1rceCLf58czSai6yal4T2H4Q120vsunFEkbCcwjKUUhFmliAoRDT\nSa7E4ImqJFj7NDIF/10RHyaHHliOehinBH2kCcDicgN2RRnI9pymTwAF3/Gv\nQQfSVCJGfKgr0rRx6gKDtS3TpA/hxRBqaAB0v6SYRDJ63oXHhcNEbMbJcLGt\nzL3ZpmFQgWpJ4NmLJJCj84lg6ciDNRMbgejgiEJrIlvNGZbQ7ysEQ+gyc/FU\nhDFo4tWpP0qcvw4RNg5V0ozW/4LKviBWxi4aeaob9ifvppZDjvqsD60BoQXh\np3nfh3aGL9gm2VDsFo2M445DK5gui1MvtOhHBgJkazIhru4nWgJ4IeJVMYL8\neLxIGeek5YHj1bp2pDq7KzgSB9Pq1OvOI9m6F183+LtrjM15BhUkWsuHyoao\ngczK9HtsxKhWDGTSD8W3iXUeZdf2FzncMgmtZ52WkCxtwaTpvsg06BNWjsFJ\nHPFG9UzmKcjCw8UOTlyhDZAtSuefTmpJnSQuWDdYqGl6s28gqiI4xcztnHF9\nEQsi\r\n=le6I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC4O+LZP53Ky3jy+ara4HvD6jYPXjB2omVpq66AbPbodgIhAIaCdNHsl0PGTfeQkrdPs6zg6pMuTzRvQCX4nRbJenpx"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.244_1623155279892_0.9063195111593678"},"_hasShrinkwrap":false},"0.0.1-nightly.245":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.245","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1f1a6f8d6d425cbad25e958a4f266ed70fc15666","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.245","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-YOCc9oY+2LplopBgOm3e5gt+xThhYwV0L+jkQs0D8ZBY2wG+z5GO8wjPzWg7m0QMElZA5S6PlbW/SQ49zcXD/Q==","shasum":"ecd09f32b6f4a2d83da8b7c86831379acafb8263","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.245.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv/e9CRA9TVsSAnZWagAAkkAP/A6pOmvHAM2fSG36+/nw\nY3IlMUcUaqxvx3FBfQGKUawR6izRUBs4RUBTYz3cs1Fs3BdYQ1l4KwO6nrbD\n4ZE+2o19RIXoMdxB+MNX08bd0DzREP8lweOagwGd7OJML6fPqzcXz0tD5wXo\n8Bm/mB5/dCGFeu3ViCdzeBnWdQMOKqxXLbbSIOHkliQC7TPozHlGMSrYZSIc\nv3fvkBWjR4uy/aC0Uvwrc2HwRPTXvejHxg8x3cGrPxduDcbkY59R/w/utp8O\nqG9q6Dh8VArW2imCWHnPY1oW58l2cw7t0DPr0sQc2a45OiDylVIpE2+RE2ie\nhjevgc+T2INlkd4NPnPMjh1Imytb6QE6HuNZKgBy3AVd+4dRVkBum12aMhEP\n5Bc4UwBiUMG0qMIu3TRNieZqwaDUkRbFMMAD/l7JUFy2EY10i/QRlOHOjFU3\nxmmXZ3AUKMpidUPNhHPzV8qQAMgfQvTxEOAuZ4ALVllEU1CNj2Oku3dOvv15\nu1z7ehHT2ZW+FlrjCVKlQ2KIyE2AVU0alkqq/7nAJlwtYbyMIYuKjWY/LBcF\nE2TtkfR3pWl90mVPiWQ+GqoIrFlHUqrIDkZ/Ja4aOL7bJnkxeRVEQXlDz8wk\nWzTs1wm/5WTi1Q2yWGVlMdXQwYAJbcTdZxXxn9I69an/3mPuy0zoET4uzGxC\nyDpD\r\n=0AKo\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAjlS6G4e2vCw3+h7aiuyFp//y4JuU4XLfdHQ8j8Zwf8AiEAtU1xFaajSXgMQ9nLyFaD2hGyno6wU2PewRGHwGbqlJE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.245_1623193533681_0.9508952244445397"},"_hasShrinkwrap":false},"0.0.1-nightly.246":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.246","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"427f078211943cb72abc208c01df5d1b299257e9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.246","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-TgEl4Dqw6lAV4+Ms5D+jW/l3dqnoenAjN9h1vJzbySkKkI54XMU6r+Fr1/0MyoIjD3zk5hZQvkQeLjnh3FgxOw==","shasum":"7b578a33dc8a3cc6a418ba4b9035704158960438","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.246.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgwf28CRA9TVsSAnZWagAAO8gP/31rmdnZhD7q5MUfvtvS\nA7Me3KFGJ9F5I5AZKK9F14gor2XumLOX2OQlP9DNs/9A6Yy6aOhxBD/OF7Iq\nHzctaQqQ6wUcIYOYQROrIHpX5bbJnPrgGXlyMnprJC0fuHM1CFB62zabo0G3\nJpdDUUtKvOfFYp3MiXgQw1XUq9Uyi4AWQiRiysRKkyfv5FGeUAifUF2fHXPQ\nttri4C9eV5bei0kM1islXzHKHaHyJnYE9GbnK5AY60nRls9wBny+sw1LVmWs\n+hYsLLTRu2vltLgqilv5wvgxepj6LpnMFKE8gfH3M4WWxP9P48s+bA56yJk0\nAkK/fV51P0LJ95T1qDvJO7Sp90Fq0SiBudzAS1A+vNgFbmFjufgJE74s+45+\n9JFLsQNUp5d31j2hkhzFCiKZa/rmfq3lZYgzYwtwmPBzFRC4L9p7SzYxcOqC\ntb+TM/Du7lolq1bt1dYz1Gc/pl6iIEE/gI3h7TB7ZSddWzwAcnXWuuqHIjzo\nVGhz4IiKYojsEmxi213rXw29IgltjswgM5lFLZT8FwPMpKfPzDCPlaI7WXTV\nrrAACel2vEl2WTB2XbOpq+u9Q1jQ3bxSnN6M8tdA9J4OwQ3DKd110LHI3Ja7\neVM0HWXu2XsH7v6C0bD7YRn0JNprt07ZgczYMTtDKd/xqRjwr0bxbvjuOTeq\ngIdn\r\n=Ktyy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDogijB8c4Z5Dcy2HgBF21FC6VPOjNjE8csLW/Ygk6uTgIgYVarBfkghlJ44n/9i0nBj6/PO0n7Ck1gvE7dVQzsSVo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.246_1623326139907_0.4848652508738609"},"_hasShrinkwrap":false},"0.0.1-nightly.247":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.247","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.36","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3700e03ff6f8cb7ffc6ed5af0ef5da359815a88a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.247","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-e7xXkbZS1rEJQaFAQiXKz/jkIwZg22UE1YQiKvsfGdCz2+CaPJxiTodOkzmGUCXI31OMQpQJCW8tP64YWx9/4g==","shasum":"418bff94648880e450dcdf4f69332c3c8e3ff310","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.247.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyeUdCRA9TVsSAnZWagAAuA4QAIYEpS431Z5B85HNc6TW\nXk0DVU9o5r1QULjUNU+MaeyBaiXiJwJPqxyA+vvbiaJq7i3AZuR1hiesETLP\nPY2h8WEe/MdECyX/S1sJnhCMPPNcLer5vSbmxgruAcHYzZ0OWhxTVxaPUgvb\nfbuEQ2txsZFzBH+wDBrgMvdbILF+QEwq74T7P2GwuUgG7Mb11+faZzhzDI1p\nKnNMQr2LoVlGHQ1k+hzHTn+GBVY3ViacQxgqoqZfZF5kN0dcJcrWZnK1sKbe\n4YRWChKhPoZCb1PptASChM9904bP8vI+BpKNts8/2A02UKF3ruLy/WZKdYAK\nPCCY/CjSk4zH8sidAqnX3LN5xD8bv7VnqHLGLKXZ25OzL7BJ2swPJ3OayxUx\njAR2iuOrnNg9uUTy+usOg7T4qFkOzL8F7OrvpRLWqCkZZiSMyqDsyJEdcx/I\nZcUYs1as1Srcj4MRKCyX5w5+P4lXxkJ5EzjswWg11mkq0mTQPtN6ZSwrJOnb\nsf8r+3htetp8w5KJXmO3tlsKn+u/sT7l6D/feeU/f6gbMWpq+5t1ZSedHPR0\nUJ+XnihgAZPdEIsw2FvpjT3MmAMNH2ka/v6hgClUnzwW4wxe8YD+H5LDvPhE\nI+LQvaoTQpS6ZBGbzGBXbE3OP23lDYit1Blrw77gaSaVt9AYU9+M0ntUwcsp\npy2u\r\n=cX3M\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDMcwuwkX4FaZ4pLa1+fn22pVjaBUndUZsTuGGAbJ7AlgIhANZj56VGnBesj16fQcO1DhsW/qnnsaAiEV7xTYm4Gchl"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.247_1623844125296_0.9598837643378126"},"_hasShrinkwrap":false},"0.0.1-nightly.248":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.248","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fd99ca3b1ffa4e6b69fd204858e8acf4425b3cd4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.248","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-0mkKE93RjpilriQ+TcEOD+idb/yo+c+aj77ctJpxxI5BIt5Ecoo52zDkhjSxTqJcrMTLuaoLYVCiOsFv8f+scw==","shasum":"f1682a8cb4a6b0732b05de0083b96debf1dcdf2b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.248.tgz","fileCount":516,"unpackedSize":2221923,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgyz8sCRA9TVsSAnZWagAAEg8P/0g/B7Q7pSXSUDmBQk0b\n1TCdFw1mPzMHK2EyqByNd7e2lNPmj0xhZxOAD+wieNJrj4ijZg1M4htakv2v\nK9awPFepZvvnLdfAKTXinwMxbJ9RPc4ST23h2pjHphmxdk/s4/qu3EIxYd2G\nnU4WtCLZRX/cniAA9Q8Wdg2VbhQjha+tsXGL56OpDAhgF3atF2IcBh225aUM\nGmyikIj14VqodwGe7hhhxc7QEoO1zsFGN5mZv9UEKBrrBTLlBlmOpeHiQWFe\nBuoWOpOTN9ti7oPPhmgm1z+2t+pj057YC1qNq4hr1AWdandcliJ+vK40oEJd\n53XT/6Z343Vxmol/ref5jLKRVrJyr6gSQ83WcQubK5MR2o3faxxJiHmF0tS1\nejgesU8tMFaWJ4Fj7/QZIuqowaUCwmKM162DdDkPRsdNVdoWmL7mRqQ+49EO\nWIFx9aEnF2rp/Fz68YrinK+GKZI+92y+Q3YbKFVhQlSA01E0UahK+B5pQGZg\n0mOd1Q/ztfLw0fkQELK57nLTt9chjc+TE4dUT4EhFsZ2NT8poPM21qZfDdle\n5hg0YbE2sryFTeCKESlOFkiUH8PXJTZ2BXugKg8JjSL81ZFHgH2oVf0yn7Et\nmwCgQV4fbsC/VmanMKn6rRu64ZcHRtfMPe9uVspMu2vvwk2zD5Uydu/ruRHf\n/Xmu\r\n=PsdQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGYY98o8sjZp2se3C8k8HUNJ78tHDS6C4q1vbRh1Cna4AiEA8+ynvH7Z6s02jt3dzS/2mFagtG9RvEqar57Bz0Sj094="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.248_1623932715802_0.2835727683823801"},"_hasShrinkwrap":false},"0.0.1-nightly.249":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.249","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d62d0be6cbca2185aa4999b1cd6d03378f6022ab","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.249","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-QoM6hJGhYQhs0JE7WaNwPaxBmWkohBydWE3ufW7kA1ukuSR99r2jykXUHn+JLNpT93B+MoOxLGbC76cXy58VGQ==","shasum":"4a638c910f7d4b169802e0944a3eb100b2bc9f00","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.249.tgz","fileCount":514,"unpackedSize":2211938,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0oj+CRA9TVsSAnZWagAACEgP/37FplwMeuBl5HZYN/2f\nM4k2IjiLoYYLLuoggZHFoggzFk8Nfepznmfz5vtJO+g7JkM1wHpBCRysryD/\n4ihTOGGuYC4ebNLr1Qy4MXXLsxJaJgu/f+9d6lIVUSU2x2UkusUHtSQmL9zS\nFO3sZwj0h8sFj1vbMZs8RWrR7jPIuRNxoVE487J5AhlrlySltQO/4wMnCfCJ\nIzvvIeGsbcQv6QvYC7AuvtJsnmM2GjfZsfVbZUU2CNHNfsbXynKQHt9p+TJj\nJzwmlG0wrYHqCyX4MYMVQpBU7hVBxIEHePHH494S2jT6Z7Ty3xdkqXCh/y+/\nraTbh1spR8fyzKpeew+gG6K8mD4JIp4n+Hz0owS4O/sFvKu4/29X5KJu8NfK\n8LjoYqwRpf5gR4XF6C+On0QuerqbLMBj1Fh9mzeu3qirYeue88dKAYqkmgKp\n9khpUPdNQAewS7dQ//LmOGBXlK4ZQdyXY/43xmy6rbTcZibOn7nJGkgs4hMC\nCqGFRuii1kf5SliV037ZXnuruZDxE1csEYeXbE4KUr7OX0WljOSRdKmuLift\n9hyS4SH0rSj9zU4IGLyBN9aYNCyXwYWj43z0MoJsRXVBSESMoJF3exz6jrqk\nG9wJvksS1SHYycFuszQvPJRZEGmrbVO/aapD3vb2t8TqJ0ydid+C8fhrhUtk\nbFPv\r\n=aKLd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBJCylIsDMuMBh7UEUHnoXIa74hdL3R/LS/ss5+WCipzAiBwAOEOEyUKBLugde+AX/4sB8d9LGgh42NMTNj1Pl61Kw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.249_1624410365753_0.48537769643739215"},"_hasShrinkwrap":false},"0.0.1-nightly.250":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.250","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8388a4f7b778b943d13eb217b29e514ef566b9ba","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.250","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-3p8eoH2B8S5pl1ZYK5qqCM6cO4ZMB7Expif5Iu+yydg/w4VOE4tfOtzbY+ZT2dETdrrQyA6XQ64Yexm8+zecng==","shasum":"c6e08395cb8ecc24ad72c7948b1384fa644a36d7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.250.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg0zMqCRA9TVsSAnZWagAA3WMP/iI08ese84zpXBabNXrF\niUopB1xi2AVeQ59gxOF0f/xK1eJ/45p0VBz4r2DcYThP0kww95K+gllYZhx8\nN27/ZIpY+vIGvpjUzrhr4wlbn6E/H43ZEnL1DlJcY2h2IrwH3rHBGCv4Ny7g\ng/zYMR06vbMIpDAJawN5v4sVO0iXiBgE6CvpI0rrbYC6mhsV9+jxmemEYvbf\n1DORAR+5tVwaELMyVZK5KDzCK9iOE7+QTCpD3wAO4BMJ3xKxIFmyItC+aS8p\nwwhwEzASwOn5CAmiclN6akG7imhXO/VGsjCX84tF4WaRjejO0r34QgOu8FTK\njjJQyBREa4MNE8QIYcw7ARTIUGxgix5Gg3nDPDA0dbArM69xFrPPWEaLedSH\n5KwRIR4rR1yGIyAfnRcyYV3cyWS7/+CliZkMb/9+SnieO6NVKo6tacL5XqGo\nbBui2J6Z5N1PgDYpNDOrqQ3vNUfcYCDfdqZRZZmrrO/1m/QuJ0owM6B/Pak6\nTKeQe6hfVvwC/PARK/db3YP2+qK8OUCbNNSVyBkrFzvOE/Jf68DaOF/bqyYP\nbkr25vn9Mi9xcXSZJhlkj4QWA40cstpEduxN2pUi1KfcwPOCqhHPgUDjEwU0\nNo7r1v5GyMrvAu+PQ9D3TXm03bNg/XGGKroPh7nVZASNKxoISuGLYHKZjY1S\n3DjW\r\n=PhRx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHmnXf9f4igdRN1wikN8bSXXJuxn7KL9E5U4McHpSsN5AiEA3jyt7AanDusPHrqYWqgfUbOPkJ+SbgIMonp1Sh+QOVU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.250_1624453929852_0.9964920515066902"},"_hasShrinkwrap":false},"0.0.1-nightly.251":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.251","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0787ba5b21579f606a081ea37efbce54f6589087","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.251","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-YPnqn6s1HTHflUHKmfItmwvG34njdkiP+dyLxz3n3m3YxkFMV/JrcTaD5TFPw8kqeW8/QCvn5aTUTjpe7aCkqw==","shasum":"c0eef3ac86874ffe5d24d3727e4b412d5014ad29","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.251.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1QPfCRA9TVsSAnZWagAAmLoP/05zhrKpSWV2aLhsNEAJ\nlXufUV1GRKMItRjBiGUCv7+yCZZP4ORhtoQel4WTJiDl/FV7SqiFTpqmZmpf\naeaDUKa2aNG7+BzEL3stWwe6ynq3Th2wmtA3ZTtRvcr93kCsFZj57BK1X4qg\nwDCkNfhO24phbNhObS3QFIiAkQX+KK+sAQCi51ZS0l7E3ygopwLmUyGCj5oP\nwbVIEjwLeAiYKZp1sOiEfgo3cMdUn2tySLrOI1J9mUQdsgsG3davVF3F7BUE\n4/TkIV/U6Jj6KCTzKEI8DmsguvWy/gJuiMlZQP2WoIC+6Zz2ymCocOzQ3EV9\n6eyK/c+RO+s59HqDL4JROLqtDFO6GkC+frGquwt9JZ31A125KLX4QxgXvhuz\n+LzGJsT791QGxN7AKfSBAYutCPteidpo5Oes4yQh56Ms2J5QUulpTp06Z60I\ndCm0ZUOsbF8DKCTukA4dEBdYwDW+TDMOGwyUI5hysHWyoMtAnvwZc9ppXqqi\njcP3gtML9BGdSRCVtIMaFPO1bOAptAn/XuFj06G1OTJ4ZEPgJ03cJl8Az0wZ\nd3PxowLiCyL8N7Rnj3+lQohgxfmw87aYlnJWrAxJHS9rEJ+d2NqEryrpW/D0\nOHfXOI8cYj+Y1X0ZUIYbFaI0AiIT7jtlDccorUnLv28FwtTM+w5JnqAnzR3w\naCJH\r\n=O9Pt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG1Bw4s1wUqlnhuekfOKZehM625hpglFMYVwf+cNvJH/AiEAhagr601hPx/bLmGp3bycJKpXyujazICMjBbydcczj4I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.251_1624572894665_0.17321128306462064"},"_hasShrinkwrap":false},"0.0.1-nightly.252":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.252","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2c83844b8337de1188d53adb332bfc9b3f4f13dd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.252","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-j6uSLhI6WvJhclheXLvUT3X/TV0gqph8kcvlQYjZTK/u0aek9gKWjmArZuEpjUvY9g5EkL9uE4A3kPWgyQqx8Q==","shasum":"4a93b802ed772bafecacbbfd4d2ef1fbab72617a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.252.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1S6kCRA9TVsSAnZWagAAHBoP/1X15F0rU/7tdLoL73ZL\nF30SwOi8ORENUI2c2pEgBPxnrmrIpxepp3EPQ1icE+BMLMyiju0FPY6O+svA\ndI7bSjJE9CImvk4yGu1MFnGp/vzOalASEZFYs2AlHfRJytczcXcj07PNYNJz\n4QwWa5SoG1iu18sJCNe1EiYZ3AL+iZhzzylRy2Q99jW7KTIbFV+iZApPqZsG\nfEB+lUAK4RyynKmAjc3OPpnyFqDJtHfOGEWKmHCDvrDG3dKEpZclDCY4RIRl\nC0oSxYg5hqRbdWV1Mut9/irEBrb0leRTeQngixGL2+W6Z/Y7Kqvkur2AQiJ6\ndntVS2DFuT1tIIn8a0myPoPbD/GLUPc45D24bYVbWmVVOCw9ZqQQyQfcoF8u\nNghirn69MBNWP1sQd8P4SSHLUGKzXFtGt6VjTHk2S4D/B0WJaOtZJIAjSht0\n8uVQ9uUsajN4fl7j6EiN5NCaX8tuOKaT3sD7vOl2no6iBTf1RDfu8P9c4s/A\nWBlEWQutqHvKm0CilHiSzZD+OoIn4hkk5QcFn21BPlAnX+IbUhDpKTGnZy/6\nurubaBa6J64zh2dtGSfsT2FS3DIoxt0QyjoEF47HIWBIdF5r3FqPk9PByW2U\nxrUgGgb8PsDIvwm9jcZBErrEfO8nltrfPXK1fZrI9zmLacLv2mSkJwOgI9u9\nhGS2\r\n=i+Sq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICg0PnmcJ5RFVg0G5wWeIIkH2joHwRC7xhSkFATMO8kaAiBcIFFQV1xWdH4wdE+GOA+8cOJCTO6U+B7T2G8Rv41XYQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.252_1624583844052_0.6059770264385753"},"_hasShrinkwrap":false},"0.0.1-nightly.253":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.253","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3a5445971922356e330f57913427aac377300141","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.253","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-229B5QB8ddW3Ci9EnetN9Mh2uJwJKd7PssmNS1TA/urqZvcm7mEHNB3c55JYhZkbRpyQA+bpRp+4w5KN83Cy5A==","shasum":"652f14bb01748df4989e604d322d3ae40db74168","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.253.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1dOCCRA9TVsSAnZWagAAJEYP+gPKS8UnAvmPuZEqZqKP\noQgiuQGfZvwOQ0NbiCV6Wr1s6uxH69aCLOXTfJugupP2hH30SzTJVcXVdQeQ\n2HpiN6LJcMLLJveTL+YIGgDyIYPXUly4G3UeDbzfkG/Zm01ex9sV3rs4IJEW\nccrWuQDf8xriReI4VyecCf5DnKCV7i4E+sK7/19XVsaGjNUZ2TuU3FAsiaot\nqU9FtlcTGQTkjhyOM+lDVKvopR5F0+RI4XKyJwf6/4sJ+wZOnGGd4BmMVGsm\nAzrV0sHMXeWciHmZdr0j61JVW5jtORCUMUykoKiBRndgepsdZONWBPCVXXcL\nkkzguXEFIy0HcKqBEo7YAOtHq+2dNMChY8dGD4nG/1JSQHR7nXDLINhqRy/5\naFivDCiUQR6q7BPci349nCTG5QWIh8hnMxdiHYx/CYrsCyesOPb6VaPCX/Ji\nVHUaY5nU/vRQF5W8cZt6TFVew6EGZaZ0o7xY+gSkrthNIkpD8HIuewV/yYSa\nw24Zm/6C3RvUm4cepfSbBzFwCIZJh/blUFnKg10yaOEQ3uWn+wdpzMfsEC6+\nugcNIbwv12lpb0YMYfOjxmKcbWlcPJ9SBlPzl/eJk5WhDmd9Ig9+OZ1sKCOA\n68NOQjM7qDcubmJD5qKraf+YJhBOMCzqvAax/tG+40LY9BQJA9jHYRaPWo0r\nWYq4\r\n=+JLO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAmlJQJzZ+0+slWjEtBV1KJmOJ/A13z7fAC8+eXUsqoeAiEAweMOTnwAxz3eGI0KXdKpI8NIDT/fzbQjlp487vQo8d4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.253_1624626049615_0.06513560594435641"},"_hasShrinkwrap":false},"0.0.1-nightly.254":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.254","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"cd8d6e3aecfc123083d07d7df17f8ba351f58fd3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.254","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-XBzCt3yDAgefLEMqwzTB/IsLdbtF7aaRp1tqMOuXKDawd0258HDwTX2BwHOBdv0hhdQaG7kj9vPKwqD7bXR1cQ==","shasum":"2f3767032b1f2eceaaea3109046ee6a9458e7e35","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.254.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1lP5CRA9TVsSAnZWagAAgrgP/AjXSnBR2WvAgKb/BF7z\n4lAHcxEdRw6q4ws1fjMqv6ora0W6VkQ+htdDn5l+HUUgIWepF3C8YyTXdhJ8\nFnR2OgpVcR4HTLbahYc4lMvrtv7yfSGZVlpH6DTTKPYhS6anz6TJj6MgyHoL\ntQflakb8hlWNE6UB4AjTe2osfCGYpXhhQt6BFZ4FTpLuRIqkjRzI4aw9P47t\nydESUec+/dMwDwRx06JT6qEKJlggqfsAd2FPUZ9BWaUw6ViSf/l1eJNyHM75\n7wNgl1Hcu968Htg8CdyvgFw5eMGLeCdZiBeDcrQEvfcdwQPIQsYjkO5f3EVU\ndGHxloQjdK3QxfPO8fVge4RUY3Rzix/fqSkwnsl+IZer0J8rOwGYCqwvr9UN\nbdfj5IbOmXPePP0BuDY655vkMobHsKy1ekosWR7y4VBM16bdtbv6XFwiumI3\nnUkRoA7cCQA2fvmpnURBk8Gmdg5K2A+F6hgcTESrvfgx1h+oLdaTT3nYsNAx\n9vSGnqB4OJVc2UGnJe026GTxI4iUXOIyeRT8Sq7ed4fGmB/b8iJ/ryIaNbTq\nrm9e39eYj42Zhs4GonDkv6r+K1RuyTcIuYV4vC+6rXmrxOdMunrozMSZXyzS\nqT97qcOe4aGhFL4KPAEz4hk0S9UcJ1+yN/dUE9FLDD+Rd/DUBCTN6Od+MC0c\nue5q\r\n=bcgv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3YW0ySyrhlSH71aZNHY9P31BzutrW8addHJl4xSY+igIhAOZ58YOQgcsvnlO/M3bbruNtrrWsFdmsDojVGFuind3B"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.254_1624658936753_0.8480674005373496"},"_hasShrinkwrap":false},"0.0.1-nightly.255":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.255","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b433acd5ed4a54fbf1606bb5a8327947dd221c72","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.255","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-e3w1u1sk7yj4e6gkauaOjcwl1BQk9c3tvG+lFY2pxibv0QO4h1W0JkY2je2TiV+WC7qUlVjhLXtIBNsEaAaZEw==","shasum":"f35128881de274af933c08e7ba56baf9282bd12f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.255.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg1nNSCRA9TVsSAnZWagAADIQQAJwktDY8gzWLJFaUUzIU\nOtqAA0cer2YdkmhLlm6Bw5dsLTHg2R+t8iFfw4eEAKWM4Nmm5z3L1x9eHslT\nlCs3Wm2LIMqhnJB4HB0tpIEifDHgZzL4RexJAn+WUMon8XrKxzI1PfWuMNls\nrR9JkQC9E91stbodsjljrBwlGGy1D8VZkqzXA4bU935SAWpIQlwtMkreQf5+\norIwJIzvApizZiOHQ2+I7auXcGygNBnkaamWQoecB5fb5p31kmmG+xWVaSxs\nHNhtTZn1tpGZP36ZuFsKxlbTIgV1rz0k04u3/DQIR9SinaVjGm0z6Bb4uSdv\nu8MJTP86iEEsS/ktqqpkz5bCmKn5OGZg6SYKXCeirxmin4qRS2Tgjj27aJUM\nClokvj6mUo5RvdKTTRb2/4yTCkRGki0EQwFv6MUSVnPa0g6LIWtdvgwoL5pj\n+P2Ju6kx+rp7BBb/j60X0TbdqgyGHemEntBUGUn7IYh0GT5ZoJFqDMPX8zjC\ny4F4kgzBeDfecUUTHQnXKXyFOlpDAkTfjFoS9uULRExoJj4Dv+y44QulXReS\n4T7XtDfkUANzhGKHEumBzwWP15q5tvCn5Lf3aPRcI3Movlun1TUtq6lQ8Jn8\nYLIMtqgsdDk9jY2lljgCem11MJHoVVMWHNlS370zOAiYAFaf45/d9fCW5mCz\n4wAo\r\n=IpsP\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBRuwJlEaOtJ8jwLSsh9x2j9yT69eBAAowCsBmKEicD8AiAWyfDq2gLF1MRFjfohzmN+1HdWgI75g+FZ/0JXeMVdtg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.255_1624666961624_0.630983338688158"},"_hasShrinkwrap":false},"0.0.1-nightly.256":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.256","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ace020469a6081cf48cbe3d831cf23190f0751ac","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.256","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-FEjQafmDe1X6Os09LSTWS+hm55HxnPN3rf8oeti6m9P0H0i4qOizqe9/RNz1G4aevqXmnQEdOWXE+aLIFRJdJg==","shasum":"24d186c982dbf271d5294c272098940fe49eef18","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.256.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg16SaCRA9TVsSAnZWagAAp/EQAJo7j8bO9zFYGMvdEG/Q\n8usU4fbwhWhULImVVuk/OAUm3qugyjz52VQzg/rlLiYoJf3jfnv0+Ca+jNlB\n4Gui4L9ybx997EWlfe1hPqw6RY71dU7M8lQgyTYaaVNHhd4K4PFC9sJKQzqh\nJou4AhMksjvcCmPol8Mb07KjBXtYKXY9r3ebnoIzEz806Q/vxSMXp9LzkFKy\nPeoUJjckx5vncfo/OI3OwnYFdtU2at2gYAedTcsOySGk2Odt05yvudWzBrSp\njHbd9kdcWNxniypechif2mLDmk7rO99//u3UzVjlcClE/9jxMOcT7F61DzHb\nNBXfx6o4lxvrH4e9YSO6D1gbIXMujEUsQ2/x9ezcd9dEo99ZEZl6+p/Dm0Ck\nPJHHQEbZj+zPdCgt3pP1JrLH7ukaKo3UrAev/R2cwtUhqKq74HXQKrm2FukF\nxpVzBeWf9hBlSkHQ7+J9xn2Y+RZpAP50PDHIdNZadOjJdoZzIVjvjGr3PQBG\nzRlperlRd9TSRnYjHWiBodG5WmP3eJ4OohGj/91hyq6RbYZRvjXPXh3pwi2U\nnSMGYRSvRq58Ghu4YuKNdnrQxnSXO+gehGVZV7TEhlFFrbcBTz3Z04sui0fd\nMidPj7zBc591PC/gBArv67CUCVtHd/KMeh9/9Tv6q4KQGIxtiWVJPQJlyO+u\nO693\r\n=FqQe\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAtHRNe7/mir6MOSgKXL0XVvgPkL8mykTP2EblvMYnvZAiA14SItugSFN8nyThr+tI9a3eEpoCrjq0EoHZqYXgPmnQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.256_1624745114324_0.5060371966643042"},"_hasShrinkwrap":false},"0.0.1-nightly.257":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.257","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7f5a8550c9a6d0281111cd6ea68dc7009efa672d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.257","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-YHQ1q6Ad9JRZfvj1vRoT0JWqeSx9+fyKQEK3BzqHKpuRD/TJb92OkWh8wWHg/F+g+pt+MrCHxtGBFhmmjBBcDA==","shasum":"c5cb5ede9fb71fe4e1939d3e209c71c9a4536c1c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.257.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2FbGCRA9TVsSAnZWagAAKUIQAJypPZfMV5kWiETVCSF9\nTO3HJFU0xr5jHDsoW0FqUfZMqiMhwQufmIx+7NUPuykC8Yzc4jFg8e1YJDjn\nWC8S4Lhcmfy7gPFwFtXa8+FEDkc58wFOa217VJSjFaoRCtyixQNbvvkXDiHg\nWbcg+XirxsCFM3MKvu5ZKlo+0z5T++HYBOVO1nqq8A1nPXp+Mfq/eBekwkki\nj+k0yHd5RHvG6z6oMHFraWNUZEqeM68wYroP9ugt3qufD09uqzxhL6UXqkJK\n0U0io2x8AW4EWi8D0Rqh9V5olOdOgXO4Uf1xXJ/djR5qW4egSBm4G9HLibG2\nGYJ+NuoaJOACB4v4B1POR9TgAYAfvvR30XcwbdGl0/kGHmspzdzexJFN2E+J\nSpFayFh8EariYcPGrXruA9BcduEuwFtlcS2Ab9ZEcFJB/c3cnrkQSKtqWvzS\n8oHIh0cfCGusp46hhUrzpFfBnuuaWSlE6rGqrITWZx6PxR+XJj+KLnhitYc2\nCJraO3RUxfqddg/yxsdL2HzKXGCgknxtnn+CHAU1QwyDBunWvh0MHn0884Aw\nMlLE9s6VNBeAj5WXDj+fCETwI7KC7+k+r+vf/eefk10r6NyAVVV9Fjbg/3kk\n4Rl8pO4XVcAYOPRWkVLKKugsDzH6IT/cTb8JWcETUmPJ1rOThUh/xfjNo1jJ\ns4vY\r\n=cEm5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3fBVNyGCiJzdrhzy0eg5XC95t7fDwBChuxQ7cLwQrkwIhAI96P3kbmmQiwhUyx9EuAmKtTjql/BWX8S00zMID9FfN"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.257_1624790726001_0.08405373569460073"},"_hasShrinkwrap":false},"0.0.1-nightly.258":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.258","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5e06f1fdcd5fd2d8ca6e5455ca3410fdd40fcefb","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.258","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-i3aHgH2+zFNWf7zLxYPHOCSkqJl3qEBsUiNwH7vfTLPYTfU5yNHhWOisMRGeKNaGGpUO0i4wXEiVGA45szAnhw==","shasum":"a71359024a8fa8a73871b3f1eab03b0a9e2e3304","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.258.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2IHOCRA9TVsSAnZWagAAWeQQAJ7X+9CxSEUhCc4n4CaH\nvA/ZmkRrbb0bUv1mOzj5Nl2jIb6ezjQoCR4dt9iEIH7c0rMUFIB9bUCeb8AR\nmKnzH+1Sa1JzGkU9Z7tetZhPrIzw4hKOp8tb9F4sQef6feSFB1sCujJpZ5Sj\nA+MJ/e7l1348ldImXPqadALviqjZaKvjw01heFaPFS6rNWkohFczB3mB/Xp2\nSbiNAQfqTvI3mazFHYlfLCD/14I7c/xolbk7dUrLin7X4ENTpqP7I60K6Dsj\n7w7UIQzddrVWLN958yFF2NQ/nAL7R+aF3HrHVA2OuZHxwafuTe3Ry16AVeBK\nXi5u3vwXgvEVPr2foiAonu+IaZYs9CfwJSICLAVCAz2XoOi0R7pC5nBbcOPW\ny25Lm4rhWLMbq5xgbc9nSQsEKwfYdXg5uMLB2AbjBWEpFTBGP3XPreYQU4wD\nTTHidot5rAooduOstRQ5m/L2LIYNZXcBF7I/CZpACUM0KBnQi++H3loXkcra\n82BNKjLEg9b/PIlpt3awqDPFiLgIUT/dN1FHRn6TSch0Q6Gg6GR0wcQNtupj\nMufY2892wjtptKk5XOJKDuGLJqYIfjG5WfOlkr8hNAs99OkFohIurcJjOWvN\nlJfbT9XCK6qdKD305rqNhx+VzdMGdrmw+hXDvbGWfhJ2gr1+F9dBZJoR2qFG\nWwqe\r\n=0tH7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKFK3QCvyvC/6ptzoCzRDN7YGzZlA9AOqmwAso2xoAmQIgSynTsyOfjs2I/Utr6X7XXnqWhHr2u63G0f/YlOC2sGc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.258_1624801741875_0.8336273057091166"},"_hasShrinkwrap":false},"0.0.1-nightly.259":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.259","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7c19c128b75f886d7459dc2883986c5c6345b480","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.259","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-5j7eHIUNnf1nhaCUomFTjmSLhB/SLYGs0A4D632D7gumap7VvbX3nH2ZC96oRIRjKCQJ4BOzQlfQ5GUGnlSJ3Q==","shasum":"f167d6c62affde74ce4637ce2f68751a2b99a4c7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.259.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2O+2CRA9TVsSAnZWagAAKNsP/0TDhH+uz2JeXCQcZoO+\nNZW5TTQ3G8KJX8QbSyKe09HXfKZx50+d+L/+jPvAtTWxJIjSlaos9YJ+sGqm\n57WnF2NHbMcfQDyepRZ5+i8BcPejZ82H67VDKOelHn4XOKi0Rz/GS0b89uXE\n/H/al86dSDdiK7r4YwD7q1HGEnTLyDM+tjs3GXbrR/BhIjqjH0hJFgp8tRHn\nklFiDfV9oO7vd0g36zBgt11m9wdjjn3k+H2KEsr8fPz044Chaupno3PdaJ3e\nw14nduL8s4WIjQv5EP33Qnixc8tnNyNYfRuUUIHo7fH0sDP6umOnbJDuVnCy\nrYn7+Xv6r44BCV+k4DFBPgTeLFrw3btVhLYh1R3J9XiO77RrXLwwbrAnclLv\n1ImSSggSYzyvWJrUjw07qlYW1RcW6mlv245f8JzbgFnOy5VjL+XKlDQpMgX1\nUq2xxCfqNKfaP2KYk1xSXX1BY8jh75R3EZjTJrzGTVD6F4NDZIPcjEq0Hp4W\n6wZYsKaimTLKLmojLziQmZxLJuhsBj4JHPplz24ZUD88pNMn6nQbX+PQbBLo\n4LKscvy/UFE8vC9oZQmSOJEEPGGPBNnCP+P3QXMx6snqgBrgj38WobTPLA4M\niEux4MxBx22wLwXK7P2+i6GdJPDd2SWo5vnrm3+vV/LUmGKR6gB5zaLvTUEq\n2Wka\r\n=RYeV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDvGF4IqhlLr5wwLNTYUctCgk0pghvs9BJ2aOHs51SMmQIhAOjVBaEXsjaU5HHQyFAPz6x4IJph2uG1x2HFNvxJ5Ix6"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.259_1624829878167_0.34833320573712845"},"_hasShrinkwrap":false},"0.0.1-nightly.260":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.260","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"16a3ec7b3f5d491fe016f279457d2e8f04a061fc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.260","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-DxqJ20R546XIqN24jLedhXr+6TueBtRAkJjDGVN4WNWQsUJ2qGx6HLEDtu9IB8DoI3ih4db+hysBIKjPCHrpdw==","shasum":"e345c33bcc624009a76ee684847b536a120083b0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.260.tgz","fileCount":514,"unpackedSize":2211905,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2R6YCRA9TVsSAnZWagAA27YP/1gjCPa8vnNQ7abUmLNL\nu7COGFslquXOSEnLQX1LGfhAqCGGX91eKJmvCwGxp32ZIH52DY/qA4h4z5TB\nPNNZukyQIPirc5zDufKE9FlrrpR0k+KJr0Q0DfCZExqJc2K8xKF5w58vd0qJ\nDpeN6/dT799Tx6a9P1aFhYhzbFyVfuEg/Pf12kIxyoKlCFWBeaLWGTbRmv/X\nwdTfPgDB/MkJ6ACgceRcVZ3hPwnM0E1sP+seIlX+68z5spAw+auHKkg6xnU/\n6dbVTk4ghwy74/mA6utGibNCdOIZnGO7xyWIgnHUcFewdvGrojz4nF3C0p14\nityFnP3Yum7HqVrV0xm1GIAg7MyxrGOQaFxNsIrCjNeaZVQU6PmuoFgyBHlL\ngRnSHMCU879vhuEdnss03IHQRD4Ju8DHWq530G+gvGKMf6wq+yPsb/rV1zF+\n8Bj6egl1J9Zs9ifMS4G08Lpdhpe6qidcqIGgnN651l0ea1QZyGFDpUFVsxn6\neF7jdBJvgziXcZpUCfiBi7v/iQd4NvK6LYaylLuUEUr8x7Lr8tgE5Z28fOcU\nI+8f3kKLSjLwevnRf8HTxl95z+X1+ceuTEUT4XyNK9zOhFytZJzYpU35LzR2\ngwNwRFoKb8FphcQLoPv9wNVZzUCar4JpZ/qC0BtlBl7fYHJ76BASoPCm2XTM\nUc/3\r\n=RCPm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICUYGJufL3CfI9pyDMyp6TayYpZiAJD68csblqgHTYW7AiEAyD2CZXQn3pd8mtiWKIW8hRkYpUDOfMM2q1pE8ygDDTM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.260_1624841879534_0.9609247292060066"},"_hasShrinkwrap":false},"0.0.1-nightly.261":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.261","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e0f8a23758bf5c7e0c15f010e290f47d5db02643","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.261","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-v5zcN0l9ZnYwi63sC4JZqvaLl4mQRsFRDJsZWGbYdB9LjY5fWvr6gR//aufXIdWgDT5X4mWk3jFVDXtkR0Hu0Q==","shasum":"cfd2780445f243d689fd13f1e3c1bb826a8563b8","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.261.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2UHPCRA9TVsSAnZWagAAs8UQAJA5Djw7DhcQ+m5Sq06A\n8OvKqW70oZVrA8o0DQ0uBuNXPSgsc2eeIfISigTdGMoIbMpGurwZBkrJKaNJ\nIGleHZOYm+fq58viZpp3WVBwVqOgTB9FOd8el1MVA3QR0MUsedM6fSnaLzBu\nqRNKWzfGd6Frlvi5FUdMMTzHBD3oc8X5/pRBVmYvqjsTtUmi7SgyYsB+79aH\nSplkVkM10fk7jk6UonHvm52QcKgJIDPY5XGEP5ePFg0PfKE/Di4YFm8kgWsW\n9MZ9wwICk6JrLgMSwIMGnAx3tKMfZTx9tzyp680n10IAi3nqFyXEn2X/hIEn\nYSE3g2wKEjGqp4NpFp/Vb94bcLWDcC9MvGdE3MT9ij4IWmmsjEG3fuFdIoEC\nMYbxAx8sLOg13S5qOJU+mdSN0v098clO2nz8qpYMKErCMXGtuHeq2IcREvry\noEGcqong9NB6i4ABOFdBV+lCsT+MuJYKOZ1iBI70tceH4/MvvWZdJVeM0jPg\ngkCZckHrHTVvvn0XJuMJvsEpsqR5w0OQwxSZNDNgaa3hsUF2nmCsisXENMl3\nTFZkzeJjfd9B/qC4MusdhXfWL07jLTWrQE9jA9X185jyQTXj+HW7AljKYJ/c\nan4lpBR/TfF9elffDd/TKNNnDCrrfIZeVQRHS8ch3Ib0Lyn6UqPTMIoh801T\n2MQm\r\n=Kv5o\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF+2+VrYBgE39WUxWKq8ypDBLsCqMJ2ebfT9qbrzOJeQAiAnWtn+UuApbA8SD9vCeXTu9E2jBeltsPoXcu8XnzbTtw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.261_1624850895290_0.3290799121240806"},"_hasShrinkwrap":false},"0.0.1-nightly.262":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.262","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f1799bb2c78dd09d71f594f61ab82ff640e159cd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.262","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-TPEYibVKRTC7CJNqBVTWRPvx1aqbQryKRKuDUWpypRQzuYjhBee/Vv1vcfem9BrBaioBQmYmWzS0jLhCRJcySg==","shasum":"88ae5f43524955b050281546f456d6742b94d510","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.262.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2Zc8CRA9TVsSAnZWagAARq0P/ji9eqz06UH4mr9TD5vC\ntBPaniZL0UErvV1qVo06Udcb7kYZQgTgTmkfpMjuxWL8quoRYAR0VO8x7wTn\nJ7KkchsDv6GrcqppsA0MOVNZXJNE3qjxTcKWrRch+i7SlTl6LvBJAEYV83GG\nrGoAjbY00CSPJfFTyuREU1sLW9cWb8hHZcIGmIVx6POy1NiVZ4h+mQAi0WIs\nDobTyG6rtI/UxKiPq3CjYMt+A4Yht2o7Sy8TW0kkt2OeGTk+xqwxkm3wCESv\neqME55eQR/RHscLBBB8c7hoV7ksQwK2eJGrVpx2a5Zu6fouex0/6gxSYIZEr\nM2nJAGc2suZsTOBi+Q8yzBv32MMn8gWsZMM8nKwcBKk2rHVKydN73rxUPMwi\nDwVz9qSqKEsJWRVijoY5SNucPw7MwmE62tGkvrhO1dfyilVBSUYncr8uSxLy\nNhZFA4fSHsAVA3W+AjLpssampJK/xaAWDdSaq5NDok+oSi02gU4rHC1EUpIJ\nrP/Yyj2pTe6h5O++0cBWFunmrnzbUTQCpXtE2bFvlHUCEStb1Y7w0l65a+/q\nPIh5aPqNRruAanHPHj2oXlnQblJCK8P2fE7WGzxlvpSfkwQ2PSbEmajrP2UT\n4XWsoW6TrL14uyhORrCsO3DL0sxe0H2arT5jqNDgfJpR+dUoVLNBJkOrei5r\nv6Vb\r\n=EUP7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+Rlhsy4/z0mTP7A0rrY78bwBCGNZfvVRYxO39klm6DAIhAP8ejKX9Scfq7XTPv7hGdcwooWso9cDkXEpcsLqW8aJk"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.262_1624872763895_0.7390189489957473"},"_hasShrinkwrap":false},"0.0.1-nightly.263":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.263","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2d4502f1866d18672e1a48b9c162b419cdb0ccad","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.263","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-LCxaVZTM+gehw2zw32oNNYqEx6l0dk0yA/CTbwUl9Q+Q6iwLHrHAJTx1az44IiPRwJ8TLtxWQdBNKhoCie6KbQ==","shasum":"f2424b1c8d7b07663ada2ad108f938018b7c9adf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.263.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2kuYCRA9TVsSAnZWagAA9nwP/joOSmYlPbVHY0UYkRmW\naZpnKd0Pdztl//IfPBAVh2xQnRn6hMqabr/TjpK31lmrOoPL0ES5r1BhvkdX\nPAor8SR2TKHkJmRRlpKTI+GGYCn0DYwFGmhAxPncomoy1DSQqiaKGr/nL9i6\nsrIuAQ2OErlnvml8C53Cjl9E7/pS7J+oF5DXRUXPCghFP8U8I5wcNCD/j9xN\nlrz+eKYF4RTXj2pAvuX93GTKuhw1nobP68Y6M2WYwY+Wej+DfBX6FcgbZ6ag\nmzt4Cex3UQjytKM8kmRU2OtH6F6/Ixr22tBUK0Dx6YxBS9y4GYt68YdySmmC\nwRfbBTvlT66Pv2ypM3W3p+5mxQTfpUKLtVY7RkErirAYblyB6A2+o+e7kbnV\nkGfmUjZfd8207upHJHUYWPU51UzlQrwqlzcirSBKxD21XYFk0XfOn+Og7jWd\nX2F18dPPZ/CAXvrUC+ma2NZAsVqkPR+rmbrQ9acj66uOb3pqTRsysSRB/wwI\ngMGX1iHOiwWjmSLlicbzb3WTnWXCeNcSH0RBmw16z0iDf8RpKX11Xaml+P37\n1E8LP+b7BjnPT7mXd18UmQW6rX+RQzQkybJmU29ykUTvFkkn/d+LA5B2gldi\nud87LICGrnRLyRahvt68Ka8Gx17o/POxCHPD/tNWRSsta5r1lUvOL62c+1qK\nFP1I\r\n=nBdE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCOPEEARwnP1KA+ImX+T7VcFqsjZ7yi6c7AIYcXM7QQQQIgapGeZMLrdxnvtiAqsCnosvQcT59ZWBQj3W3/iN8DoDo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.263_1624918936272_0.7912357886001635"},"_hasShrinkwrap":false},"0.0.1-nightly.264":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.264","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^7.1.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"98c99860c497f2d9ed9ef51df13ae0c72f284cd5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.264","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-nt5iJGwgqKN1PQL2sHjMLaI5DUFsR2j5yla/8OgnvKdGptH0cnhFjzEqwf/jgC7699gbRPBjVSOh4bvxZh5OtA==","shasum":"c1a47bc4c724cfc124370b3457176bc553d81efd","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.264.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2nHXCRA9TVsSAnZWagAAUt0P/AtvR6L6gl7vUQW1EAhh\nFsvlvKEVsg9B0QQIs4vR42JTc6VrBzFif9WQ7913jcZ8dZwOFFwekLnG+mhc\n17kNyHLcmuSYmOlXtRZxMsplV+ZKqqk7fw+94kdlxXBXnI5nqq4M/ePl2/WQ\n8S/Jun1aAxmsOL78314JZtvHv9o+4cJFn5YQa/sx0bIzgqf8w1hQw7ongKmF\nhgp2ljnuzWdENK8tJy9081VWgU5/OSojxT0CIV+M//UTypxpRSp0wSX49tIU\npCfOs0SAdoA9UPmyJNWiHA3S1X6ix2a1vdfIAvcTtLQ6VWh6wjx9RC/z0pKR\nSEwYr63VUKGSlPe7yZ58GDTafOdBrEQebTaFtlYz8N7rLPeG36CW6xFH4uDP\nHepIo40JPvu086dNbUMR3vRkbrtor/mGdf0ad91nVKcS+4A/B7JOxkDlz1x/\n/8ryAWbMkJV7r7R19CktjZPRphJ0i4JrXmPBa3TGm922dv7U1+CEgTsqpxv8\nVBG0IqR0xFm1SJN4CLoNtOCXQjD0W9/1yAl0GBEGbMhA+6id0XceXpAZA2dp\nHCCrxhk9MxpLe3G+F5eH803z9nqdDui+YxkbXZaXzVTm4rsjpYri47lpUhpF\nkhgLHA/AEzGt0jDMFTbTS/G7gy4uxlglEI1QDy5JtWliRl16Z8OvrxT4i4kx\nFYEr\r\n=NKWu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA2kzsXLHvgRY0pgfwic8BOepvijxNViNsH92yfYCaO6AiEAkLnD+vy8xcJ5kg6GVymlylfs5ywhVmDNmD8G+xy6gHU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.264_1624928726502_0.21788769994895452"},"_hasShrinkwrap":false},"0.0.1-nightly.265":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.265","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d7a17e1bef2c160212e0e1760fb6c53ba217df21","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.265","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-0T90Iq2xX4XaN+ZxbI5gI6pXeplFH9gmENw2azVUsOc0g/yKOE9GFXFWlklAwL3hieGF8N65TmOCRG/Yu0XW3w==","shasum":"ccd9d7bf76c294997b8d9e738cba405dbf39f4ed","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.265.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg2pCRCRA9TVsSAnZWagAAsVYP/0Ozm8GkEjZnAPWaeCah\nro1Sq322AVkh30z3DwRyfDgapFMBsbp3gYnoNNGumkFZWN3vMr2bYSPVt5+H\nnzVDSleVTq7fy9X97NxafmaYrFSnQdBPhx9BoiJsenhABNgPh6WqN2LsqbZ+\ns3HlAdwVUG5+76G0JCOQMwua1GVHD+hv4gsXn+oFz0NZuSVvIwi6cvBlcdff\nVxkQuDat0ISUbGijyeKPZYDDfbxym16jk0xRdd2IPRokr/kNiu8pb5Q6vM/i\nF1RkM/chtqiXAjU/xJ9RyAc1i5s3Ge8HpCkiX3OrnXwMLALKc7Q8NQjUoTxx\nPEh5qt1daqq42fuTunkWWbKH/HOfuX7vIZvMUwTzzywLU2fiA6+4Mi2O9CYz\nHAutDdFyc5nL0PBncb/eB1+jqF6ceETzbnUdGn70yxHu4aZBP4VEfkDskWaV\nCMvBHKdwuuGI0NGD1NEFvJsRYopsXDwyKdHhfBgvN12/hIM2As2oATNyvRkN\noNKBBtsVBOQ12JD9UfZ73djdxo4J+H1WTC7iD5J3Z1af7rLRfMToiN85JuSQ\n0BJf8zie0hTml2iW2VW3+XX7fGLwIsqB0lxnG3nb7EAwRU1DB8u6bwN4M+m/\nQJXUDIXaqJHzLdvlBaYIJaMIuHUm8H8SBDEe2uLhl+OMggnJowzN2CfOqf67\ntw1/\r\n=CDUI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFAvyhhipAdjqrcYS1VCoFHVGwTZjxnRPHF2r27cwup6AiAu5D57ifPCpBvxmUjAdZa9y4aDf3USkGRMUMvv2eAMuQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.265_1624936592982_0.7428249305663652"},"_hasShrinkwrap":false},"0.0.1-nightly.266":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.266","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^15.0.1","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"910825bead011669ee83f3fa48573154524fd2f0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.266","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-PtU5Mj6TshWGkcPjgaoMOTxlE9WmvnuMSUNUzTFyRlh5h+rL5DhOWNPxr+uCFQ6xY0OrISso6csXlE0WH5uOJQ==","shasum":"c940a69cc95e8cc712fbb7abd625f805b6da4423","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.266.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3wUBCRA9TVsSAnZWagAAUbMP/2PtDKDpvhNDE+qQKW9p\nhafVNDEBpKdGTF2cyJRb/e3Sr/Lueytau67G+wyTucTITBA5708xhVY/CqOB\nUQ7AeX5Q9u4Obkj9yFNneX0DfS2nhyjSoLtd3nzj7AfMQ8IIGme1zasri9F5\nxtmXw8/0P8IQFrTklmhPJrGV5w1m91z6Q5x5fRn4Z+T4n7EAQHxlkVrD6x5C\nAJr6rZa5dGK+T+NkEJRLl5xVifUar8cm4/93mrCJkD78bmmvqwKRqDTMv9b+\nBgflo7yOt9R2acLChbhBhh1muF8sbpb+tWiM8Ybz5d1rupvMjjLmaAMdBJCV\n0g1T8mdkFKCbgJ67VEgO2qxbd97ZkpHdS0jDSUMo19yFcY6Nxs8iODNMuz7o\nepjR7/ssayccIO+pk015agXQ23RlFWKeaOyA4l2LM30Xk1GfqIgaHk2L5COY\nlGT66pQkGDxsTCf9wDBBWBDoiYKe52Zim3WrIXc0EoMYILEC5veuFXtHbyxo\nFIYksIzWnAosInga5HMaeAZL3z4VPT1Mpht0ewW4+H2cRJ4RNe2UpCsrCHuG\nHzvL7bgqayzlANXH2qgp6AIAsv5t0XiiGR8XGYGAf5Lo4fMWJ1Bvei/1nhVm\nZMWHhXBegoHbt1C/ZLRGgB4zES0Hb2PK3y3DZ8dWaHVS5gSbq/7AoGSNt4OR\nvfYF\r\n=RHKy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHcOkvirzUXuP70AgWJNp+/9WinYpxYK11FaMeSV6HdhAiBPqO4MEaamR0Iu1cIqB4c5hB7SgT1agJ7nIqWtfLHGwQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.266_1625228544567_0.6829854152054744"},"_hasShrinkwrap":false},"0.0.1-nightly.267":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.267","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"75c0bd12f38d97ae8c85d0b58bcf2abfcce05202","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.267","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Rwl8Sk/PiixevUjiHmtIkl3h1JenPCIXOaXLPy5PpjMAkuErDnphubcvsebksgMVNLodSuZMlb4LJlh9xX9rBw==","shasum":"b689998b7568f93d2995645a3a062bd4b208f185","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.267.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg4uh+CRA9TVsSAnZWagAA3REP/jkGr96jiOxKix6xiwHJ\nQn1Vb9MDe/jaHyANduHWphPWcU45mo712+VUJGyo3URBplOVghqKFJZ+5txP\ndC3gB9hBEo8sKlGkLyAyXKq0o7l9JYS9aOEyWG3T4/5yccP+sbWlzeJwlruA\ns+QrN2DiJTwAga9FHGkUNgZ/jnaJICmK6H+NbjaPXQGCalAfZQmkUc4IkW/W\nPtb0NLb0yzjtztWWB3Ip7vPJk+sGr5GKYN110MzL0XVb2uQycxIQWuflNkbO\ndVTDoBgQFjAG1GQfTSk0O8JgqXh5rZHkyfUKjUpkkRelaRiqDEx+BHrcl8sj\nd93EXHlqLcEaC9y8aHX3uZWe84DTehbA8FgAbIchqM1Z6jCzLitSgWPeNyyb\nmGHagGVKqbYsY6IoFUHTy0vBZpyx6ZEvX+PBXZbPAbZAOU8FdTWGmJIN4FTw\nSbZhZ7M2mcYCVmMLKuufMeYxJn8woQg+n7ix9cRGbFIeqc0WG5Gei8ZZmONn\n+Lz+pAu12gnOTJw3rEBF69yBLx12Jm17FfjbfvVAy0+XyPErCgUTQf9Uhn4z\nFgaqFUTpHcPJjZVtQkeE7nnYhKtIVHarV3cJSyRTylfcKOi1b+WPO+j9uk+A\nyhwvCeJrmbTqG6W7Rq1j/aqwAz/5kYugKaLFUe5a2EIYHJopZ2ONmW9ALFsQ\n/M++\r\n=H6Qn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF3E1nT1J/Wp/sJJxeVEYXipLpGJOowO/xb+qXfMZ0/SAiBrT928mHr+3IA0AWAYYVXIEyMiVUKezwnsH8TYdKCDxw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.267_1625483389848_0.6966158333686523"},"_hasShrinkwrap":false},"0.0.1-nightly.268":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.268","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9d0307c9ea2c5f4f279902f92328d6468157c748","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.268","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-eMWDkYZCmPX5UeYqGUDPrnrt1Bz/8LVovEDYmzHMsLaTkuVKbbQl5xnNRNPWKQVlaq2scuwnSnngi8p0ZIeYeg==","shasum":"1f9b360774de65479fec338aaa139a10507296f0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.268.tgz","fileCount":534,"unpackedSize":2533546,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5dLECRA9TVsSAnZWagAAe5UP/RXK/vX+nsu8kmxLDKKP\nEkVH1rBoVmySFoaFBTtD0IVfsEZ4gUcfV7nAKqBqKrLrMXMhLTuc20i0ichQ\nThypB+jR4BvGXgYLrjhlAfB3sB7kYCM4fNBt1zVUKEMJi51FRsUPbgiYdL8l\nNbLb5UiuBl1I2/IL+chIJ7hz+iLnKvu8riMfn4ih+G/UCtviGOvaTzsUmRre\nkubpzKCZGNVCscSEED2B/bQmZ1vdYM/jf7/8oHRNp4Yv+gDt5b+FIAnRbeeN\nhZ/kKVBam9yBkktDNzmXz25UqvXc93q7qcEVOESNMNNBFaCT793SZ+mahtxZ\nWIvEGwOE+TRfUl8ieThsPDyGqiVL8z3mj13ke6LMLYGHD8GNg6knIrG8o9OE\nuE/Ioffe6ZEHFyGCHSyE4oF4Vkc5w4qo9sa8a3CDweChJLmf5CdJmzwZOCXj\nE4TgwWlOfbrcJeKE17C6sztxo4qqRlG4aGOXIDI68boYHTOBouldNVdecb10\nD6Z45bQaN9qkR/4xK0qVh7rl1beh0ilAZVbn2ASWqy006BpEf4QuGunfnOV6\nruBUNiRYwDzdJN8fUG3TDz8JX2BeAA5mAcPVVJDSc7KIpIZhVP1cK2yYInEO\nLvzy9cgizSctsUqgz/JJhe1fATGZ8cqYlC9HCrrJojmx86vp3I6SiOvf5/mN\n5sH9\r\n=GArb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGyWWlcNdarihmxgLdcmjtvdgW+NP127X0rkZLvX+OcAIhAJ85hHbTljR/09rkMuewg3O2MQih7rPmCkQmjBZEBcYh"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.268_1625674435854_0.09189573035864185"},"_hasShrinkwrap":false},"0.0.1-nightly.269":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.269","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e5e16fbc80642da9f4e472fd4494533304987275","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.269","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-ZmzX79EAymK3vZ44zi0rCUQXMmNZch3gySwT+ffuKp848gJ8nqWqGOUBmKi1TJbyEY5hQdiwNvR6RXxP1/fjdQ==","shasum":"4850d15aa7818a9392e993c542691c5966269568","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.269.tgz","fileCount":534,"unpackedSize":2537708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5lIYCRA9TVsSAnZWagAAnH8QAIDGJw4a8RpED9XfAwyb\ngDhVd8VZ9oOkxNfPNlL4gVLG+r6Q44EmQnTsZGaoKE/ZOWhj//pvkc7F5X6/\n7F/u0YzP79pcK55T98wCqmkrusm3i+C5hDLoJu6pNsfXt/0eQcmLq5pWY1UE\nwFMQHxqApQk1eZhZ04rFOgp1fbqrh1j2vB6CbmLU0GEDGBFbz3RoZMstsATO\nXyZbX+IY+UTLfVP37df4cceBE8sGgXkFt4N9+/1JCqJ6a7LHJfZU6Yi7u3UZ\nrEPoQJS4bZ3KuYo3tlS/NTw56gzQguShUudAmu3uNqb7vYLBzux2SQaMdKfv\nyEAlqtTpxTGDOyTtDNQc7q2Tjmv2J8FURTF/MjKRh4T7nm7zI8Cy/QZJ5OP/\nQWZOsWlgqBmnsC3lk7Wk84xtaPWNyLEI4HjmRQ6KGjDT7zJHL4qAylWIaY/v\nch15qM0kTDVaOWnVoYWRsCXYgzEaYK6FsFbnZu3s7gjhZHkGzavQoPZq9xoU\nX33jt5FsdhmWUXcx14TKUgckiGMY2myFbggpviIEpJ9Ib6UjoleU86Va2FPu\n4egGYIwUyf+HDFtndpo6OXjJLtOP7seWWIF8bTdtA3Y9gl6bS9OAEGYTM0u+\nBiCxWteHRG1b/rSHyAHOa1hnMV0jOPF4lQtETFzbNaYObJQeGYl5tFaQ7Re1\ngL7F\r\n=gie5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF+FtRVVWydMeo70CzDzCekONmSNxEnxIqVU589ZXpngAiEA7mgBAIaZL2J2xvIbH4Gm3/dMhdJQLQVhJwTJ1PGR8Po="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.269_1625707032024_0.9382200791830284"},"_hasShrinkwrap":false},"0.0.1-nightly.270":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.270","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"82a7129373273061f517c005fdb03ab5c2a51ad2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.270","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-jNK1JWEuClAlvkpfweUqXeKxN2Show1fA64IPagVmfsqV2LAqgtpCOaT443h0h3Z0RFKDCdB7ju//K0AyfvH9g==","shasum":"550ca156b7777182e2be3d26568eafcf67459513","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.270.tgz","fileCount":534,"unpackedSize":2537708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg5vuGCRA9TVsSAnZWagAAjfoQAIwBd/GEp5FUECzPyuVw\nGJZxu7L0oYwA+Hqd9NBWSbnpxBFHPAIpxHEo/kZ9nbfSOjconGRhcqmvswyM\nHZDyijVza5BjoJ/lpT6uG1h6gAmzYiKzM0N1LKMxF5Y7ZJTjXPeUpliAQdxS\nK9GDLYeFTYKXXvkqB+xNmZ1Y6SsxuIjJJr5ok2tq92p+OJBbrHAkNUeAXnpR\npVWm8uC2q6OJsXH6Yy04O0jXK5esEwtTDhr02iDoZZv67ijO3MUaQWb/164y\nObwlaiK5WRw6aq5Dw2/UQlxCb2AgPZjJj5+RrxT87mUstSaOJx3GznU/CDB0\npEpZnS4th6hXQdmT2WEmaC9cF/K2+dG2vtIfATA8x9QzXuRwlkLO8pem8kwO\nBlN25NeAWUAoAgpT2t+8+YdQozG9Wa+MWhNXPRKhnUDcw3KQHPIPVzC9xebw\nfQovHxQlP3rlXNE3TfM0LHG4P4lg+XwjQoteMGuqc78qtciw1BWnYuwsazhA\nXdHSETenboYT6I49C3Zb6MEMa3U5hq6ck/G4jDL+k+7H7wla00dKHpV7Gjya\n5IP7/EsRoOKrLBZBdEYYqo1FLEsa6BvdOSXP4M9KaVADxdspzSo/G538dZ9a\nmW8dVRymxGb3/crtl5HEPlv4xGtWujEFaNkaeKMslvFA11rKPuyp3xmjP4sY\n9DjW\r\n=xdu5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGPYxpJkfOrVvfhFSwZiIJp488S0REozMYMkgRrYHVAcAiEA8PJpJTDYIVk/NiKKTaaU3DHf+vFZCTix/ui5RVt3IUs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.270_1625750406022_0.9314701817645143"},"_hasShrinkwrap":false},"0.0.1-nightly.271":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.271","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"de3ce1ce9039d1fe1f2e06758c5ffe264a0b4cdf","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.271","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-IajiAMefCAKdVjkiV3Rrb93XfhDaUdp/0yrioviEnjmJmVBXtL9fAJGYpZ94/JW7lRJd4MpZRHjCPs6TgYbYmA==","shasum":"8ea6d081d0671f098e663bd8609694e89a188d7b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.271.tgz","fileCount":534,"unpackedSize":2537708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg50iUCRA9TVsSAnZWagAAZF0P/2QaCQGJMdyLf+2piaH8\nmmCzO/za2FrjGhzCIN3jU0CmWubi6P4+9tlcpeWL8TGCBNWH2rEVNtNfrOfi\nDOoEAyySA8vlVbzVnxg5ltpdGx7IuxlP1DPGfXgMvepOIF9JnpMidnsGsA75\nxSLdkxKjcNi5RbdRHsMDWsakEvYddzypOlw6ZH3AbtvJ3WRpdlJU6w+1MQPE\nat8MqfSXGa1mJFudOb7BCq7Mj2969/mzHLup9Z78djoUH4atOhwR9267KDOk\nRwiygc/c/faw3rcT2qRztcgHob2ksDb3+9DY1S9pa2N3o14BEv4zzxwe8k4w\nMqynzCYQIrfM4W2BXWCCDrL2FlMkph4+IVeRPFORbFGMFdLRtz/6fyZc3QAD\nEXkzeNT3Vtpce4vzxdoL4YOgv+fDAD1fyhtb0OxgyqyhHXK/0gAYe1Jox7jp\nPuqbk5IrHkFUPrVSJgX9wRPwLZRfRcsv8ktNrhOj2Im4GupxhyUOreXVx6wd\nGelN+JhrJ9UKTCw/cQfVjgxCsTqkFtYf4ZNIxoPSTVYbw3N5hqqNMB3lk/FC\nCB7CQDCb3BChaLd9dqXwzR1OzGt/WL1zxR2rXl/3RCKHwfCw0eks8rCJMl0m\n7nRrKWfD+DmuuM4sVg4Ql0ayAMwAC0chgoDYSvnyqKCC0aFV0tkHLLrxHWpy\ngch9\r\n=Ww7q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE4U+ubhCmdQSR6LXl6FnS5JByXpNzx6ktqhuzYfMS5mAiBIqQIFPfpb6DVPupn6gu6UoyszlI7ZnD3W55xF+odYIg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.271_1625770132249_0.8609213426261397"},"_hasShrinkwrap":false},"0.0.1-nightly.272":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.272","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"101866debaf153828aba18402ad6085a7d408a37","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.272","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-1fBcqCO0LxUBZVF2WAvungLom8BtuzjVVHsQZj8wH8b4cX8wP8yLTEkEMG4FHiW6HG1cr0OhZ4fr2tD0u3sEIg==","shasum":"61e71afba4acb144248695acf165b85e81149fd0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.272.tgz","fileCount":534,"unpackedSize":2537708,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg56myCRA9TVsSAnZWagAAdUsQAJQsOfe6B66x+bcfvIjd\nfFFdE7FCjPnPF5JDxUPSkQOvx1mMVdRvUp8rxewGCITeskd4/YBy2vFSE8nX\n0LoqR4V1jkNzoO0/QsId8Sv1oGykeAVAjnbbWOaRpibiwgMRrNt5De9WmXsW\nnuGdMOsoDQjXs6ZdiK0Nti8tFr7S8r/xPYXvHjASwQZtGs4k5nhAMR9i2QdS\nca7mjwXfUibzY/ijIoUjZNnbphIZluDmUSC3VtoGZEyk+tFWp5R1An+wzDDQ\n76N5gUzAdv/u2DNlYmmgTIguyC4oX71EUyYAWKzH/pJYsvRZshBApeRc2Ocj\nWZ2at1m9vxDNbDf53W3kIGgeX9o9/2iLkVg3As8SazguBxsgw4ioz3ylIPft\nDffaRuC5JNZiJnQiq+lnj1FWj6+L4/AtM9ekZY2eUvEH4fflnJNSeTU8UhGc\nxtMVDcDsWv5Ek/YSCbuPBu3N/gs+fNs7PpYBU8YDpgmRlVSspIYfGyTj0SA+\nRoQBLoQnVm8x07JlBhmQc0W6yn/4AKPucn6l3aAyyKbNY3kkts3gw5ntFIJI\nXZiZn5d5/I3/jmd+0F3zYJ128v3gpPzv16FomT1XW9QgGrXEenfdQ4qRU5/y\nKGZMo1JowWh/nIKhcE6M9v/IjU4GTywyNuoGIJ52+cF1VhlsIpdNbWbpQSUQ\n708H\r\n=lzw/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGNbRuYnPeAl2kmmBWuO4Z5ZR+KPDb28RSr6/ZPhtRDsAiEAy/N9yVyu0KRghOmtPBSvNUnIsP8SJI0IanPbtrDwM/k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.272_1625794994069_0.5766171187633786"},"_hasShrinkwrap":false},"0.0.1-nightly.273":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.273","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"feb8b6225c11f333214f90c2553e50466741aed5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.273","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-eByzPcZyq5vOdfCYc0bfsslh23YyaGlh9ByB2/EHoJ5ffJ3pLfDCSrY1rCYSY7z5pZnSVxF5flo9iY3cjP5yzw==","shasum":"c342c03bb28f4c5b17a753658e3be98e751c6821","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.273.tgz","fileCount":534,"unpackedSize":2538347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6F57CRA9TVsSAnZWagAAdmYP/iEbP/0KKfME/588+Z0Y\n/KYoG+ZMmSLMilj5CHHWFvmxefmcY9YkOhPb5PQ36uhYtNCdLrVQdrlZS7sy\nokdluJGbe3uO/oaPZG3mqsMf+5EeyseHWk42Mmmpp13kKm1DH3bdDh35BqXI\ncA3voMO621dOeVBL/lhFTGEARibBWLhoGqXeGcLdcFTG3y5dxuaYAHe04ngc\nJdoj0L6vMDmSkJN/EtNmti1QBv4osHxHehnP8k/bXk4uARhU8vZoI+HZL1WP\nrfL/fve2BpPv2IcYLmzAzmMW/hva9m/Uqpl2Zv8FRh6YOf8/yFBbraXWQfKI\nteQjFpedrfDdRlv92MW5YYZxyE26LXg0h5R+byHfeLI6ekdQTK/r1L2B9Vrz\nyTeCTjxP45VqZ5H7/q/krw/PuxH+xfkb88o5XzP0REJlOlYd7tuI4pn+GT0H\nvhwQHlxyeKJVllMJlHb7WdiOzqpO5p2/QdxuqUv9JMa0Eshqsj4wE+kho4Wh\nHju4dYeVEq/kIqkBtT3fhlBllyETBRYquVU3Psekj+nHd+ubLsNe3YQli25W\nEh6tlGKOdjl5faGyQzZxMjSmb2LpaH3IJpGn2SyZA5n+C2T/iA9TktGKx+mg\nd/4EnPFCK1fEeoKOjINRhxRb4GUuSQxNQNp2Jtv5HBbVDRTvh4ocyBQDad7h\n8P9/\r\n=8sOu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDaywsjTui1NSC8i+ePZpyxRkiApXbQ92gDEjY7FGBq0AIgLc2tXeok7EsuMkMiXbWoGcAWAlyyDNKXQ2ZlphPt9hM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.273_1625841274711_0.3296331971651101"},"_hasShrinkwrap":false},"0.0.1-nightly.274":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.274","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"23005f881dbf8672e65e837187ce4626025b18fe","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.274","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-H+UnSVupjj915OAqkJ/IXPkZ2qIQZb3B2Jct68fqNDv2b61KtcM0yFpQg9SDt3rNf4eGwaAP4tactew7TS0Pzw==","shasum":"1dc9a118e5b7f3c6456c1da8da80e086d1624fc0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.274.tgz","fileCount":534,"unpackedSize":2538347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6PqZCRA9TVsSAnZWagAA7mwQAKH+jp6bNuoY52QMO/PX\nohBWHPzMQGCXIAGxP50mwiDXy40XhJy7MuPPNUWKHzTw+YMXPFNT2GgBRxnD\nLjSOGAlpx98k6p9xSZfGy2o7mQLP+VIQOdr0nCiZ4s77MHhWvB42yto2F567\nLSTrw40SeJlZzgvW5EcQtqEqAk3eqpEZi5bs/tOC+3kSBK6aom3TEcO/YBbF\ngcEINL1MBd4X+e5qmixMDCGpeYA1/ixJvUgRoASJt6OTL3o/eB5eIuhwp0wS\n3GftgBe+8p/7bq22QgGNQC/6cwNP4l17HTTZi9Dh1Itbp6IRqQvDYzN3fFWd\nFykci6tSXYOPEKs+vmQwK0yFa/0rzb1h1x2K9fI0EL0Sz+gpmiZU1xxsvd+o\nY8tJQsynqlCEa9RpYYk0/Y/sf0xonPZi13CDqejOg/Eg02lVrNIvuxXTrV9s\nCFSSNS1KEc5m0DqBZLinNpICZUVV4xT/ASRrmIWjm0ddi5qbcmzOShd1owb4\nE+JvcAwKM1QS5vM+xhW+DtVgIKJ4oyVbMLNM8EUQgZuI3nbPGHyFENk+DM5A\nzgpqVphb53VmzDgINnYlGyOFyuP78jkBCHk7qBFEkBj+CZERksjx1qxqoSme\nJQ/s0KLPEqrxO5wzEO/hnDQmHcQyv/5KDsbU34S0iKeVwtLWPLn+Y4P8XS0x\nITBV\r\n=arFU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA7EXo2+PkiQB3SvRfPmwdkZMtT6wH5dBXFBh5nyRUqQAiEA1XaeBNJ9pY36zIuLp+jKdfwk7ZH38outVZE75snMzIk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.274_1625881241309_0.7223194665878359"},"_hasShrinkwrap":false},"0.0.1-nightly.275":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.275","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d4197803455c5ccc8f4364bbdee516e6dfcbc1f5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.275","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-+oFrLxuakXSt9Wjulegcoe4yXfm0SEBeovutqcxSoxmyo+v30Mun7ISC4jqOWuMChOv45m0s8ChLVqlvgo2rWA==","shasum":"24c71a37c6c23a7feb517d28fca9e64d763b126c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.275.tgz","fileCount":534,"unpackedSize":2538347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6d4bCRA9TVsSAnZWagAAcgcP/0zOXfY3J4HleXFnnwdI\nv2lfsmwRn9ePEITdC6F1rLM0S0g1W78XkI+K3GhxMh/zk7iJ0ECGP0mE0OQP\nXa/wWC7+IJhC7L1gZnwQRA+qPARXJehSGOVlE8xSY+2Kh5rUVje3f4nhWAoV\n7v2+zvA6JbqEgzjSVeLW72oNXeT4KkWlAxI8lLK+4y15wnHvbfCPJcbyenCI\nUNLmXhGszexT9k1Cmr9XenI032xmeZhNve8pRELA9OEwJQWTiX5nzoumYIwm\nTzn77FuzwKYV/+xsdWG3YyPV2pjPWT4qoLd429lvkG2P5r2NfjTYeBJ2o9la\n1NlccyRw6zdiK+TabhgYuRVrH6AV1m5UHsX40eSuX2uvjamWvvbcm8kr/OQK\nYeGVPp5FV5LeJEYcs6VtNDh9F8F6u+F3NI7dCYNWa6mpa7wcl38aowz/2b5K\nJRSpxmFI7vwttpfNsUhgztZ1hAE8vGrTJY0iKL6jAHv0jpaOiVTR9y8DybjJ\n5k/OedAW1VZXovc5Ta4kvC7F+6xYBPWV1VfDtT/dLNo/n49+h+5SvitqpEb9\n5Nz7+GnHwy/w9SjcNMzEF3eY20M/1ePma3DJPIQDB+GvxZSKcZgj1BKy7Vi7\nLCfXAQK+i2EYlcxUtmCRCdZsghpXPmnkTs9K32V5D7FcrJmwziCUGcD7bF+A\nmoxC\r\n=EC8F\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNfYIGqa1pCi6xsRK8Ow4/Tcg6sFza4UsriHO693R8OgIgSKMPZfy64W5bBCJkDwSaf4+2QNkFrtcjtIqiV2fj3TU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.275_1625939482649_0.9313560193727779"},"_hasShrinkwrap":false},"0.0.1-nightly.276":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.276","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"501e101bf633d0189f56bc8bf76bdab6dde5065a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.276","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-dM5hGvzp//GzUxb/e0XaC+2LqonPhW2cFSgK2aFoHxdSWEnL57lRD1cVQOToE1n8e8DtGDTy4NBTVsmZaalVYQ==","shasum":"4b4cede4312f2ac30a0879e939dc537806d868de","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.276.tgz","fileCount":534,"unpackedSize":2538347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6kl3CRA9TVsSAnZWagAAAhoQAJwn8zJ5GZ6+jAiar/WO\nXH1dQYcYFySoiFP5ShiFUioJGnxQ68qhoDABRmJ2BkYCM6/sClXS1w1Gu0lS\n8wcmD2WOpn/emY67NqF1mkQushEc6xvwDYIz50dCP9DlHRmhCSHVqNuGot9v\n4qKZvfwJo/5Gugmx2bqRbVS6NNpLZbMNCRAp77vcnKvvMjxOA1r157li0gh0\nWteL6jTpll00TVnDf1KvQPzz6o3buA9ma9/vi9xW+0lmdjqXi7gfz2iheVQ2\nfe3VXgcQ3hn6+nC8x6OcaSckrlBhvjqIeMLzteg+MyWgVzj6l2wYT6LBY7j0\nVFpAo6IJutp/w+ehyv0RPGcSS1qLGYoDV15GUx2iaHDMpCqB4pch3x1f9PxT\neo6Br5J9bPNUaq5s1nkrwy8hOAZXh4En6pU95IlGEVy8NwWx5CMrKIqAt+Z9\nTpjnTBvaszfJRdWuGCOywAXTYRX3HPgsl8FzeX3qnpIiQlCyOoQ8Y5ypgf5Y\nOrNnViQ5EJilOfCz1kQsW4mUiGaL19ylchfNRAirM0mmeev8UOlMPkLdNQUX\nh0exb+FgNumYeltYgwY0301APHJr2dEypCIQRNc6awpoQtZB3EOyjjx4eHlQ\ngN0IeLrzkvCiUd4hB0qG73VKoznN8FexYL0gV8eCVyVwykmsTRVoEBJPThTs\nS2rK\r\n=WYvK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaskwOalZtjo+gMwmXffyC33VfQmCcA2zk6NNkCSuSAgIge5C5aRjTaCNx0JhsIUfRaJRLh5h8W+7cGURBuzm2V5k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.276_1625966967040_0.2868825777750792"},"_hasShrinkwrap":false},"0.0.1-nightly.277":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.277","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.20.37","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a82f1531701ee32b38969ac58b7de3e03296dca5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.277","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-mQlJ1cBvfqqxhfFLO32XrBrWjbuRT+tE8FDCc3u9SqAv93v2Z2ZeDgyPiM23eUQ+7J7Dq+Jodl9axoMAKbr4zA==","shasum":"02900006067634c8403ffa354f665fe970a37ee2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.277.tgz","fileCount":534,"unpackedSize":2538347,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6t91CRA9TVsSAnZWagAAL6IP/31T/SESPLWUPiR5G2GL\nk4sVENjroF/j5/fmVVSQscgO2JbmI7B9WMODbsDFupe/T1vJnjHyymmZEQfn\njNpmBMtgCmsqfou3oWylSqUA5hf9HoBauxY303erxzju34BK3S3xfNV3DCbG\nLXrAVEGjUcl6a0p9WH3dioukvcQU5FZ1hM7jeVIedYKunwTLkdG2d+uvRfhh\n1R5p2l0bsUeJyhuviq/VMF4OXXHsVaoU32wg6SbzV1A5ovXTJXlr1+KIvzz7\nRtm7CgQLm+V5YzK5z351fdLMFmgBC4efNSE9nLaflPPa1OtLCxdPONcOoSrU\nz8RPk9mNTxwPuyHR+5BF5mHB11bS+xOCLWV6zv9sz0TofDjdPYCGuGV5FvNS\nl8ADXuMF2JazkqqEblbId3fMUEYJKBGPlQjF8oVyrYjGk4b+yh3RZE1AfXgx\nh4EtG9MHUMq+3DhaqCvhi67EC/f6AFNCfN7SQCDR/ncZZmqigzwrwvMuBCwy\nMiM7u9dQ7WdBe2N7jtoA2WzCTpuOt4ZoWg8Dk85+ftl+/rX4nPU6bhVb9wkI\nsNPYbc9lea34A0SE0rpd6NAqNzA5E7dc8xTyfCZnHaG6Iw8uH/qelDgrhrdt\nwEwDUi/OAzLUfEV9lyxexP1gVwaJEboM66dvpjPsiaQNWN0al3VZcRE7rR/a\nQpR1\r\n=1KXR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHYyx29ZErf65+7IeSa9h7zwfXq0aMfdAJfgk6+UiXRQAiEA/qAvj3sCgPezYVyJmqYdCNsbMYRNgWbUZC4HDBoseUE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.277_1626005365249_0.8535080113828926"},"_hasShrinkwrap":false},"0.0.1-nightly.278":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.278","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.0","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3ecb93e55afc1ff4d551407fe95562947fc493b5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.278","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-9Af/86Yn45D0D9iPhHBJTeu3VEFcEMPUh5mh4eglYVSHz/i1/NB8POxwMOCj+NCRnq34FJLQbA8FhjdN9pec+w==","shasum":"63ab8989484ec2ebf421de4bdca1238f097ae0f1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.278.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg6z1tCRA9TVsSAnZWagAA3eQP/RpH8WWE6KuWFD6qMBuB\nCkD851lQP46d4MaYqshZrhq7cxb7MicqzjC3gYsHzAxaTje2oC7PCETEeE+B\nDVW/Tq9qSQytf5C6UTJolIODf5SHg+0vHnxH8cI514GahCDYTh09+N6MHbPv\nav/OwNxnD2xXteBW91wogojQukG+OL1koExivvCSKfgTqmKVZZ6E8eP0iRUj\n3oPYkfkPzSnJD/sJqjU6HICYwAxpbK8v+M2tLkhoHh0+qH2bSKoy/IiJpQA8\nnIO0+Gw1hWPFu8BGKLGfrpobNaL+0uSq3h7JqojPFhSal3rqm3NwTpliJjbA\nrSKxVNcB5hbYV5prGOe/0IomwvVRmWDXvGdNMaIHDchPQbotfOfxxdrFtqam\n9yUrXXJI+ccrtJZPTbyBgZLJCC18rQpAiPYURWf3k0FutDpjSL9xxVZY5YJY\nCDDMWuSxoHJWW5BkGoB7hjLVIXfHPoBG1JlIhl1E7dNggVg6+GpKGTauTJJ8\nS0b9ooMSEylPOYvnOjS/ni0ktgRi3PhZ5WIE39C0W3i+ZghVj/Q6XdlyFKPJ\nx3n5SVKVo3sZbkNMS6MxUULMr8xnRT5G6Dnl91p4MGvT/3tsba6Sh78VaWMb\nimLx1SslgZRivK3zjvUSrX6FgzFxqAW0Knljs8l2+XnY54ezc0BDhVZfTlZR\n+Okz\r\n=QYWQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICG/v4fa2GaFPkQ1sOrbkz957gmItmrdkn67mO5pfoxuAiAqg/rviSK9PbtGmDI+sTP9EdD8l/4vroxUnOEufQCk3Q=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.278_1626029420492_0.42866800633974433"},"_hasShrinkwrap":false},"0.0.1-nightly.279":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.279","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.0","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c142d239bd09e01a7ac4ad49240d702862d1cb36","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.279","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-rPQpiDxGzXDKamP9eaoFypI+a2XjdgBuRfPtLKIwCj/tda6K+7gpsjHdbcJ8d2PjrcgZnf72YYbjrVjdRoBEfA==","shasum":"94b2bad2d465c59a53e93ec0b198fcf1ebaad298","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.279.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg64XFCRA9TVsSAnZWagAADXwP/2gQ2epK2nJIWgmH0BBr\n89UkBj/2MOLoEBDPKTC8cNXebDOC9sR53oViVKAZXFIwuGLuFp05Z6dpNZHc\nxGHz0wCnFTYFO4RJE6ayTWrPtF9w7gqE7QjlNQHHzYJZKah/j36DtwcJN0ZW\nPoc1MgeV+an1omJnDpkTo0T2aSsUAleGyr6U9t2Qbr0qju5Eq5yWd9O0jmZS\ntQfAKcslmZ3iJh8BCzod9VT73BtX9cS2PAKPpDy2AP2d0KovvhMRKMHr9W7t\nB/D8YkxBpoPZUpGZcq3lAWf9J+qaKIIuzvg8djZE3MPMq//W8rK7+N0y9oTn\nna3YJsgdgYWhjeuhbfndAKMoWIPCBwH9DpTabpra2B2pvtOXrvTGlIY6IOxB\nyL/hCbvcMyzhfrfKJk1K52QAqu+wOsW26Z5zza9p1gCN0rPEgps/mToF2ktK\nWUx1jKsDHEjzAcYWvDDAThUOA7UDnhSQZvbRAfL9uB8YJmiz3Re17bVwBqXc\nPJEaenesCvvxbnL46VYT9xql24J+SyrY25UDdV1bFBhe+3fvrbHtOgjpkTgQ\nLMEw21IFUTdANxM4v/Ghri0jsd0Pe9Us9s6rUocFydSJoxGWajnJSwZQJhwr\nsPY10VSSBFKaMtJ44C2vJ0LCm7M6PTwUCL6humx+JWoWl3EalwxH+BqSwO8n\nXLk1\r\n=j+Zg\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNbRwmG+yjb6WwmLTvMNx08hkTbcUW+TRrySTJcDZTuAiBTh66q3bc59SFyeW81K9ku8L04wqFmWem90fNIz4v0lQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.279_1626047940960_0.02752824168698198"},"_hasShrinkwrap":false},"0.0.1-nightly.280":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.280","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.0","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"90e4f67cd0fb647886ab03c5667db6ad589d5d53","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.280","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-Z5IKfQObEUvTCTO8aTxqP9ZYdpWFFOFc3mhZAzlk4TKxFjbm13E3JY4npz1tOF5qPapUEe1pG1XpgYRoc764Ng==","shasum":"b03aa3a5f177cb2c008037c66210750d0ee03c2b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.280.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg68ahCRA9TVsSAnZWagAAYWgP/30fi+m+XLGItBL6UaJM\nfqQXar2GKPMWislt18kbiT2swXp/Jb/ZhBL9+lnkKflgE4ooXzbwuL47OxYb\n2ZQHuQWI5SKMLs3AeeLE/Oq7YnUumtA3xu3Q+8PJqizDDU2dorVZsNRyGBRL\nNRMPDdR4JyJ/EySexq/XpE5pg2Ccnshubt/KeYsFhlcAnZW5UwKFMQNNNyjr\nVLMAjaRbixJAM6rcEah+QdL4g7tEAoGSwIQKLXTC5mlVrJ8lFNc62FN/OQA6\nVKs2MoXRPoeFd6X8MUIAz40COCcN9lYEQNxOmQDIIAEhAR4+oFImQeeIMF/h\nVCGw8/KnY+1YEHP9UwkqnoZo9SDURr8TwVB8RXnmM9hkJdXl6sdQ6b3pgjBO\nsVRELhZF3LdwxpW/LWF4CPMMOj4oVke0F1WpWHB30gFbozsI5nQLs/3qi72t\nps64kdFCdAfDaQJBarLtKiODIsaJXwCw1khM5Z2PI7T826rsRgh6yOSaMCUF\nrDZgn9hl9+zkUvvyPk2DDbrf5D364UbzpMDPXiyrLBpmXPJb6V5PosQnShb4\nm5RYx+8Bohba421kJkYrNVu62NEe5/EHRfIGqQ14ztyrxyGmuGZVyHVRQQIw\nRMpaMQyaeG/ervYjO1ksVaDARbV+2A6eZwHNtEaS/MOF2YBf68xaugECsuEb\n9qln\r\n=kLKB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6idIyu71rxUwc1viQ+9/hjV/gvDVOb+lQa03BctW1QQIhAP29irev9umGGOR0KyP357OCfca9YTFIcQRFjwuQmUsa"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.280_1626064544899_0.7402779388739842"},"_hasShrinkwrap":false},"0.0.1-nightly.281":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.281","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.0","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2ad95f59b35b94484ebda2cfad10a9dafc8cbe7f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.281","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-6L/K4bmwedw6Muc7rKRvQ61ZMTY5gjmmP5PR5z//ZVM4l/NTLSVnIjkuRRxXAivmdGhjHQQCIlYAIIgpsbF+Lw==","shasum":"6f22ae2688c6dfdfb845fd0bf8550ddb72cff5cb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.281.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7DB/CRA9TVsSAnZWagAAU1wP/38vtyF9lFDFcfswfoag\nc9iyY8pEndGrfWoYeVieXVMzIDJL1IA7rke7e2FFZomFCW+7JfSL2lNNisfC\n4IUnx6YplJ5YFJfz17QFcSMa+IEusCdO1z349OVFj4BohJF/RPRbgExaxM/B\ntCCAyw0oMvUR+H0t/HjBKdlxgRzDDSlD84uJmNIB94Cg3v3rIDMZ9nasAxBL\ncLoMl3s10DE+YOWiWvkfUOqqCz+mndsUKHHmsTWSKJcxXebKHCkpK2JEjyIJ\ntFxLBgqGa7Z4lJJWsLjcco/jokgIBfgv0sddmxgVVgtKZQAbmrD4fKUH3Dn5\ndiFnsGTXu1tkQ2E2thy+4GK6h0ayPm4hV3SMJqJA5PJYazEdV0KfOECa7ic/\ncl+RMaQYvtzsGUwbVtmoIdV98eP3YTyoHvoLKXzhFXyKV6YQ1mPLhrXSb36Q\n7a9WznRIhym4pPwRQbkBQsF5cUiMalyi0Rl02U5SC7cbhUG7K7K78Y8rl50C\nertkqR1xsTOPhK3sDeEioS44eyt6DxoixLp4e7SAcuY2sJ3JNE4aP/ZexguF\nPvWcqNf+R8zFA9uhm9AiUZqAXt58e0CxpZGoOEqab4ZdT+n5jAZ5kIJQhpm/\n/ueR5vSPTFjXfzfGuCif06I8flWGMPb1nVNFquG7N6eCTwbU8/6fkTfxKrG6\nCY8G\r\n=CBxL\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCKcbqvqQX/N/c79NS178KNINMb7vWX+cie1lnL9Owz5gIhALoclw3/RnrppGdx1X2nnjvCfXtVHaj/3vVnRHS0G3+z"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.281_1626091646444_0.37007844327034967"},"_hasShrinkwrap":false},"0.0.1-nightly.282":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.282","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9cae57a47d41f29234bd6ac1129d1456d61665e6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.282","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-41ISuWpz5/cxqCmSvtfz61DTwmz2gtsdZv6KHdGpPhAId49Bl78mZ7qUJ4NcgURu9aUppczN+p7IbOTerqoMvQ==","shasum":"39324669aa323282c6b7e3dd896e9beff46104a0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.282.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7GR3CRA9TVsSAnZWagAACxoQAIXCmD/MQcVvrOHfvG2Y\nk13lQQZ+ZqwEkIceitp5zSzmvtYRn/iGUbRBHFjN3QAZssK+3FHVzxWkFL9s\nNObW9by50uwm5SdaCRo1mKyoz3XoGXeYLKBN1AzeqgA95tI/tgwwI0NMF2T6\nu3m/RlAl5L9dlEjXhZvnTrK+BA5F5jPZli4Qp9GZclolb4yD3lcrzxI6QUck\nniXX6TsMnBuZjSNxNU6wnvK5oD5znERezY6iyjj7TVumCj6Rd3+2o0HTL6ZP\nsDvi41BTOE6ZCAVYLJD4lBSjXoN/nkyC3lskMZtiW58mJNGDcuq1tLrI24oq\nOnhhuaxZyrYOkO+WWnMAQ1d9LBNS4DlI93/hbHLd0isFlPgNV5SuIiLIEP9L\nQiAOrtcOeE61dToJeGLSLJ41Jnp6iVb9bAnGb2avBr1GdysIxzD9J5cnAm1v\nkztF2nMkigV8Rv9DoFscboI/dRj0LF01vo2wjiEeA4DRq+TUsMrGasdkINmE\nC+NFCmvRcx8xp5zBrLsGGdMsyLnRNLGkTs8MvgGY6mgr//X1u+GeHQlJlgLL\nCsuckSyATVsdzg5EVjRlE1tYbrWMiMkIJFkFOMl5ILW0UHHJT7q0/0f4ZHxs\n8SOGLm8CL6eNBqeFiHSY4d91TLU4tVm7CsY4eEtgPcu9fBbADELL7CM/HqfC\nddY9\r\n=ab/I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAOikuVElAAmiwt8SDLtQcyyQ9u6vEzy/rzl/my9iVNpAiEA7350Xet8TKu2rPm9CFdbH80HddJdUid/tMWBgeK1Om8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.282_1626104950809_0.35642103854765583"},"_hasShrinkwrap":false},"0.0.1-nightly.283":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.283","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bd22f362ec8d4d7e67db8397d10df9a53e272ef0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.283","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-2o1QgLaWsFdgAgfRfpj1U69znePIgcg3v7x2NA/WYhaDyBoCkt7NknwtSRqrp/dYVgjjvNk290NszyQEYvrjDQ==","shasum":"b70aeedfd4996ee574a91bbd5146a86840663573","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.283.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7aSfCRA9TVsSAnZWagAAmCQQAI42XHO15qSzBn1Eqo6q\nJKORI7MwzPWTutBYR/5b1596DD0CnAif693AOH9Wm+srNUvLXC1QJ+82kQFZ\nwNOLjx1BtpBHNlM5e1STHj0SbNH2TKr8WnWvaANOr7u5rV/6lFfMBnZpQlBv\neyWozfXiUXyErzmAIpTyw2FRYyvPztcx9gv+D7+P5pUBBfM/0eMJS2taMXvn\naRtxI671T2ebuLnOUIPfwGxlb8ACNEwD2bhj5neBehF4j6bIyirxGS4+KYVx\nskv/AW4b6nI4gzRUU42ga2l2uqZjIzsRCXSfovekSNHw7JqT0Y/MQpLUmSCC\nDEzrKdgoJgxZP5VRT39DYkCQM/kXtwhDNNEvIk4TqDFVK51/lbGK5wLAVI5U\nMEK2SV0UY2YBMLW1AP4k3Y6+d58aOcU+QjpP1q8TiLQuUqLX4OK7VPlkrUBJ\nJ6jyE6PwfFdef4LGqi5bGsiXS6ZBsHe5+6d93WO09Fb8tKef6ACEWeI8xkFY\nt5ZFR2Gcwb79Qe2TN2Y5zmtPVTYQ17gx4QE4UEu2do6rol4+qTTHMNF0US1l\n4K7yo2quS4oP9AYv4VMMAOWoSJdJ1MhPjXVjVkTemXT+O7sqBD4JYi11lxEC\nL0EKyK8jakdb5Xj4qNikGRimF6YckFz+ps5rPi6XSKOADz+B0xJZeRcKUHEd\nonre\r\n=ehM2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDOPckalSc3LCwBsSiy+xWOwxTxuvWSYKkqwl4h0giA4AIhAOiL6zTjGzLGI4bB5vrlsr19ccJTycNp0sKr8l3CmOuH"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.283_1626186911202_0.4793576523080556"},"_hasShrinkwrap":false},"0.0.1-nightly.284":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.284","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"996020c6dadef3db3e32f68242379c592f40e288","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.284","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-pnOfWHJenoDae/itQ4qxXv92AvEtX8TPkWRYr4cVA1/+EhAaYZzdfJkwswtxjXXJXvLGDphO6C34eWj2deBSmw==","shasum":"a3e7394c270d9bd8759b29b7117c2b0b9f9096a4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.284.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7ed9CRA9TVsSAnZWagAA98EP/RlgifhF+C1Tai4WmGj6\ncggV6zqHipZOmmHBx6URJXWxm3eqicHMQ28ZxrGMZ4CJLrYGNMHbPpBsBPaL\nRCqHh3js+JdALrZ65NaPMZ1+LGygNQiW6++i/wgAwOtlRpDHnZGZ458DA2WN\nX2hsngqRRas0D0pXDvlz1XpfbaP8TFnCENsbHT73j0q7z3WanUs0S2oHfJII\nU7unP7lVJheXqw/HhivCNooFAJoYoZmAD3GyOhyCVaHSfomSDtOdd+kZZwtN\nNMHZek50cUpy+CURthdOoqrFwQAHTHjzb0ESfYgd+QcNyB6hgy+n/nItxDgi\nAJrDj3wrV/T0AQOPL+xOkq4s7F5EPTL8xXJmVdLLwqR1/3eNsZbjXa/j1vN2\nXQHxuvBpkcZeMsnAIxLdoTfWIICeg1jgSj/dIUGDaYYbhSVSfoBse7AKCBUs\nWybLuojXqQKR+4vTuW1y495yeXHFDXOTiHpLm9bAM6/lTd9zs16Ri8y20hfG\nJcRCMAIYHXUKZfjJK/SDXKbIiM5wvc824yf8Kav946oefNoaQ/EHlpgD3zyM\nL5oTFnmDdMZLxIrxQGbmHWgOOf6YE8WP1kGvXek2H/uFdO0RVA5SJyOSIvWd\ngAVwJA6HJTnle7i6/iMd635Bt62PnnTKSoj6UACGpXdzvQ5Y5w+vD2dtbOVZ\n3rD/\r\n=zSJm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDxk0R+F0EVQkjF99ltHDQcVXNZtGZ0VygF3djK5FuOZAiA25qtl9bgNotH7kC8l2F25Ift3qmQPuN7NsBmubuTduw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.284_1626204029420_0.21643784658378618"},"_hasShrinkwrap":false},"0.0.1-nightly.285":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.285","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"de687e8931e033196ef363f342362786d7c094fa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.285","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-WSOgmlsq0o0ntptKrstWZQ+AVTQBbzqf3WwbQfKLluGTbnP7ESExBtR0qrs0IjCBlmVOvX2Ow3ZibI3exXZYrA==","shasum":"cc9ab82a82d0f15b0436086c8622f18385dcf7cf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.285.tgz","fileCount":534,"unpackedSize":2538346,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7hmSCRA9TVsSAnZWagAA98oP/RNye16oAt1tdgh3IeKH\nosx2ljLMHoxYk79AfoU08ts2yL4n9oxzyULvXtQlQWqOPtOEb9qAIzG5k4Dc\nNijglJZkh15mq94epB59baOLva4fi7sCANlgrwY+1sVGshuILEz4zdL7Cz2H\nQXTdBRCTrM0oQsVfHfzvtnD4x/KzOtbqRWGGDgez9diiC7cBgRniLXI7OHMB\n/GtGxKAiyiQUnioSwBgWp1b2hfGWMbXnTEiD5fh6R0HEAYDpaW5jeUF5ZZ0q\nUx8L6K7yJlyOZanjLJwGdKioC9SyzyoJ1JnEozBP4NNGP6Zhw13gIlSOXhf0\nY24XbxEgAJI6Z4akiqgfenq886Iwu5f7RAWbL50RJut/WbYyE5C8iy31UXpw\nLeJdsylNIDMjjhff+7O6AMWguyORzpELJJl503qKc48wOzGWKzqWcklZuiJz\nEc2sTncigfYpU62UJyWFKR3zsWBzFwHiT7Gz33PU/5yTnJ9PLGoQuUKMAM0K\nHHQX32QPGSGmHMLYrO1MsLyBvtsG6R8BxMvVuLIpN9DKn0E3VGIKjWCALnKq\n90T57mR9P1KWz2cvU+zOtouo4oQlvb5jIsMfuAImdpomXpH3pmEHaJPRh0Ln\nLC4sA0BuhB+/QD+lFWIll7IFSeFGvsM8dPZiQ3EEVymdMS0nl2IppMo2R6Za\ng343\r\n=94y7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCB9NbWuTSouXG5lFOUzPc+VMiScVQbAp4MkeRU1d816QIhAJR8tn38+T0lkzHMXfVlcLBGfECQV9Cthudk7zDAdzcj"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.285_1626216850388_0.9820895959863838"},"_hasShrinkwrap":false},"0.0.1-nightly.286":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.286","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b7857254ea7a62dd3a3dba188e86312a96010a38","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.286","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-oe3PwNBEoexCll/RclCNw4lG8LvC0cAyGTAPnirifImEKTCP7alOtyDxwRGLOA/oo+6rnuOAoSYoH1KpYuwCdQ==","shasum":"a2b16ae2b2a31a1403b5b8689057bef9d10d2dea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.286.tgz","fileCount":534,"unpackedSize":2538361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7uDLCRA9TVsSAnZWagAAalgP+QCpsFGAQ5q/hPXKmzgI\nDvIGu7Qgh/e/cCC/fWv6A3J1WBVBk+DI0QhLM+Er6EGUKxwfpAJwvbgDDX6b\nQ+WwjXkTU+Ls+N2TUoMDFyry6/IcJYob5zrpf8r+9ITY3ns1n5P1GuopEt0/\nQlNecQbQAc7HVzd51OIL9TSBUShttsD8Euyv3otkO5+tfG2XOdf28B5/7lwz\n2RG9Lj3zgglCS2h/p+shdfvboio7QkRafJRSyYrDekzMJhvDZu/QuMXa5tDY\nIeVMLdxEFjxPl4s+zuot7EmzyV57WegF/E06hC1DTpk5qlxPc1btPQn2n/Sn\ncu+af/r4MWFcgxmxECE3HH3RYX97Tg1hVshvlYTZHzcYLsIa0JscZbReTS95\n103WcnkOBZmtMwhdOqBZUlDX88Q5tIvhiziOe37BUZ9MIa3OTT5Yv7cX7zu9\nG7D040vT8BxDc5pnWgx3+3qllQFTykjSwEMNJZDP+CZ4+FzlBQAjHq7ZE2R5\nFqfyijTQafgXOhQOY5kqt9M8ffi0GFoWT0skmYQrhitkxyGaoVa1s5WCpN1h\nUduGghtWgg6mZWnLU6ZQAuChqGKkPWS7rnz5ZND/NWJxNeXlUG/rHoLU4bgQ\nCOI9Ud1mFGKNBJ6Wixf2qe7WMahehFsM0/HZkkVAOBN+eVipyej2l5QInouC\nEZl3\r\n=0w+J\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC1uI17oJVfD8VNDYwWM5rtw/ONySB0wWS9WL2hJSBFCAiEAybPAl2saVS+tkEmoU2kNSzIjUUUkBbWTH+rfO2N7dSU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.286_1626267850486_0.6842269853314007"},"_hasShrinkwrap":false},"0.0.1-nightly.287":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.287","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"30a1568ba7a779a38e0bafc276775e0188999f24","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.287","_nodeVersion":"14.17.1","_npmVersion":"6.14.13","dist":{"integrity":"sha512-9O9u4gz20l1X/GAmkMT02kAUshRb9AP8sxwMe6FtisJhIA9D+NjDn98KaNd3YvmXcdPpsKHlq/qEei9oHyiZvA==","shasum":"46dc3e4763efc0d11764649a5612a5fc84fd240c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.287.tgz","fileCount":534,"unpackedSize":2538361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg7zD0CRA9TVsSAnZWagAA9BYP/0xzcccrS+F5ki+4C/4w\nnvC3qrvsnkOlLwnol6mcYLAD8b6XcUZYvhaZrjhS4PcDIWHM3TrVmj1e+FSP\n8K3r+4TE89QULHiQ+LgGGFX2G128H71++qJ7BfcOuT0axmoi2IBzJXxMOoxo\nqUk/niAl3V9cmwOyJCJvAOSeco7y2XIr2q3jCeWpZylwWcG1bhFsSRWuAr1K\nbd76rSXhDqo6/pXtmH+hmgyspLZExgLJgl944+0n3s0NmutudQiJH2gciJpk\ns9XTk0j/5PHz0htzjTBKB343mJV8NFMQDEmzybscCL3rQz5O6k71QOxUzmaE\nCEzsmuLkMm1v1fiUkZvnxlhmjAb1pvC/+cyY7CBwt/ZsLj36XWWDTpVth3LG\n7C3tCwzVIz50/zGvmz+tqUksVEfxHyPFadTUsp6547nyN2WVj/n8oF+b466F\nQzHoUrpSquEfScumCuVix+5ypnXooHDeS7+OnihybBaSeJCRDbC2GNGR4RLW\n46lkqxjpXxu4Vmx9ci/SanMTsrNp1vQvyNZEIo7iIKFOd/OHVP6TnVBggCxb\niJC7xZw+3Kaox+b7A9Rjm9aemuFLNyPy5x/fnksKBJR+RzMbOODlpcYPqU+u\nBQRh1RO+GmTTrBq6GoCMUA6TqFb7aBDJ7JlaI0Ne8PaDbz6+8qo2UGsgGPE6\nOFid\r\n=hNKV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDGm/VZDvaNUVq5HK4gyNXwI+X9PiEdSb9cX2ddugrMPAIgVI/XaZoG31dNzWnxbqilrjcp7nKMoRDPPOOFnK6A7mg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.287_1626288372133_0.3442098226311865"},"_hasShrinkwrap":false},"0.0.1-nightly.288":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.288","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"24caaaaa8ebfb5f6baf5a88f9441cb724b02d8bd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.288","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-QrQKmRdhovPS+DSBW/NZiIeqUy+CUyWf+2i2tgBTt/XUW/gsM36p4vo8yQJYo9ryW9kgkP4eQHwmF6oB4WhP4A==","shasum":"c3c7b76d240617902c582a7bacfc4c447920d9e2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.288.tgz","fileCount":534,"unpackedSize":2538361,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8H/zCRA9TVsSAnZWagAAdb8P/RjwvfNKW94kNH3u1E3a\n3x3F7OqOvXflyL6JS4hRkmtFoWUMoDlnhrMDrCUEGfGlTTI8cMHyhZFPsvHx\n+mVApBUfqAPzWeiijBoWhepNEc8Ehd9srY/zJd3GTQqXxirQP4oreRLYsIGy\n9wuVbuJFrQ2FyzS0Q9zkcur6ZIImHJfLe8fsH6L2lZzlYGY3LlpSINjz2Bza\nqlHNjxHs7DMxDIzQT/kABqEjeGRoX6MVqWv+5TTshDRmhXnChciJKl0cMXbr\nfPZjqGqq//4EztoVAJ6c8XW8DarQJXX87ni0DMH7ZpU5mg+88C1fht7GpeLP\nhMJwZ2wJrWlmLM4aDhoENESg1YvaSnI7WrCWCmWqTs63XIfyYk/NtbX8bN6z\nf0EslWrlkqJcqD6O7hs2pEMOv/bc0XlIAvZlhcGVy/rkqbs7WBe4I5brafEU\nttw4GGUopwP/N1cfA/PvoMYQ1wUhB1J924njRb0MHDJREOkyL6Rs1xcXkajb\nxPDET/gZUoCWKYeivxEtNRh56jvvnByclWRvlzZtrIy7FWnVYTTa9C020C8P\n7KPBbjbfxOrGotseSWSPYuGuWZHV9wt1/CZnjBbW/C9MhzfraEtwxo4TYBjI\nYf/9Fux8ZE0cAxgon1xEEiOMHSQgUUqu64Z3S5SOvlgZP9S06qBehj9KK4si\nkIMA\r\n=Gr4P\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIE/GauS2G1ogJEJppgp4b9ZE7yFa5rvDlXIWjhh+6FSjAiEAgDeju9UpNWF91Bs/FHSZrKBpnJEVeUWYvdBoQrqDVIQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.288_1626374130817_0.6489184632384357"},"_hasShrinkwrap":false},"0.0.1-nightly.289":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.289","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.35","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"089cefb18bfafc27a20dceeed3676bd8c7f92b10","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.289","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-fu1lfDMsBx9xBIF4K2wIwkuHuI9NGTrtZhC1HQ716Z7XBSO6RaO/TRh9CCiJ0oVi3L1i1M5DAAvzYTuolAXLsw==","shasum":"1fd16407a3c6863deb7830fdefa0b0f92a64567e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.289.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8OB+CRA9TVsSAnZWagAAZXsP/13Ixb0Td8G4Ez8MMeDY\ntq3UDWeMLD+bVHepoUTN8gM3kBInXSrb18faT1VxoZBJM+tS/pq0lfYHpkNU\nITqKj+XOqddlZakwqU0si8SsAeNl+dUSwesvikgEbo3qJzc9zNfESvmM2kj/\n1xK0W5mJmEQRn2oM0A2XbHMuW3RKw81Yhde0BOKpORVPBs0fU1zQOtgi2kzD\nAMI3e9yMj20E5P7CuQRbZhEPiAGaVZ4FJtnXMo79orz0AGgztXeg6FlyL2d2\nfS/xuTrAIo/LeJEXbpbCwvTjCeR3EWuwCCj13r/cNEiO2EPU0+X0Cd1f+mqG\nFAHGYrkqCravHXQ6+oyFSRHMxiAcUJaNY+okbYMkgAxNXFLwKYE8yGhYjmXj\n3tAjvDSgZyLbd00DOVmZoTuAgcYU8pv6F3oHCe+J1G55pqF7RBkEeEMuQoxJ\ng6nCEEIVBylBEqA1yD/Vew6Vn6voNCxpaVzRpiWR2bPyv5KAmg6T/hY3CSpg\ncK9/2UtVJ8V7DJ/XtMZDksUVIwNiwJsVYucQN3U/6RL2nvIN84JhsQWVWceM\nOxgxchSOqR2vEwSJB+gVMhEeR9G7wAye0LasmFlwvRQutJ8ZZCAN1gOcfiqx\nB9Von4s47dQgO5M1GKbEaI5RUYVqcETfIRVF1EIFycWCHCpCzuWJ8I0n1BoM\nVpex\r\n=Nu5b\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGTdcQAf3GarOFlJ39/0xTHp/Z6XfWj44W+FWAFX9nAiAiAaGVEawkUtlKLEWgsO5kM9tXhO/kQ2MvxWSAGYU4pTnQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.289_1626398846238_0.0013301827929688148"},"_hasShrinkwrap":false},"0.0.1-nightly.290":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.290","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d017a27e2928ee03816d946ed5e900ca55b2c060","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.290","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-RuME7MV86jCwsV+Bjwxdw+Le1rdxYl0MuhBUuf3098cd6z2T7mq8Jz6DrNeRGdHQ0ipd0cwfUkTmdge+YIV0Pw==","shasum":"3babeafa9bb000273663b9fdef46e0d48544159e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.290.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8Or0CRA9TVsSAnZWagAAURAP/0u1PfeM8bVhvVRJjvt/\ntSpMt19ipCq3+R2N58aXPVI2ebFjKXSnsDkp4dmvAgoW+C9BCbdGb08JSy+r\nTbxIv+BloxXm50YPUKIwLnSlmbcUTwRS7TwdZtJGtkYd3R8GOOeodVhf59G1\nZNqWFsXFdh5sV2O9dA1InPrFAaT7Psqczkv0OIH0cVPIDvlPRyweJ+MAn7KQ\nyL1QMd+la4rOB+8CWpmpgdA4gWQuIViTo2XVudi5mIfErbaqQWK9iEDeS5Q3\nYYH2GFJ3EIYhK5Pp+RQxRJPf9pTi4WxrhZOcQNbbXLsJ0Pen9mrOSlqbq5YC\nSXZm51LLeEuOR9lATnhVmMxL7OpfeYibzUn4V5xB3qXRJHS9TFoFK7H40fCW\ntr+zNUdYBjwAWSGoYjMkrpKMZjPr9MtjvDj+hdeNGlF300OLPDjTS86zFGYp\nrLEPqI+84M2Tg8vw1kmU5Pfr/0xqXxz3hEsstgyI7FAlJSVonuhvYJGC1zcw\n+MU3yeNlszQMPpmPlbl5Z0uNBsB9SojnYtO696m6bFhcX60kzRdtQ2oikH8s\ncZhf4TcLS4O9r7Xal5qLVTIAQygqtwK9AYVUG8qbA8WmzP0ni4ydU2jJa5lO\nv1Q/FGgZYDygrNwyd5HFc4Nj6bXqTqW05OLuLMRv0fdgmfnsDom6RYS6N708\nYP13\r\n=REpX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFYUvhhCLXpzodDz5Kw//qspjN4qpRdyfBsbbt9FK1iwIhAKUFgdQTl18t1/PdaRaL+i41nFIMIXU9hTSazPOQWGgq"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.290_1626401524202_0.7005396582009449"},"_hasShrinkwrap":false},"0.0.1-nightly.291":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.291","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6ec87165e042d003d91d368da7d2ae29ef8a8e5d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.291","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-jzUW0wU97t188onz9kwDTB5u1As1eOaFJQ4aMclHzpfxWVlqhnRrPv0/jP63E0dtRlPLbXH1KTjx42VcNsH0FA==","shasum":"a13d763bb35c53a53421f735c41d172bc7769505","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.291.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8PxrCRA9TVsSAnZWagAAsnQQAIFEtHxMJxiG2h2wG9jd\nr+AustNnQA8mqyGicN0m5Jc3WPy/d/l+0X70EtGf338t71zklauvJtA7W9fj\nCkOhCiV9pm/iDVJreZKl3aXMrjSy6diIcvf4OMJggdIFwP86wT8Gf9BwZyZ0\n4kWwo+bQ2yTQ8fAb6eMHiw5nHWFtQFLdaFBmQxi4VKfPGEk5JlKgjrF+aZ+J\n/JMZc+eCA/MyldNF9q7jcfnIE7p6pZLva0TwKc3csMXUTMVVjPsXzTuJA0P4\nl7eug+myMvcvxdTfAyEV7rHfZmr3DZMclC7MBnRvzVlqddCl1o83pW+uRujl\nW718GIiA5eVQmc08b1ulS0tU88GlBrK/3AzXCun8ilLKs890WDToLw+2OKUC\nlQkCQovsqN7KME/bo8m/N2+iO5riI5EFnDhhQFlnbgXumnQYLeawu5NADRGF\nh+ZK5AGOJlRYySrgj8dwaowkCU/7NNemHrE9lk2Xtj3Rc1KM2dmA6HBE/FON\nQCwpFT829JEm+I13ifr34BICdLVgt2GMmD4lZZX0i/XDZjMUXEYg9D21TjAV\nkRDm/UVCrP0c621re5yZD58trktgxzVnjh/4qZxrRIXaBgEmESTt4+sEX9m5\nF3ebfbOLk/Viom8Nz0DIYOONvJxE/7zcJl1ZehN53/EJhaOOXmNqVejN6bm8\nEdbz\r\n=C08d\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCr0v7aEd2OJBvhP4Ywow9LB0wtioztD3eZ7fjrGSbmrgIhAJLurUa8ZVGgArzUtrKCDIb2zyqL6sgluWsts9kk6+G4"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.291_1626405995530_0.8027571141154028"},"_hasShrinkwrap":false},"0.0.1-alpha.0":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-alpha.0","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6ec87165e042d003d91d368da7d2ae29ef8a8e5d","_id":"@hydro-sdk/hydro-sdk@0.0.1-alpha.0","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-n9OFv9YzgdZ9LKgMU7FHbuP4YXFUWg/gh5XgAk82x+7lHmKYeVV2UQbRyyaLMvjTjffQNGlspXXmLX94/zExpw==","shasum":"5d0684075b33354581e8b41de322581f19fadc50","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-alpha.0.tgz","fileCount":534,"unpackedSize":2504910,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg8QCDCRA9TVsSAnZWagAA2CAQAKBjrE2ufnHVz1LSVDD8\n/R6ZOmDEaJOdnnz7HuxKIkOsqaOlK0aLQkhIA6Cct8nSTqfNPiXZKlkLxfRd\nMy6B73tYICxxtVOCGfoklhZOSfIpEN71DhGmjwOtz/CQUFQatz1VIxEycJQh\nwqCTf7Jnt/u/odHfil3RsgI72WGI3JMdjz0eWrf8E0JHLfmpV12lgBdHcsD9\n0bBJsxRySBw7QypQN7xm8LCzEqJFX/6Uauht+tDbl+oe90TpXVAXR7fQ3ibp\nx6DLuz3V5wms/PSKMWj4NtGqG++ymJ1aQrAyX3X/P7g/Hwny2uEwXc4cMi8v\ntf/7QRP63l8Yx/TYW+z1sTrmv7HbhuB9qLUvgDx8wcgETEWwUSIIBr/jgOVh\nW5x2TqyM790FLLQ9nLL3j73lEv/fvhTjeXLHVH32mnxTkgIgy1Fwz/1o5OLZ\n8HvqqjrtV+Gb0rVBHIdBZDvZXGyKQJH5BhpqhcqoUPn0ptBmh7Qeaq/jvgff\n1IiZ3w8MkDyOmeLI1uyRLVlsOw+k2N7I2fc9OITfOO3aZA6TCNN6l7ngKAy5\nw/8jeo1hPVABYL9OkuLnDxk9bgoslTpm1gye563IlzOuDneAyYmRrYXoWceF\nCYdkFgzMkIhxRf0iTzDyEVXlDN0f5qEDdUdS8jouMHJO6IR9/FD+QEcZalJb\nsiKX\r\n=aOiU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBiv3/kRKBhG3gCs1+ksA1ag8XaPshB7RlsEGqYxUatLAiEAqPSv3amBTQOPRSxsr5vGE7W6gDLuZQoLDtUxvuquTrY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-alpha.0_1626407042766_0.6695851329041902"},"_hasShrinkwrap":false},"0.0.1-nightly.292":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.292","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a248c30683c2e39f55a6916deb7e791ef557f9c5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.292","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-TfYgu6VyXfuHhgk04fiYTHobe8jD6/Mh0tq9SD0QQdxfl/RPw5wrkagUru3dZSdZdL2D7K0wL8bZ4MEMiWCntQ==","shasum":"f9ea31d118c459be00e2b6d1533f772d2df7ac1f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.292.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg84ocCRA9TVsSAnZWagAAeewP/2pNTy6shevg8foP/gCL\nMvxtPHkzqEXLBsV2SK6OlbvaJ04aococpFNL2ZprGQdSATofSbiMhnyA2mxx\n8TSWxcnzZ9URhzsvEdIK2apffVgTjkE9lbYQM3uk5kjmvqt77GsfBQu6RCBY\nS9t8SwlI+IuG9R3HiCwHUIy7eoXrtFrhYFw9I+so8nPvFOStsLbfuJgN7rPz\nuSA8x0B71hw9UCMYil0Xtq84GJ2w5AvJYK5y/0MsjRwbtLc4KAS7ZPyaFW/z\nnD/1QwNGBEE2wJ3UWYAcMDrB0sSGk5pj/9CHjIKFrfA8hRy+w+vaVr5fAY31\nJ/1BgItjXnaPPgzWxtC8MXs/qmJdmz1DaL3DtXcN17NT8OhgWyXdB+TGqt2Y\ngqSgeeLQSrH8AHNQrPfCZrOIsiUSf1X5l2yJCHovg4ZT4Pn46tTvysHK7U79\nY+1w77ChTzju4O7ByfOvm8tlfBr7tRziNr00bGlIYY2hUbfH25D/amWud4Ph\nfk13fHOxM1nLXC6GpAKcEFPXoBWA71uWpFI/mFQaYGx7/QasRYVuGCyR9KId\nuWbrjQ2ZpS8Ie9jsx12495tICZjzuRPCakz1cuNErby/wPUWoxoG0iUm7xLv\nXxbJsqbd3bQV6CyB4CJ3sCG4U15S8cYYSaF38NVtJcmisTdVzMbFsMQJ4GdD\nMfPu\r\n=EVYc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEF3TBRsKiv+r5FjXFGUJwBV4TLh5/GCkzibTyJCZIJFAiEA+as6J0fkvKWVnxhrXdEVnkOCvHeukvkg9AOelS8IBUw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.292_1626573340175_0.48930622259834045"},"_hasShrinkwrap":false},"0.0.1-nightly.293":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.293","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"afab366c15ba156a365aa356e1f6b6825d7d18d6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.293","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-0YHUPV9aGjaSN/3E6Tp9ldEbts5G3Gj2bFLgMgfnsxZ0NE31Sscj1iy172TNRxhRCJ509uxdaCedS2AfobScMg==","shasum":"ef43c51c9bb55cf8fa96233455d4e74f85b7e869","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.293.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg9hXICRA9TVsSAnZWagAAcr4QAJmBDxg6OsfCuJmbO1Qx\ngIyW0LBeEmIh/VLJQjQEHXq9+hqskPGTfzembzWXziAIX2/DIj38q8OeEKYH\np5Gn9ZH+V0DWl/sHZhLYs/15/pLqWi9FuqQeNBjVpMLMYdB/4+ogo+iGUuyr\nfXyRDNzCyAckx4IxaeZ7+9Lb0NoVqRZ5oMFNT2Mc1YHaQFg2ypfvZNtQSjgM\nRQUrbdE8SpfnLtt2SwTvbhjxWIhnzLIs9K05Tp+cAY18On6sxH2b4nuW4W9r\nvkYiQLMhalLu1Ffi7M/z/912Q3aHvHOro2LrYAo+PiGmkk5+0SawlqST/iGX\nduGgFSmYxx2NmJ7D5gcvNtvFFIrxINfHKCpJK70evTv/ZLDEckHx6hOik8cp\nZN40qH6cXgv7iZEWm4DPXqM0DXgzBtCOpm/SDnscRD+q8gR9c2H4cmDw9sai\naj3V8zFxKibQ6c7iX73NgZV78UtPKritSFqs8ljBMonerQr6NaGZIEXGK1t+\nNdE0CrGgF+t3hQNc0/wOmgvp2PbhR3dPUn8XzteCnaWKvTuant+VfuNOeo/5\nuAYTpOfjVA5fLuq11d3gulGyeEre4kErcV++AK+YuGVFfq1DrjG9AXi9niZl\nW/NmLPiqQ6xzpaD30m5lwN+UxqgFGFp/cmldK5Uk+t52xlQ/pIMziSIdurq7\ne3Ns\r\n=0JpE\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICiw0Ple7LgHf+XsqQf07n6tX97sY3ptSFQoR97po+vEAiAhShzQF3wKomHrx1Fp0SiiAx0XFu/GOMsSw8eiBwKFUg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.293_1626740168280_0.7391267044808334"},"_hasShrinkwrap":false},"0.0.1-nightly.294":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.294","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8ba45ac74ca3bdab73bf861a6411f5106215ba19","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.294","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-lfzXafkeIURUhjbFjo6F1dsZPM1hTRxcWoT3ss5Q8chVR4g8UTW2pB61pVuECIbgDbgZQ8Xi10yI2uw8h9oJqw==","shasum":"d0266afe739d95e8a121f2d2b1a7009b0861b90b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.294.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+MgzCRA9TVsSAnZWagAAdQ0P/2cq/xv5AvDaRGMR8sr9\np1hr2KaE2qyE7BG5QVyZIUegWJmu7Be8ILkrsRkN9cqE65LrehBIs31rowTf\nz0Nf4kgYORYm6gcuM8CprCre9EZf4n0soX1Sy2XXkl+2fHOV5EZSreMk2WYc\nCtCMQjuk3F1RLqOLoqxOBV6s846ltted08/IiY+bFEpsxjQDtOKgU88j5VZG\njhpWOla652RdTbfO3CJhaU0yWfNzecNNJS1R3j2VtxMP8HDsalWqkCdMZBgS\nChzZPdQxfi0Xb9AcEFJuy1A7ZYo6RjvCQGMQ2o/TgO5sjqWXORGxWazOBDQu\nrJgHglZyGO/blbcOSbrdVLe5gyu6DG42YtWaJzhjGJIO3Tvj8MlLlqkLwmq6\n0OVCQ56G044ocdqPp0AVz7boBIfJd6I9dG+VEhumRAdGJisQY/pXLPUD6qRW\nz7wxTGC9z8vN+rb2JyZqSEFLTD7FMIb1mNy7z99whRNcy1KP1TgEGf+7NW1j\nXAUOcDUMH7efIjFyP6MFppAC2c7j4+RSd6ZUka5GLBdF0dpkL/oZVl7nJjj7\n/D6XxsBbiFyZHClHlKFS70SlQ5QCwPd4hs79DhWLT6ZykK9tjwuipEqnJ4zF\nNDtb6jEdwB3ROakP7OsuwgLb6B/UwQWiVbYrDi/drSANXTGqQXWo/94w3HyU\noJeF\r\n=rrED\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHxX+E01k/oBaTyC073poRB39grOBFzM6rFe4m+JUjvAIgSWGur3y/vEN3hFuI3speHyHUP5hH9yEMPjq9DlkxXYA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.294_1626916915294_0.11109845136042029"},"_hasShrinkwrap":false},"0.0.1-nightly.295":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.295","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9c5f14d90e87c5f4e0f5ee56be5df5383ee2221c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.295","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-emeKHiQ4iR0SsYs003yv+sz+Z4pcKGZo1YyJpnVL7TFO8upx0zyuHauPsTDL9KVxrijAZr9cTqZy+ZoaO/PQTg==","shasum":"4d799c847d29a10217d1793767089078d7f57c42","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.295.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+WWJCRA9TVsSAnZWagAA5oIQAIuHbDkAw5wmYCuaaLrZ\nE3fhFU/XaAFMG74aF2w4nl/i+7vV/JkF+qnzzyS8vkhpFnW6voN5meVJwsZP\nSr3/wkdIF9z/PuZWt5D83QkCEMQRmJYJ5zDiEwR1AzvCBe+SXNyDzp8boKhs\nqUYEwNfcxHeXsH5PmUwmhtnlUnkkVwN6HUOj3tT1UkSg/HkcNdnMi8fQuE3n\nU/LdcLuK9wd/WGPO6syMPcL5UwdnuMzORKi0//+K2UrMWd7RFXuBB8m+z3VA\np+LLPMcQMu8JOV2cHjwF7XnhZo4nJXO0gKXW8mIboRBA/BUg/ZzJpMJwwkCg\nf7RucDLZ6mKorVytHBfR03A5KHVy9MdXcENy6esyuFwKsD43JR6vUQtu9esS\nhkmzdlMNWvqHs3IFCcaW74LgHsg93czvfuzyPms6dsamS23lZrY1GsQsh6md\npFCp+eZcg1zpOCaRNLF4dnsZhuooh3pLmH9oyOco5F/Zv4xr14jUgPD9KLwF\n4O4Hb2iaBWnbMDEuB7CYXMaBsHEzFG/GxuMdTp6hqVNaGxhtjGmErgR+8flV\neZsX91Ko4sWunlKiZq/m1gQYGAB8kKvKGvecTDwIapxDnasAqVDVbLJW2GN/\npfRdiGvwM5VHnY7TjUchPCCdIX6XnISSuACWQDQ80OoXTJtknFWo+6MLZAu4\nkYZv\r\n=Nsn7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGth+xdj+CDq7eBzbIIXfbyfhdZayKno/IwRFMJ5ZNZQAiADuj0gLS2ZlaN0l1g16vwplFMUxKP/Pmi3CJQ/6S4GDA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.295_1626957192814_0.5965555239939972"},"_hasShrinkwrap":false},"0.0.1-nightly.296":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.296","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"12d8bea3940a4c478403af0cff00fb765f58ea04","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.296","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-uAiRmFEVTEwbQhy1TuOvG4KXAOxLibpx8Fph9NB/I5rhtzTr72vTCF7NkA969opwSMM3BYmAM8N+bLoMKom5og==","shasum":"7810e1193a0fdc401394fd2434b9cbf3d740615e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.296.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg+rhNCRA9TVsSAnZWagAAnL4QAIBDsfDatl0+XsnRq6sZ\ncbQclGuIjxGsAoBj82LdTZerZU0SHhpOBiohjPkUkHcufPjWhHF5SXTeUS3O\nM3CpsQuRbUda0BGQ5sSE99w19by0fzb1hQbUyKsWmdgVRqBc18ScJAajJf7F\nCwKDl9oqTvXQqq1nKflR7HUmH38xuCkL6MZ6xRtRkGmBtP3hoKZNxJy51kz8\nd0rwzqU/1/qeIFDGksYc3pDKKCSRys4aAthZDswxvuPFclORC1xwMNdS1Dtr\nIaVetTuBtz6u9wRgSDCks6TqSAbxSmOh4J1rDMh22tRI16iyx1x4SSOOcH8K\n8WLONp7/815SX2UFmHO14+X9g/zxxCJ+wzSwB5geGxWxNOl5UoeDU3VIwNx8\nclQHsNAjWKdh6BINTLqpAHhRK0t4+5TA5VFlqHtjZ3g+zqXYLZz0GDocfr0+\nco44BVB6DE6lJJ7H/q+PRFNjFQYNGKX3gaxmjNxQANd3HBkSUL0xOfaEoEnT\ntyUu/1U439YlBVBuceaaYVog08/8et2VHaOoFhuDCRITTHX6rIVWRZBE/7/W\nN6vyhBLdu3B/LCvrvL5s5bGFerB/rGESVhIdHCKn4e//vbbbrbdRrzaKo3B5\nlC7FxzNTQyeV5kJ9QeNg58mZMx6eoZxL1mGrylH5TD1xJOiEN85e2dzBb0VK\np6aw\r\n=g5IV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIETALiMi5VXA+7RjOwaQN55TKOKYXvRT//95ySdqYu9gAiEAsHLVee/uRp9N7QWZ198K9ECuxW1d7M6Qws0z8TDZS7I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.296_1627043916801_0.734508826275623"},"_hasShrinkwrap":false},"0.0.1-nightly.297":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.297","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f6f6092bfb400fe27cb36cbd748af85e1f3cfb0f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.297","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-zG3YD2tqRU88thYhJQbAEjqt6EnLxeVVexHhuh+TgAQIH6ZCaMmcwyZwiIZR7T/ebrwwpRXgYI2zxa/gQ5Mitw==","shasum":"38a4e314b1fdc0a86075192be0aade00385692c2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.297.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg/y02CRA9TVsSAnZWagAAlWwP/0dycst+hpFALtJS3q/g\nqaf8BQGeLHxTu1m28TNW0eD+imstKt0A6BRAL1yjN025QcYLydX6clSfyXWz\nbzmqwnjkS/vrjQVOTlo4R5exRQboAtcqQ88TiZ2LODpjHEm9Tl9gwlRjNVho\nR50ekrEFli02sLdIqoHgdPbMQx6Vs34D/ZLqt1rHMrFCP936vYTMK14tR/3d\nYHsHjw1beMCqy1o5lwoNrdrLykTcOPQDCiVcowRhkWSi8w+N72WCllU0LASi\nexMITgIYqSCjkfxZJp/09g2/JRBG1K2VJ1hZxYm6eewDlQQA8mUCm7TsJOO7\nElBYLiCP0i9+p3lO0IjREctayKMFzqZnDfYaRY36t0kjqng68Po5zUt+2Ma0\nI79OMC5A7w2fKIhKieJM6dFfklVnqHOSxSUxxC7gwo2b7L5d9eMOWhAdLHkU\nSPThZ1orMf/Kc+eeKMek4/OiIBfuHGS+ymvBHw/tz9SKWBujvY8zUkY5eb4L\nXyD/MhSAzHGTrWMcatZ2MCmaUtk2a4K1aNm723YWgfhCmOo+HErHSrs8GNO0\nTldcQ2Zkbay0TRpmwBLbl1Ve1x84m5VrKv5XPsR/lsKctLdLXB7meMsPoUF4\nH4/gdxFUn1wzsvAfJOOXfJIsgFAtlpANpWn6pzjcUo1LmekTfBMR2TLjVwK5\n3aAY\r\n=4siv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC4I7PBhSI1PN/TU6yiPBDQX+2HWVF3RB4+eDt62n0bDAiAYqFirff4YjsnwGB+7JCnCxbUonHAPFYZPESAVTB4xpg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.297_1627335989758_0.21383034345821983"},"_hasShrinkwrap":false},"0.0.1-nightly.298":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.298","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d829b0a0b12049a89dc5a4de4790c77886f765da","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.298","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-vErN1mm0MQ9cr/RHvVq8Ibat0yyXnKlVM9ZPWAnC0RdAdmuTbrYUQptS4D4/uHH9iyu9eYqeW3gu5bcD84DutQ==","shasum":"424011c5067faccccb814437c444c49be5ed0fb6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.298.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg//aZCRA9TVsSAnZWagAAd7EP+wXgAVRVRVyAgwVYHsZg\n7hMYUhNxeFxVDe1kc7l4kvM2BeAKwSoQjFZcaLnGwajl/oSEef8rCSsH+ElM\nbNle4hwUk/+cfBS1q0G0VTARTe5gAFJ2/jwWApt7riXJ+4aTfi8elGZAfZV6\njE1eyzHKrymMlY68G7v9koDPa4XE10bwBV29WOEBKl+TbJNgKaKOZ2UUgGGP\nQHixk26NGX391jD9QfNhPWcMyc0SlrYoHe+RkdnVi+aJkx2YKv76fG+dfs/H\nbRJWE78jPe7pCJgwbWaGWC4BSufBBa/6SKvWx016p0YJIg27oZIURY2qBqbD\n/Jq84P3jEW0uTSh/37NDO9UY+V1sSXii6OUT6wBtgeajG8F2cyODeRMAHSd6\n94SqQ6P+bTgOWUf2aEaaBy54YmQShT7SepkCgYlX7pP8Kptm/2G5pSXF5sMf\nT42dZG90nce4EYTon1EmGLgw3tmMJp9MI3rNApIopim9zH8BCxNfGCrLJOXK\nBzbnS7wHdt1yl9JOkXrcGgghbXBWf5Bx/jgPO+/fBzlmzRdlLuJH2txhtX4v\nh1dFqA6W+Dl3+Qoh3+Ambi0e3yBvld08/7gP79+2Zv1W47ikfPEJ3U0oXFVy\nwPJBXe3vS1PPn4OsAkvvinhuixWM+pqmYjh4QaLufYVywbXUwy1Y9MjzOCOi\nTg26\r\n=Pwhs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDofEE7jxmGfH3Aei/JJ+xmfU374hPnjgUY7d0DQ0Q7rgIgJeZAIcUhBzob4GvPUq4OgIfxn7xRiR2Dwr+8ifIMnMk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.298_1627387545175_0.7427954584482941"},"_hasShrinkwrap":false},"0.0.1-nightly.299":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.299","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"da1557eca7ab8bbb45a4d85226a4c6818b69ce5a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.299","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-7cNe/TtxtSp5++fxjOQRCayE+WideC9g0DcygWLjNAT24gblTg2ln9a5BaeP3Ys4NU8sB+5UlkSW3ctXK5Eyew==","shasum":"87a5b146b6020269e421d9a9795a337990f816f5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.299.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhAx85CRA9TVsSAnZWagAAfEoP/iwsKyxsB0dAkuF4l4nX\nt0NRA+xbVJaanYOlxxZ2u/a54sPC5hroiOMFuIXhpYSt6+X2dyWBj+fqmjrO\ny8klKr1VRpz/9rWDkAL3up8rWxoQuKqA1e+5B5f1j3DVxltHrUJMU9YRw9V3\nYIEuUfJkV+iGEpAPDrreya1jDJSbXK58mPSC6tQqXBKcCvwZzV7Jkter2Gp+\nuDdMtPOtWWSQms4CuDeQkqyjr3Qn1H1bSr15LKEXVK2h9BexCSHG/QvpWThP\nlL+Gz09Klx8fXqUdRCl7uYsbqv6I8tR17tsMdYDcTZYqoXj0MrJhvrf/6GWY\nhctkjrco4Wb6g6DVfrVi26kDe7bpFFI7AK5td5v25wHUhxMxm+VYo0vGlaU6\nrgsBaixext/psOX0SkQ0B37rql9TmB0BVBvu+IPY9Z3NQcEcXArV3J+mTHpC\na54guzYKvLIe4/pqQJAHI/np9381OEYIvIPc/bExBZUVhJ+qft0q4HVWqVB+\nHzx9OxpJKPXAS3Ilv6EBmv6yv5A2k8a2sjY+im6FFNKjqGmNgz2z4dQHeZ4j\nVYh6rDAe0iPVRIM8uJmPTdPIZ0pehKcwmLMHw8vIhuhMgLP7Klu+0Bz2ZW01\nzc7ANwbwGR+FUKpAkHCarZX2j5px1QV+lz8DufzZg1nHxP4Siqi7KHuapdmM\ncjDB\r\n=Uucu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEcb/2cTk6oZpTcBU8A5P/kk3AIKc7vOGPrvz5vAcr8QAiBJBfk6zvDgyeIJgzWtbHU9yjWtkKTZ6KvPT9wzKScFSQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.299_1627594553482_0.9080994053833154"},"_hasShrinkwrap":false},"0.0.1-nightly.300":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.300","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"204b9d2386d8afd00e7df628d24bbc463883371d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.300","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-gQiWmGX7pGFfSZgV0au5I/OER6+R733kuCXvmhYcNjyfDIuFJlg52fI4D+WKRA43HUKj0Q8q0xz0C75/2xAvvA==","shasum":"d7d7d432d1c777e4b9647f4d9e3dbb2b930958ca","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.300.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBWqiCRA9TVsSAnZWagAAkqAP/jlmf4PwvTSs8IjTOnzF\n56RAKBHg9o2I0HwAn13HL+vDJ74IreRvXuW4Wl1aeCMHVLdy+vDu5ITm86q5\n457dt9346Ii4Wpakf0VWTeGS4AF2q0WiZGryALElCCJSz4olX8Ks0fyEGTJI\n2ea1lYPzIr89Lbk57h0UMsC7LNM3ScckmT89E1LHqyQ9c3otNcx6TLqFmc5g\n7kQ/w4Zev8A0iy4KnRfI0feko66XqadVMdgXLi5wobGEAgnXrAECWFZxenOV\nDz+TpIBFFGD3LtRkegajiqVZteQ6EZm67ZJrKb0R8EGtd03QrIzIXFsJy8Co\nDeZxH8kxoO2NHMvNM1rcxfHw/Ldk7LAbxSqXBWYWaWGOubcglTs4lDxTi4Ay\n9InFapYb7okqUNFVOncRMY7coGpedBv+B5Qj8zItatRNsrLAGK4NDjCs5LI1\n66ZxiJMHTiSSyn+HLO8jPWkd93btfsm5ejz1pHNxIHe5/M1n0cJIdUJAlMSX\nH+JrUxBc1sIB2XrjqccQXZtbgi5Vu/MHQDTyrgSUA/xHlnEShMw12xSsGt1x\nZSFUsgfw0iZD7rLeK8c1m1xXgiYH2fP+K8Uza+8IjDQFKTbS+m0m+IjA9Ja1\nuqQm9+Hy5iCH3BhFuqjjd+ODlFrR5uCZE8zbbGgoC1AhkUL/er/30ZDhkxud\nb+Am\r\n=lTz5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF0DQPGvwFZsj7r6GEIuU7rO3eTPgelIFGOleWpDm1SYAiEArGuXLdiHsJc0fpqA7nkpdqaKFhccB1ovh7SngjUjSHw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.300_1627744930460_0.48539619191290617"},"_hasShrinkwrap":false},"0.0.1-nightly.301":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.301","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ec32ea26ffa6aa19c4373f2906915d2d2e340727","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.301","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-WedP/LkcaXLLkdxrwiHHrnQEG8oiHW9SffVZiWDXfS1yfCMYT7l7BHw5sXSAjdmzrfg7ZR92zAfR+gTStIuedw==","shasum":"7972bd97980831876d00c9ef4fb76114301d6317","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.301.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhBhDFCRA9TVsSAnZWagAAknkQAIIIGY0b7cdoRqGBBoJy\nqOzJaFu+EAfFPaHn/iG+SNxcln8jG6mnJCcYajIoOdw4N2/vAOGynqhXbm2v\ny5ZA3P2ltTof3r8NZJD9WZYCdbDW/dfEsQmJUE7tkqvsaegdyx2pfo4ttQMl\nkYfRecXfHfbP8MGk0jHEz49rlT0Ked0xQ5kFUvN3lx6MYyxITvHPfdlPG8C4\nUsDeDFV1OCUi/bhuJ+JToTVYabxbwxA/n94xTNLpYU+y7U5ItQffE8ifWijZ\nFWGVv6xvNfZll3tCfDyTU1qbhvnfA3R3SUrIkBciDsIvLMKf+hAjapjD0E/c\n5gORARSCoCGx/LbLqmgWUScAzWDYUBv4JoKfsZWG3qJ9IDiraGRxi4u2nPq6\nr/Lb5n4/hAHAsxTwyw5txKUzwfN8r/UcqUoUgBgF48+xoHpw68gQrYdwUrLc\nkKKH77c+6bOkKwI00/P2VoXr4FeWbH2ewE3qtdx4ymv3LswT4s9R89yMsiGi\ne5G0TdNgWYq5smQYqweU+oqiGMsQrFYROdQ4cSr4Fvwqe0ZOi9WQLYsqHfoN\na4kAfpObG3gk7N4GsetHciz0SfdT845GNDZjBssvmdtfk1mBtnS2TXyetpNf\nyUaUKgcUoIHHuP0SjDsxIbbCOP7Nb1PE210OOtlzzaoUgpesfcJXYGSVk0b2\nsbJH\r\n=EJKy\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDoO0oSQYCRQ5if+J6T1KOXSmT+Y78q3Mo8rcgyTJ70HgIhAN38boMIhwq9H9F0zToIjE1ZKjW17jfeuyNMjcL2VMDi"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.301_1627787461607_0.9491363576608947"},"_hasShrinkwrap":false},"0.0.1-nightly.302":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.302","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"59c47f1d94be86c369a670dee7a37b34bcdb5aac","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.302","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-an+WhyZ68+SRKUyrc4iuWPA25rweMiQP7n3KQM9AsuixGUfGwybI8axeD2dqPkEzjkYMAIPVX+k42JFfxpysrA==","shasum":"84106c2e4e6bc97e598b653014cf43f37b36ac5c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.302.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCAxhCRA9TVsSAnZWagAAmHoQAInNn9KTjkDSVv75yEDh\nXerod8cicw/6bfb64A+5pGK/onxbrOsAq135XOS9SAHBA+F4+y+R3+A4nzZb\nNv52ztWc0BiQGQQk82ZouIbI4Tk6u6BZ3HGRy30b/MFtf73cfRJ76qTyD3P2\nHyEg9KI0rqTPYgEYfQ+buU2agCm/1kw5vPY5SGJKWzZZoc5z3/I1AJ8lqrw/\nLGHDkTrCuFeI+fWfCaWLA0ghLtlWeD04M5fcKC2qAJfS2XMagME2I5jxuaMn\njyQ/m2YRiXF/iBjKFyLjHUdiCwRo4IgA+mIMYx6DADv89yhlDT7BngLwCOl8\nX+HtH0q0GLUvzAPUDNwIoZM6rjoUn1Qjk/suyeKtvflHIS9CVoXjIWs6suyS\n7PJbHGqF2xl80NA8m24utwrjXv2bOwsNkapAQ8ID2tiAzjaUj/0t9jfywczx\nZCJGInqU9QsG1UpELoMJUkmFWv2HeKdkxc22hqzCO2sg+LxPh3I+4JSAS/8y\nnrIrBfW9iFUDwN6tWqhxWxR773ptJfbK/+bRHeKwOPSzcZkRj0Y/PFk6RxLV\nhsM4o+bcZptoz47Ecej7sJMX6Sxvs6UfpjMQOuUl6T0PMDp3l4efeH7Sjtq8\ncs+pirDJ3foxxYbPTKXAGrzrDFQ77M3FnyJZ5JvpgHHruwmpbMTzpdZdiIhb\nrC8H\r\n=k3EW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDRoubx+ZIu5KtXg1vprypm6eNzR4nHF9KVq+vX8piJfgIgbgCuttGUjw8WaRk5D/KHzC3WLklsdNJDHyHCoElEj3g="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.302_1627917408946_0.19597699422749515"},"_hasShrinkwrap":false},"0.0.1-nightly.303":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.303","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e5386cde9cbbb441707117a3b09dc8d59386f9ef","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.303","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-BiZPXF/fvmh01Y1MczXrpGr78JeHWmZXCWSx9Hv0ZFk7WbZyoFOzC6Vp8PGQItsM46/hhaKyN4eb6nO9GW81Uw==","shasum":"e1e2194a4b20cb82ea51a870024302388adaa3b3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.303.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCSDbCRA9TVsSAnZWagAALw8P/iaRWkiqPpKFD05/9fL8\n2Gew7UoeAnrIPQMsElkYqRcYn4BAFGtUL97jjVS1b07W+ArRh0wxQSNEVokH\n97BlCHT1FBPa5Tr44P4T2cxlnNlsBw7KD2as5JKE9GPPkZk18qL3OZxSSrVG\nG6YBLBVmjhG4jrL06JJQ52lIlLKO8AmMct0hQgW2ssidGagJbFAOtLJ2GBIM\n+a3c19V1lanny5ANxpCe9CPc9gm9NXmAEl6U924/jiEUKzg9D4T0qeLTqkNF\nGVVzWlx9W0utkzYjFSQ7w1XNrlnolUHD0rnrPXqb+lJ/QNwaJWLXnLOe5j55\nU8lsaN8Ey9ZeckfuL2Sw6tuIgziX0Wraog/fBJyOqd9905FHDabhGwTY9Q2N\nD2wTfGhpkPBD6hrwD6z+OAk5bvdMiFQW1wAJe9khX5g39YscZ+S+Mb0TWSvs\nX6cVKBPFiezD0v4Mf3ygRUV1a+qHKSWSOM0bOk1NxDWX328dSHKDSk6ZVglf\n5RZLhY3f1wHgtJSNyZrnjmICEpFAbzuoN64qI25XBbXenb/UV1/PEL4scsfv\nl6vOQ7ON+k42dO/VHLCm/DCcSHv2IjC/+BcoWajpU1D2jzUAJWpjuzMy+R8/\n/4G2qaiZE3McZhT70ZzOZfa/1ovGNmSTG6wQqG97/uhVCy3loihl+q5pqq5O\nsIeK\r\n=MBpW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHOP+pf6AtuRNw7N2/tS2nfldI+2TtiCsILDS088XOJWAiAYC83dzL58fXyFz1I9CYbkvBid3GGz9ZsFLYiC5f1oyQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.303_1627988187710_0.4815528818948447"},"_hasShrinkwrap":false},"0.0.1-nightly.304":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.304","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"43945fcdf9bd872354c92c79fc28aafbc40d4d59","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.304","_nodeVersion":"14.17.3","_npmVersion":"6.14.13","dist":{"integrity":"sha512-DrOLcN6EnXC/NqFw1ZnzYDqmGp8hWPSOiwNfO060h6zV4UYtfqYb6WzJ42zPSEKvhsaZ3f/xKxbL9WLN5CkezA==","shasum":"fd5b8cd42689504d173b6b8262b7e2ec8eb8bcfb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.304.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhCe8ECRA9TVsSAnZWagAAU3gQAJ7u/LS3okyyflfrjhvC\nytqnLbqYun3CJOMOM33mixp+xF0SxnyMuaf8GXNVjBY9s9A3z+Xt1PpTXk/x\nywazjyEN2aGTTxHUXptc/852j5/UbjvfhFpE6jRn1oyDeAmYNLycP2wALag+\ntb5Doh2MA7j1IU7mjU5CJN03PzZCA2KYSdsnavOv2uJ6kE100frWTEuwAdSG\nDeqzWAtj6rlFHHGet3Eiyh0k4AypVA+uYIG7TZlpCDsNxUn+Xn1x025cUB1b\nMhzFaF1ykPIWMTq3n9shCB9CbwBRbcXlMRcPp4GVNM4H7PXYX4Gy0UigB07r\nRRHOfMIUQzGpfiOlcOQuYxBYDqZg0cJS75cZCfZe1scb9HfosJWU7+krkfW5\nr5FWyAHTv55TuXDRloVeTqIYyu8Z5O+uoATIUMSq4K4LX90I4AtAywAZqrKU\nyQ2ZeBigd8G5nhi20XoukTfA++w19BYvKdW/T87qe7HaA90otBZoBo9SXkoe\npj+mMApdoSoOW3eMMuEvxY+Cd7BAEouPY4uox84Cd8LDaa0VBvoXrBFG58Nt\ntRAEni/k81yVMOD3LmbxuwOapXt5arej4XEMCa/1Vb8Ulu5WAWkiaiaH/dR5\nZKGZZ+YSeMg1aRnpKNvuOmRKo9aEx8ccYtGI/I3MgQJ6Aorh0BwOSxpDD17x\nZi/d\r\n=AaE6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHbawjC3AI3UyX+3PspjHodPq5+P91XQ9x0sVo3L6YTQIgNUHoQWuY0r38vgSAQ6DzBLuVx/8BcjRiYEuDOyF8gMI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.304_1628040964191_0.18830398978212193"},"_hasShrinkwrap":false},"0.0.1-nightly.305":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.305","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e57d7b658f9b2d4fda269ed44168ae8391b90254","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.305","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-jf/Uqsg8U/aCKNoedUXOhqYuIIUfrYWMSDmAzCyYQjNzFtxBDtvFyBV+iDC9GttDDs97Y+zOXcOFRfzOr/nvQQ==","shasum":"2ae1e9750de5e6610c139e77b2178d98df563e94","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.305.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhC8f+CRA9TVsSAnZWagAA5ysP/jEqDKMpbTqbbQJfrH9G\n0KlPOqx4bcotUIZEvt3TPtqH9B0h/O53SZY5MpYURElp0/jXlJmo2YrNWd5Y\nh4rfrk1qglLQEhIkckVMdOUVGaCbXRWuK4nkN2VAytVg4dIgZzdlbWcNTj8m\nDZ1oPVQ6QJhI3l2eFVomcGMgViNlU5gTt9GFxSp2YwlqlIcEE8C51IdKlaFp\nAr7eKXJWHsKgZOq5mUJcugTmu7H/ZyqGKXp7WFQrqLABuu8cAgmqrq/0K9ne\nIFeOhwO/BwN6l4bZRKFot0FOKWLTjLg2yaVC0bPu6Ob4v44oII/OYHhOWW9m\nHwSGhGEqw41PPsRTwP07qsGG1Myer1OtkWFiG3R4DbbW31mdTg9EW1vu0wpe\nZ5dJyCfhE3RNizcXDv24NmHR+27cLdGkd9xyfJh21RAiHJB5aVuOvvARfcZT\n6WeKDeURo+Vol2QBqqBiMsvmbPYPq3A1opn23gL1ue34K+VRL9pYFIleYcr+\naOg4xq54kTRZvF+FE2X5kZJ1jqJ6TMsVueoT+8tskItks3vM+lBDXbNL3a1N\nHToOK4wGRuMEuKPDmRz+2730buTZ0rjg90Kl8aA9hnW90G+ZTi/psJ/vS23b\nTakaUTlieLzic94O5BROX3v8GrmBqH1wW/WMh0HUw6HPUuy60qHMd1RGwhd2\n2WkA\r\n=k2MI\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUS8aF+RhJJ40VPdRiFvoBffvPDWz9PvhbG9kMVXTUvAIgAnSFmE2l2IL/nextUpg3Gli8M9GKNnKq7FOnFIw1e6A="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.305_1628162046074_0.15143806429646278"},"_hasShrinkwrap":false},"0.0.1-nightly.306":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.306","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a4be0fe5c2a3875787c699f82044c561a9cd0fa6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.306","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-rly5698kkMF+L57/VLtkc+WizEG9vajUT7AER7oqI6iVh38bG6Ly9Tr1HMMUCtINCfSFWJK/fMWcsGysqn+3Tg==","shasum":"ef5a44fa62286ce3b01b877a9422dcc82d42403a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.306.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDFPvCRA9TVsSAnZWagAAdrkP/01J9i+txoEGtR5NrcWE\nyblBeKwBphrgXXrui61CYOh36h3yJXXwiKRSUV5yGoO6QYMmeYZZI4gUnidR\nlgkpw/9YuysbfqHEZHPY0rdoIuIcO24XiGqFCUrMszOCcnBJSe4Y+meIqKZG\nE8PxioV3me/EFM+3oKfRvIg0wiFVFQmzNWJX1V7GS6Daq/pJlN3yk/U6bQYe\nX8AseDr+AXlOaWg0JzXHdbuImnCQT7kW2PZCvUsONFsBgOQLUwLkXOjlImOX\nT/SrjVhtaeLgO+j5K3q9ragmAhS3+DqYPnuKfIq4QhjHvPI2IvaM9qTsMYCw\n4HH7mimlpAHpJfyLc6+Cc1jd+Y/s+ldz/Cc34p4zwWhmCFfKq8AE3286zorJ\nA1jsTXm7XJKYTcvf6Sxhi7xn9yWymMND69z8vI1uup9saQanqA6HOpw02sEG\nMRmM2AZvc1tVR3FfE1H4tSGPWI0ipchAjvBuoidqdGqI1sS0NPzIFS7ctIN8\nd4zyLI+1B9CK7fNQVpomAJtW6LBJcMKelotp5zF6Kj1mW8PUCYlZVjubG75C\n1CXtwLH8Y3WYou6W3B9Ap/PyUhzLzIwFDqEKE4L3vMYmyYjnBjWIh7QPlnT9\ndZGYSBtiS5VUJHz1utk8IJ5Cs0XsCoFMpCjJZYpZL9ciK5jeTxOi3DvMAsZq\nkCih\r\n=xrfd\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCID0Q1ijixFO6cECMN5FQS8y++jvBCfR0op57PyWqtpQXAiBAKN3gza9wOHiZCDij4VBYaaHaQoE3LAhyde6H83A2PQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.306_1628197871094_0.5394106244299588"},"_hasShrinkwrap":false},"0.0.1-nightly.307":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.307","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^26.0.15","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"40d40923453948ef0bc397ff11055c0d1e883b1c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.307","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-h13dWy8gC1xR+vMMcyP7iExlfAzyt4fpoCgTI2PRbEEOHtdTiiA9fuIVEJgaFwxydkGkrjlzA4DKpllhq5rZOQ==","shasum":"a11befbbe4f5054fae27642416e00af3a1111a0e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.307.tgz","fileCount":534,"unpackedSize":2504918,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhDS80CRA9TVsSAnZWagAAVGMP/1T821F9flNxkMlgDLBG\nv2wmg8IMLZpFgPCM4WbVvPPbTF5SlPn2yc4UBS7TPw3zcQYbe2UI2HASsj/Q\nO1K9jgpsRPPZp4xlahOhNHLofhdphkgte0YnBKUxLkVNa0qZKqchTpahWW5o\nXD6CL93BxpxaM8eM2Zk8ZLIOJDmGYB07FragiJpd+vpEEv5CcHeFa31gDea2\nxyN/TIkeax4PqXyLWW5XEx9gLBZ8Av8JD8/Rc2GZzanHvOIbHwx0OkaYpFZn\nmtwirHSn7gWxN8hZ2xl4Zpuq2jr7yLhcVEGIvyItQcdw2fgCGJUqCZA2E9vt\nlWov/tM41eweWZHjrctndSm+/mJBjba31KssCOQvZWflMUQZF9ZtNFhpkxbV\nXTabE9jAc5dzP8pbisJe3Gi2kvZSZDlh3oozyf3XpJexqhAQTHPfh8ifivRO\nCSJDkNeYsEPsuzgxyACkJXp+zJ/R3eyjDIOt8L5iXjxljnGJJToZOMaSC0Y+\nTXy4okwuooKE9a39B0fSbMpSNS3+tRo4ETBvyD6TTZdFyUO5atoyLDux5H3q\nr3VrhC72pq5hamS2sWbYGFmWKZpkhvS0BXq0RVlBBkbpAkSDfnfBIIu7SI0D\nqaHRlEH6XD+1TRGP5jhmy3MvPymZnyw/CzxuMcIe/kMChea+fyLwBG5t+wga\nSlZp\r\n=eoeh\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz/Hw0Zx6agRi9Ka1TT9KW0qlUmtSTRSzx55Ez521uOQIgJBYKhiXvJI8eWsP0JKYeEk1h9ilb+ebhHae0WX/dAIg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.307_1628254004129_0.3927913426080143"},"_hasShrinkwrap":false},"0.0.1-nightly.308":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.308","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2443ef645e9fc569ef29c26ff4bc54e4a8e2e078","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.308","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-0dJonxi5bgFTkj1nQUeiwUKOSL45YKx053aB2Bq4S/4/5tr82ARCCAXCpYeARVTysN7cOOueOEEFlO1LCEK/ag==","shasum":"213906fe27cc552bfb2d540909d2b256f9222f85","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.308.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFczFCRA9TVsSAnZWagAAjNYP/jvvRpZMf4WAyo4YCDna\nEk8rQ6tTykyat1YZq+m3vIcnLFc0XzbhgKn9AkwepyU5y/WaxgutrCxpr1le\no8rI1Z6K+BGpiAvSWgCwI4lvP88Meg3TTnxaX4Xnfi3MUI/4ix5w5NYf0d75\ng3hh4ohmHXSD1HEZmyv3PlF5lsRWRGY6OupeQeIyU+1vkEVAhvq9X63m09b3\nY2RYpuZKPSoU4fGXF6OGxXA85YLSPK5aNpRyOtO3mfVD4MH8K/zSU+QaIyEh\nqq/32Fa0LLB8Rqudu0MtQLpfzI6cZg0d0dYYpNajmGUn/Y/XPO3gss3ijEPs\npvPAmDrx0rDoFdMax8dKE1wfwxJetnXi8fpiAxcQbPwiFNlvsNDxSfgymjoT\nOUUC9VdvijmA/KCVepqefyjo2EC12wUbKwAUf0bHbZiFRexbsOIZ6AOCxYml\nPgivlLS0j9K772PKARF3hRswm+u/Whl9KUD/w/7ohtlWNvYga5Nsi6NKkh+T\nHWJdcTnfyDA0QE5n1lC66dRC5CfkByueR02O3nv62E74aCDEL86Nvnk5LF4C\nngJp5AxEDKlg7xMKHg+8tsVqv4MW8cCBHbDGtGVJP7hG2iiY9URzFbKZlHTv\nn9c+H8RVi590G45mCapHf5nRF99ddavVFmkC8DQSG1CWmQ3iTpElkOZhRY7v\n41UH\r\n=7dD2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDw8S5m8VvKeNPXD3/E4DtCPBUjTCs+jRXXx5wlrRkxLwIhAI4qeebr6BAFowP7s3m7G/BbxEF7K3BOksld51mHQoJ2"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.308_1628818629702_0.13115763966683391"},"_hasShrinkwrap":false},"0.0.1-nightly.309":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.309","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e9c1bc4eab310efdf538d301f1106e132c5939b3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.309","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-ZcUtz/Lqf7PjpFtN1fJOlIsTDedjAaIvhWH+xLeY0Zx5SOMa6NiCCEavmV5nDC2SAcDRWe+1Px6QmHUUID1Q1w==","shasum":"f225daeb2ecee3fb3d29777c8829bc3d14ecbe1d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.309.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhFu12CRA9TVsSAnZWagAAX+QP/3u9oNiyI3fSeFhwbvdQ\n8gLw4lffugl7lyflzRhwWQlPKnb3i3ST9KPC2iaXmZh3b8+nGnvGl344SUsf\nBGZgAZGcz3r4S+M81D7TWan8PVjXE9zE6gwjOMN66Ak0odolI+HqHQJ2z/k+\ns6D9m6iBMw31Fdb2jMwzb8/tiwYMDloueWlT9pkWcY8QtOV2Rypi9rFHX4Um\nv6jryjYN5owtDsrI+M3jGlK9XpeOs0jBHwGuztTBPMY4BySk7/JJvIHq3wRm\nX2hUgm/5PLxxYNGp5Rxcok4dmZTBV2Ll8Y/4m7PUVE47nmodxK+92KtIJYWG\nLVPZYvbS8MuD7K4sF87HizpPYsNP2B2WRqrn9zeIKqd2YafsXQM3ACDJmkbG\nf7T2PjmI/IGckKWgVEOqmKr58kE0s9FIyEphMjtuL/rRNuMsY0W9tC/dVmgN\nfpfXMv5cqtqVRynl1wZXMtHcogMyapUe2uxsFdAI8Tj0yOXlGpl0usDCDz6L\n62rrvlOf0gG5OTmoL7fBM3zDVL+ypDFMYrH7T0WsmtA71aerP/8QOqz72SuR\nrime5FfD2XPBRks+HjaF17i3RXMxvjxR3+zI00K3QwYuaL9uNCDXBDU/VJUn\nOkX/2xG1s0lxdNjxjejXpn3ofYRoE31De+xRQ2hGDM6fJwnOWL6oC4wMM7F/\naytk\r\n=ZwbC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAtqY/a2Oj960zrNb9ke8dZjr5ZjLDNb0MzBjA0ADXpOAiEA8ysOeqfW//nMOtSD1iqQokX2CSyp8oBNT+w5uwkbT7o="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.309_1628892534793_0.0987272752154047"},"_hasShrinkwrap":false},"0.0.1-nightly.310":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.310","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"02cbf2aab45f087b69a2dc79972d6fd30f72f241","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.310","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-dOTko3+YcrIV6F9uPcAvAhz++po9fhK1+3MSRfbg2Pu3cvuog59WMWhTroeawWclxo5fidWpTkxlAJpP/NSFHg==","shasum":"f05f4c4bfa11e7d2fb435aebc3fa84caebc185b8","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.310.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF6w2CRA9TVsSAnZWagAASQEP/iQbT8TDwc8yKODYab8O\n98rZ54iF7ZDUS61+Zw+J/99rLdLGwQT9ilIilm7dbOHxe6rHDa7YZhpvllOq\nKVb7//pfiTR5Vt0iQ0KkuBskn2n+e3NuF+0CxAhfs74gbqKX3dpskbkL0NUR\nRHTiPGdFiBepeJgPWoQi2fSxslVLt9+6RoxTuelOPZV8+MAac2O/id+UuwFd\n9ElWrO2662tfqgwR8tib5u5zRXpISzvOfXdV8r0gVCPKERkd5XoNZQgNQKsL\ns4xiqL4621WUOfvC433NwIjEOKHvEjFeZv5HiaurpNc076jB7P/Vp/jOv/p9\ncy7/fEKQ2M2+Jyoe6MqBSRZtD/8MVmlryDjHKbstcgPkaXZjlOv43atFvD5l\nB3/prfinQIUpk1d2Vlj0VSHWFd80KpEgW29wWZSHAulqFk0S6hoTL/i61xxg\nzqYz8jNptg/c4B+DRpsndjT0JQy7BwFViswd+ciEVtx3di3j3IDRQYtF/QjD\n45i14SvCWGJwzUcNniTvO6sYwLwoVUxXYd7mm7IwuSvQSf8CmYLEU7TwLkcS\nmIKbXwku2oNHr8Od/uUPXiyf8UitmfOPIvil1hPY4pJc7ClMuiTPUXNaJFzV\nE0We2W9Ih9h/tCDR+1dMho3Qrn4qCeYdJWKwP9xcmvx3eWCUKrtIU1pVf/Ra\njQ5R\r\n=JQO+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGVR0sGoFbJugtg89+QY7KWQWW/eOfnI0+mkDSI+avzqAiAbXjpHHVLluv2KCHmyF4aeXZd1L1vwxhIEWtTUP4Joyg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.310_1628941366565_0.2226462251123953"},"_hasShrinkwrap":false},"0.0.1-nightly.311":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.311","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"251bc9441d726d3c224eff6bfde7d1f7d9fad4db","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.311","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-dXm6VkTLy3vL3sxNHZLD4ca2jAcmaiy1RZfwxJqKAf7uwoniFVkRh1CXHJEFFZEybiYJ9Z0qmEc2V4ruStk75Q==","shasum":"a5098e11bbfa5ff4b13b14ae0247d022f852a327","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.311.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhF8krCRA9TVsSAnZWagAAc6sQAJ/coMwdjjfOlJLWOo9z\nTVvEelfYeTCpuLbDQBNuWcZUKHEAe7EVNV/mEh7BHyLQSRMHF/5LQeZ8weoq\noFYOmj+FBwqYT76FpccHAk7pQHwrlpgw0sOZ3FEyAGR6G9URpFVJH/azxt/X\nRLRyNUAIcdndKnKEJAkfZ8qmbcmO4cOaRvmn59tjxahFLURFV8pnp/Lo57A5\nt9Tcf1Ma9IicUbutUtRDv+nYiOmlp4CA9IVlW+LsMRjBF2C0ceUBKNvxBoga\nvWBAPiv71BGy+jG3Il3FmWC0YkucAh6vbo7VBDIG2CbadWWLY5QEuTRBdm6c\nKw3CgAKLkD5e8BiReyX+lXUcJkUncC/rIwjdEoQxOOsBhZhiPH4cwahXCBcO\noOQ6/jeDlzDo/loH41ZB/XArBc8++RLal/B7wdTYsN4vLFxlmsJNqEuyt2qw\npkqFIQbrVyHUk+Fem7fkIE3nIeKR92R5j+3XkfGtldZ6kHbftgEdr8MYQ4Cy\nhfYaxUFe/eT6FSQm7Zwo2+Fd2baTXmZY0jxduolF0I8lJAZ4SsrSyD+xshBb\nVCsvhWyKAkk1RtnvWbtfBgnhWkC90hTrdwrh04vs2pzIRWxv791UlNlYm6Br\nbi4rimv7nQVWAneEQ4sINGm9FFSzY9hc/9AUoqTWutIl75Ki8rs0r26orJyG\nXfNb\r\n=gvsA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEAxrefHVNMGn/awHa/MzfT1YWNcK+rFif3AssdOx8srAiEAl/IfJ9J5fKIqhEmSNbQNmQm4z4b4jNxKK4PJgnTvBNg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.311_1628948779455_0.09308648837449107"},"_hasShrinkwrap":false},"0.0.1-nightly.312":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.312","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8314e11f36a3fac5dd36c8733894eccc9c1b79c5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.312","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-tkz0djCVfbJQBcVQhH8Z0TsDUnk0KgL96fmLqMcmXJcLhIW6ltmCDl9UMXMVvBekiBOq+QcZ0BZ1r0bhon6tjg==","shasum":"90f12f6a51256b08b4df4865fe62741c0f319835","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.312.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhHzNTCRA9TVsSAnZWagAAmhAQAKM+1hYnGhFT8ah7VCWk\nDaw9c0ifAyLjtc1Iu4tVY11+Uvod5fF+2Zvo559XMbpNd1dQjwoXElccfZfR\nuGVn87CZUr6lUCAxv85QEpspLg5ZGVSYK96wOfkCZdiOMG7Ihn42DGyfyP/F\nVvXDTTKC8o6TtSOE4UpkEwlCCijALaeYeDdEqSP5542H+kX5HsRnwoII5cn2\nqC3mOsyUqI3acTRbduhbh7ZftUUieqd/f0+uHlLQeOamnHRThlwSEV0bHNeH\n/ZLfNFFRX16jGQ5M4cLbj9ndnYHO+7jPlZFRX+w1NFtaLep8Hxl8wG0DmyAD\nmsdRS96KwxkflNiuT3sz02isOwHOP5nwWj/7ReBjiAVCJdGl7N6EB3ST7H5z\nM4Fv4nJHdJGqVK98bWttSwNdINMM0nYe5t0FXSJXePQkIXAvz4wW7Bi+nS52\n53CZX+RCtrZosDg2AuwK9cMQUZ65dqUoEf4zCXQfnucVJag0UXGYey4DrN0E\nXOD2aS7dzqL+4WSGiOImCQJqy02+TGgD172G6YI/17980dz1hG50uKAHExh7\n2WG//AkP4F61EfcWzXeHkokFoZ/3WbhIz96RGJyUTPbVi7RkpIkeMPgJntX4\n4uh7DfM9jwp7BknsBPAioviPFqpkNujfq1Tn/xh7voeIqDAbE9uObEWanga8\neOkq\r\n=8QRO\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICATVfyJdCjD8ZaW6DmcW1gPSY0SW1ylETcWWXL8Spv2AiAJCRWjU6wRmxvFxfzpONlQrGg3iSuP0SCmJm5BJEdhIQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.312_1629434706840_0.37182243736647824"},"_hasShrinkwrap":false},"0.0.1-nightly.313":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.313","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"582c1b03037ae976023af7dd4afc77a562fde30c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.313","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-Xzuq9apOxwI3aOf/Znl8Cja6WkZ0PpLFmXfnlf/G4i6vplcsRTKFfm46F9FATC4j8rZN0f/2PN1UmhjeeZMkMA==","shasum":"2fe107900121e6178d4162c7b429d57eaf369ff9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.313.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhISxmCRA9TVsSAnZWagAAGjgP/AxbDXjxi/R/zEp/AsQO\nHJzpQ+dTvw92hyVsigZth5TlLo857AGHC/QOkrbcd81JS91PWfcx/hlUH/Qq\nqacDdoiKVzg1sx96tr97xvTCpo997aw2UbhEf3VrHGDitLYdsh70tChz6IyI\n6oS8EuxB6WpcpaRHFVPp0keVuCQDtEyaRLiWWSmhiLPg/sDacBZUoX1NFSuq\nusmHbAz2a00oSgLexilri+RwXCtLU+h28qlMsP0waotgcwvZLXvhpt1W2KVn\nwtvnKvrJoSkWa219aZqZxW0XqKGfoxiqecKknvBJ+HRe5FVGwIP6qMhmts5Z\nQIwPrXlAdBQy368rhI6dMxYEYZyBBSJRLTdCKFHEZQBypFyVwmcN+rWsjene\ntwjMePgAo6ZMio3xFdlePr2QhQ9KN5nKuzo9qokxahl5FSXZR7WEtmKymIR6\n45LaOj6zWZCR+v7nut9r0L0vZ6z8l59LS18qy21wTX0FrgRtkFMNTB19xfCc\nQILg5toSvudirRxjW+OrVHT50BjpWhfFYlSeroUpPInvo0BweGXOTMKHsMzs\nBcMjN8e+JcVE3TzMrOhMi3jmm0c+xx/ERUmuBxZGYmz8gMpeD+3GXHHdWse2\n9KrX2/W6GfZqjW64h6ueD97sRMx4Gifpa6gGhWl6PIwx/pll7hGA80/ZH0tC\nStuG\r\n=wwF1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkfsjiq8jvjO4aSaimuXIa0+rtwlgpwl8Dyf643oRaPgIgdq7proPjnnJGuBdtb16dNTJwADj6EyaDCJLNHlsVnnY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.313_1629564005612_0.8816799923141645"},"_hasShrinkwrap":false},"0.0.1-nightly.314":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.314","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ae57c2142fc787a868f91e660b3bf6af59d68b4e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.314","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-w+lXcqQ9t8IWzOgmli7lJEE2KiH8gnsE3vn4zj5Sx+tAchLq7pGYibsy+FK6xri8DKW6S2jvBPjU98SIU6tJLw==","shasum":"9f6c33bdb274c7eb167c47228acdab8dbc282ead","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.314.tgz","fileCount":534,"unpackedSize":2504917,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIWMTCRA9TVsSAnZWagAAuOMQAINvnoFha9yF7GQfJKig\nzZOdLvbn1GAOECaxhVyWRfUrv8K/V0fAM0cbFAoKS3k832yT/YjJBboimxbY\no7a3sBis/zbYHtOLwbL+177G4Xc/y2wUIF5gHyHNiyYzutLHJ+z5gcdeav2M\nE38cAyP2fibX76HPx4U0OrhpZKl8oarIVT+lk3Ko9UTyRE/M9QB6QARwrPxl\nR9o9kBtu3GwjyXVPL8edraPii/b2yIs3AUwIbUAELoLCQX3frkZvz1rwHEJI\n+/Mv3X9GZb32iUltbsfTpsJa534nb8pHHYFwU9/yZimPAzN7EY6P21rl0Ggy\nsJGPCBYWbhO+1bTnweJpaLHAWsiT5Ac6DzVU40Qwhk4k9TqrHPk+lI7Mcjac\nSOESLpgZ6B7Pa18xddz4++UxNUCQfRirtB0qCRlRIj5HtIsZ3oUjD5OS6c7p\neRecL8vIc+64cT/fWduFRBW9mrvmh8GjlNEPzLl3oBQcyGPAe5kYoKhGzHOd\nu5ZXj6JgAQxg5BQQ+sBoTSftMYE0Hpt+swn4JgpEYtJSQw5CANz4WIuvb9Ey\n8Tnnip+dGxWJdLZdq1T8K5wIvEMl//bDPGEX7qGTqt+ALhYvuRuorXPbY7cY\nh/sh0L/ud9IArjG5neSSIJ/FQTFFjCXpGDRn+QKAjIY5tuxjy/B61S5OFYMF\nfV2U\r\n=FoqF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTXCnP5zcjalx50sp59DVhuISYsFI5ju4MY8C9xNNXfwIhAJfkLMRaStna4exUK9p4YdE/omi8BWpjYbG3VD+XyUfE"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.314_1629578003152_0.1271833900674908"},"_hasShrinkwrap":false},"0.0.1-nightly.315":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.315","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1311ca6d0e157d38289e4cf9ccc480406e8c70d0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.315","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-S+eNAnwvMdQkRDjKxpunjMpxWILIoYwUIt7ub78Lu6Ws5Nz8BNu6u7b7Gv4vM0j3RrgMNgfklm7LHAjoNkk67Q==","shasum":"b75630b38f6a3b1d925c4bddfbeb7ec149725e41","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.315.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhIYr4CRA9TVsSAnZWagAA1D4QAJploqIjJ7yd9TU+efYG\nCNfd9AxuD22LL9vu4svuthxyoTbx/QvZY96w1B25UYxkPJDR/e8FuGfSX28u\nIlzDwiirqUMHTmEkyT80nC2zAuHdDQHAc6I1lwpeCvNo1xpvP7ku8bGw+kuU\nqBv91VX/iA46IJT7Hwccbs1km99PsORrh4ZjFEtu6VWxEFcy/Q7cXMV/sdMH\nKUSOo/qxlkuGaCIGJi9b7aKb6RU2gD2cRutuvu4OWo6a+cnzkGN6GIyDaqHJ\nwDjdA5w61TapPeAmP0nzDknVPNZ1uUW3SQjBuMZfZxYWM9YxhaXbjoua7m/W\nu5Yy+m0bx+NO0MVs8M3beiDrJQAeMxtwYBb6SrXaQgev//61A6HHwPHYUv2e\nVH+b5R/HxVIgfSHWSKhD/E6H76k11emPqtKl4OjgZ49h8GuOo7No7F97Ez8t\nrbkGfWPtb9NcyYO9rgE9GfAZRObPOrM3pQGINo2Yu26IK7D8zG0sONMsCPje\nqwm10Q7Xuo17QY+INynjGsTmFPEsEMpBxrsmYWprZLLi4I6nlPK+S47FH2I5\nqjPH4LJ+UiXchWz567RTV2GOZwFzpRfhOzv/5bmcP6nG8DF9ykhuGoRpUcbw\n8cAsIIY3Zs63gKvb0wWJ1d4/t/GKNhTTad5TNiBiWk55QJaAnqR2aGkYaFT5\ncrXo\r\n=v1PQ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBYXaiO1CWn4IsO2gRjYRaadZu0SAEvruSNQ9b0zU9kuAiBfo1vV+ii8KjkJTbW9lorLv8qsowpLTy7Bp4Z8NXXrig=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.315_1629588215978_0.8752564253390038"},"_hasShrinkwrap":false},"0.0.1-nightly.316":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.316","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"85ef702a9bb11f96fe85341512037f040ab0b90c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.316","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-Rxzar0cPwPmLrgmvBilWXl4JJc2/5tz3BMunQYQl7tLItM+jmLhCzFPvOa7k5nZOV7mUvXIZXS7wVbTSWGCVJA==","shasum":"12d88f00c331a2dfeafaee19cb87300a3bb1cdbb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.316.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJFLuCRA9TVsSAnZWagAApw4P/jBDCv2+8eap6yMld2T9\nhZo4QuQgoLWqWVDMMePUz9UxnSxQbH6XZV3YcMc3q1Hlb3vEGwZ3R+E9VUTg\nwbLOJ97+Jwydx3Kx7Va3VT/hQCDKsh3VIHgMflbRZVuQe7Z2ltEKjfRYbR/P\n6zJsdnvjNteMF6XsotFnZvOamMwX59PG4VUUe6iwT4ZXZYVaBEev4JG0pxe6\nTQpY1nT820GRyxLzY/CEj9/9rlZU/uyg91ImRPB988fWu8swexP/Coigwv1p\nGqj/Zljg5qQJlAfn7gHJm3L4+YXzfG7CpPXVN8n6tLA7r0ocUroEvngfkQYT\noRS1gJz0t+SQSbqlu5gLiCx8BdcycXG7A2vRF3yi/Uo0DJGyX5YKjIhhJ8Iz\nWE4+0KadDUN1mADPAe4NHZvxN5RvHy6vYv/ipeloVjrR8QjcHyoyi46vAwqI\ncyhRMzLKTvV4v2iNG++f4x8myqw48B/Y7kJe5C6XK07gX4HLIC4SPNJIYR9j\nfVBIujMYm5Jo3r0XJzIOVtwZtvDdQxFMiAMTtVXqx0Sc3prkb0Gora0ZeGhY\nXVex+Kl7swV/GmlnFp4KGPqrdQkI2LlQ/663U3psbIeUPJYPsr/T2GXZ01yJ\nTkNunZHmkpQ7SYYlsHEESBKcOKOWZ98d0dn/xOk5W62WNL92oKcN5jsrErIr\nd5q1\r\n=eoWi\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC9FrddUNL5lNTqoDpVnpxS2ginI3jruiTfi0SZJUARzAiAYBLzkka6YX/Ob3lg/LVROHUZkDZFBbS+9dkyYxtQfFg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.316_1629770478450_0.5737330931482005"},"_hasShrinkwrap":false},"0.0.1-nightly.317":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.317","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3e15de6a558d71a0ca121730593b0809be8cd276","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.317","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-Yo8SrBpVJWZKv+Y4o3pxlTI5nluFnCBlOUZ5xdrlOp6u0WBW4BkaKvhRr50bOazDaWfH8EeW/T5FFnKjVHl3gw==","shasum":"4f7bbf3e60edbe394a2bb5bf244da22edf673996","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.317.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhJ4+mCRA9TVsSAnZWagAA5P0QAJsrsEUVNAstElGJoX7c\nQeAxGb+QXA6TgWsxa4gC1TpmuEm/rn5UClgbwBLpuu+RQMzEtZ31U3sqGXPb\ntsrNITgXY75T0/UDY5CnyJligzkR90xnQc6/y9hUoOIVv9e6BYoOw39tdnk7\ndwp08ZY6MK0Y430r/fHaR2ZrEYXKGeUYIYrU+vs54XODdIvmmoiZAQmN/AhY\nodmQxLNmhawhZwCz+K/ZxSwTiPqAKrx9oRcITf1ILbkDkTyPNG3Njq3Qg/cb\nau26DI9SyGC6MUE0bLn247SuGUb+ObejUM4qfvfh+yr1sdnNNzQiwzDosI6E\nDLEQOR1+QdqrQLaMKqY79tzu7tqxaM3SWQW5L+OTTnYt5fyCi8G3970ZG4qE\nF8XJO87egFitbZCVlCQf1/XGL0BctmJY0BgEcF3Jj3gcBRC3GOADij2VX2V/\nCTkSu2gfvVquyWorfI8yLomOblCa6ThtOHUiyVk4+3AjxIBiEM9jqSvuq1tK\n4WItEj2ZYhamRoTcdbY5iP+sYLINSiZSqYG9fPc2L5BD4oZiRBzq8nzGI0N1\nB9/zLkyOI8It3iVA7xOHyAif/gIsy5wAHu2X+hd4TW5T0SQMSnZP7CIzcVSC\nTUWSnSbdMnp5n2pNyF78Gl/JCxvdRzh5EnARTj9hm8yCE4q0VCY4gSDIiDYQ\n0xZI\r\n=RrxT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGguL/L+mstpseAhPFvp/MsTnqmt3AHh4z4897GX+gWAiEAhpIjeJkudehF/yZ9pNwgBewWS2lkdmd5aDQ+M22abT8="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.317_1629982630453_0.41770699804996636"},"_hasShrinkwrap":false},"0.0.1-nightly.318":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.318","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6fd0067b22a3172e8bcd00daf33772fc3532004a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.318","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-zw5kohgWUuTDZ2+BQKy/PjIucNXfp6w2M1YaJcpirQS2FgrR3fp47yoQd3OYnPyIrD1Lfx72WxopwWxSMSyugw==","shasum":"85e1f96fcd851ed6c1ca6ce6b1e99debfabe4fbb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.318.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhLaXjCRA9TVsSAnZWagAAwD8P/3MTd3vwwPCtpSbQloV6\nHcvZCmX5iiCGH5sdUB3EWfpJkkpuGACBkmXWWW4JwC2++1RLsRw0uaGSWV2g\nsouj02mIPuTUK6sKXnER4c6rxqEwVMIXjXcccIA+E0N6/F2AIsZIrV/ROpLz\ndeZmQfflSpzWADvKWC83dIPEuHxjkCLS5VqGc4NCaDOIxldnWZXCc4x/I6rb\nNczYfSXILMsWf92UYONgguP0QidemiM0u+cVcG9aeSElZ+Xrvo8Pmi39CXCB\nJZXgrWz3yDrY2LWkU6pZ2U2ROxpJksG0HOSOue2AbBeARVOEVdPGSd6WUy9J\nGuPD1B3HmIsmo/VDTCN93P0TNLb8rnhYJXURnsh1NRGwAF37V+fdMGEF811f\nDOy0w2fCYuEAD+QWPBJQl9Lle+7AXAZNzWfJZLciwuhjf0AYDV2oKgkNjrXd\n3JGafmQlRj/accsKAgCotFXavatrZQeMulS24qDHjSBQwHe3WbT5rhNhaiaW\nr7lPAPrNDC0dhwdwJ9Uba9m2SVrEdQr+mVfsDGBiGKiRDFwn9Lh6dsArH5ZD\nafuPl4qRqIJZdVwZDOkEGsr/dnmjHb8j+pZBlN2KN9BwsAdL1BDWoWv/dcKA\nowDevBnrEOAEJTjhQXCCy/UBLtyJuKFyVm4DipZv+WHChJVXrYB/sH/eh2sZ\njLZH\r\n=DTCA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDkjdYImabg6jGkndrJTs/7cMOKdJuQq00CD22Pio7PRwIgBzLRWIC3y2pDUXbPpcig+ouvjgm5yFOlkESNS7+JV8E="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.318_1630381539512_0.3697221467754477"},"_hasShrinkwrap":false},"0.0.1-nightly.319":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.319","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"037bea51e52d8acbcc093c6bfa9eb133229e030d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.319","_nodeVersion":"14.17.5","_npmVersion":"6.14.14","dist":{"integrity":"sha512-DDQ7ZdlRlhsXBgmcq5To+9pRzvwQRpu/gvcjhTTJM5zaOzHCRnYbJleVMkUcfv5Gn71o6RUFSXna9zPlkKS6cA==","shasum":"3e218454ccc6032efc8ba8685146fbb393de54df","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.319.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhL29MCRA9TVsSAnZWagAAWBUP/RHO01upk/NHN6A6VJH9\nEk3HTa+cT9JjAyGchiXh6h5OhD12a4DjqjE1iSNzFwDjSjdLhNemepsuFqX3\nlxo6VtGCtmitc+n6EXmM/oe+VkkPulSlLeE8rpFWTpP4en7Pygylx+xP8t+M\nwj9Dl1xsBN30Wsb+oXsbhHO/tFz6q8rok1yPF2e0v5gEuInfyhH1Mqcyrtdl\nZ2RU/NlWheOE90j955VuwVC27nIEBrM7tRMbikWxggS4iHUp2umcYeVbk9Pw\nwzUe6Y2+ZcyK0GzDrE3hZkgT0xWQPchow4olaE1aNuDmthowyUcLcnnstlVO\n2UUs81U1QiXHqVgx/hB5EjksJhmA3o3UsENt6nsqHfAmv6LvQMmAM14tHvZZ\nx27KXn1bYgJkLRk6vzamT1QoyJvvSEnwJkJkVkgHY6s4pAVl/p/gRAv/Qo3z\nSLiQ6oTkEUWW/FJk8YDZKk5ZUtzSKRNrONtzM2K7Oij3PdkihHcHQk44Tbsq\nqwJDvK5jWxh+uit/qhZ0Mvt5rUb2hZqVvEd+a9uzFJL5pSw27DbkZEpFmIiJ\nsOtN3kUydpoSjDOvzBg1grdlmgWQHIKOeUUjT/128pvQRUxQEGvILKuaC0xO\n/Iqu2FgGlp3NE1VhsQPVmTp2dgGVFBOgmBIVcN6+57doUG+o4LW+SjoDh1Zt\nnuZ1\r\n=+BDk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEs/locupCHlsBe4iFU5812MVaiursZkrm6LXj4+ss3XAiEAxXMFLD2Leg9+CYTvRli4lXufsMLPxuUjtcGmHB5HgG4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.319_1630498635883_0.01310734491992993"},"_hasShrinkwrap":false},"0.0.1-nightly.320":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.320","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2f39c419261a6a7532a8aaf2c1986f7e3c9c5122","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.320","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-0OBAQsbsSfMv+Jllo7YNGFSjnVuAOvI5g48vnlxFmOcV0w/UsrYv3Pap92y5SGRhdT9Vt4DB8Xl0dMl3B/rHSA==","shasum":"1515c3435e84b1f90290c982b092654722453723","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.320.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhMYooCRA9TVsSAnZWagAAV5MP/RMKst24dk45Mbk3B7cQ\nr8oagRCo3VY5LfRqev5kdECeOBmgD58bihv8xrnVYHzQw8ClIf6QYbmi1C+5\nC66wzQQu71d0Y3WhATGPegF2G2dyBt1m5pJNdZfLJlDn4EkQQwyFKeKBd4zg\ncYepAw+r68zqGT0XElbrJO3khqZIpc534eUw15bg71d80q3hzweEYo+6X0cg\nf9ybPpg8hcTvR9NUTTYYM9O+XbC/guOtRYau4Z/CEo/4CAIwzUXZweihd4nR\nJwFy1sZlND+0vNYvjHT5lvzgnvai8DY+WYT4PZO2P+6yZ2L1h/GRbwbUQ6cY\nqsjgr2ETU+Cg0rJJ7O1qm6A1IGgfDen/aA3MGIgATqRJNtEOFw84Hixeycdv\n+GDHM499flqOhCVOl1Uiy4IKdPKDGt/A+1vCtWPckMkuSXNDeiZU5sfDqahR\nFueTZcMBjexbPAOcONfxTh/TfAjnRFZQXCAfTSGxX4CdoXYsflx98qWvH5Ne\nEP0WQz9ONL6Fsx3sy6lNgoL1FYU11065dZnisfibLLG/gzyij897y0TjAfu6\nMUfDkgoB7dDHM1ymna2T8CsEY67VZpB9EQHaMVGTGQqVo8AeVDk4LmVOLvBp\nTZS4nj/4C1ln/kFO3f72Z3aTt/5ud7loFKl5p9+B3E0UOl1wvNtKKYuH7k88\nC3NX\r\n=ICQ6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCCNmc9zraybUW9TuoHavJ8cD8K2MhGTFdRgU141sWaegIhAMFybitXeAy1lvYqirdAAE+bekDCqw53ABU3G5nUslby"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.320_1630636584174_0.037969704136582516"},"_hasShrinkwrap":false},"0.0.1-nightly.321":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.321","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ffb62c62c94ffcc732a889027e694722afdb4094","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.321","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-onzwRa1mhl5Vg33td5PZR59KkgKKkj9Q06LamdAvz7iMniqOoPUO/fc5jHXkPMsDo5eMkQLm1JvXQr+DQq8Sag==","shasum":"b5cac80eb1536405474393d1613b86c2c3330d9c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.321.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhNfa4CRA9TVsSAnZWagAAajoP/iaP1BI/Sq9zmJnoklMP\nm+s/6on+IzgeA+5dIMFLzqYySkUc/fmrA+WG4XgSgJEHsZGcQnF4x696+4sp\nOx57bGK5arY7KI9/nR6t51yvnjQjHcf8/Drcfy4owKmYpbpmkSQ3GQEP/xAF\nJRbIFhBlIBehKBXACUHnR5APbT/cWS1xDVXoN13POFkhvPd2vvfbiqwQf6+9\nYNIrU//Vvu3EdhH1NVJxT91V2Jo1wnYjtZWyjXn9MvcaigbdUS2lFMTRULDw\nMAEeWWigCoH1kjjxYmMyfpLgtHdbijsCrPnRGVHdGRxI4CP0dry/0zYTkDQn\nEOcwy9vBPzYRzUEI829N+3bPSu8IcB1ePvZlPCiPgNZ6ghWF0LBuG0Mnw2h3\nDLKGO48PifzZVbN018vGKgi1Umt0Crmdt1YPimGOSi3QegjTfbOrECHP/N3e\nN0+pNYanXRZmirk4GK2KVjSeuXWhAADinP7GDgk2QbP21I1QqvHZ44+XTZNG\nKJSFZw1YnNU9PqEmszYf05Yve2IEMpnfFnUIUMQORHq1UIuQ2iAaV805Mhae\nHmDH0r3agL65vHR6fLjlyH+L6rpQmslwrVe6wCSi0gpn0HDYsqvmEkt6o8gM\nho3jC3hR51FALkeNLXGmJkk7lezGdVv5itTNAE2saeLFHadF5pOo8iGhUrtP\nyB2J\r\n=arOY\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDMcTF+j9UOgfWEzNvixwrDDnKzD2iEEpi76ha2yzhw6AIgXBp9IvYbn9cFnxKuBONDRk1sFwojwcPLgoHbB5gx+bY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.321_1630926520678_0.2846515528553746"},"_hasShrinkwrap":false},"0.0.1-nightly.322":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.322","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.1","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7cf006aee78099eeba33d045368a2bba606680a0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.322","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yaYL7+khXA/sb+9j/SP8fog6LOqyYzbgKZEDeosARibyU3Y8AzgnZNWvIc0jLLQWIfh2lhQ/X8HiJe8Q9xTf1g==","shasum":"78c562e7b9c9a4f7fa9e78e33f947dac0bc17eaf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.322.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhN0cOCRA9TVsSAnZWagAAH9AP/07/EXaBfb5YIb96Joo8\n3vXnnNx+5hEXB7Sam486bIYrC/TuZ/uL9Z1h69O+XPpwlZ8tN/+kauJU4H/T\n7ahg+Q8GNCULY9R5M23cDnbziOlFZBrjbfAA0MAbpqI1HqDWJrCST7scAcvk\noA+oiqUjcRqNj2u1l1N8F5F036cwvF7EPjQn13wSj5zly3q/x95gAqDKkmnu\nSye5zqkRMBUH+9icavHk6DmYI0yMP+dkKpJ+n0cvt15xp+7el+Y7y6Fp1H4x\nempbX2yMjNhztyjPRObangIaYw0kVGRA8JL9ONfxDtaCoRid8epu05hZUg5d\nyPQWW1UFqNT9HbiBJvOaxHYdJ5QitxZQMBp4bKIGFPTv9WTgVbcws2KopBcP\naf0Hi0Bov6kvVTanwf19Zdv5eDSXAxMQPsCD59d61IIHp0FY4e7JViy+HURy\nyyEj0TUOU40fllpcpP1/EjIkjqQwRiJbXiOSTAr5rdkynfyT+6CrbH65Q3Ui\nr+3PR1fYa0TMGeJrSWiSN2yidyEzZeJ6hCSpJXQNnbvLEXm7bPjK4jQniXZ6\n43/PGSFtwZE5EBEFjbbIogzziixiyUULj/vdCnS0Pc4yFV9FJz4nhiENcjxo\nCrsjFHYu5UGBmCM7gNgDKWyFnJvHamo0m6eCtelV9IyAa081b3jhZpRQErHV\nvSXN\r\n=v8uS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDpKo+4xjE7ahuBL0RaeIU23Vi2KNp8H9+uacZbLfDbfQIhALcrNkq6iD3JsMXzfWG+07OqvP6/F+xmfOBEa1Np98+D"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.322_1631012622493_0.3723919468732233"},"_hasShrinkwrap":false},"0.0.1-nightly.323":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.323","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e4549e3babe87c72be16ade873f2620c833f2934","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.323","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-msfk6s9z63nbNv0SrirbhFZLNuyXJXFNYr6PBnG1C2fbIbMftQkhwSCp//HPMG2LGRzfyfxMYaaO7cUPxYtniQ==","shasum":"5bd2f75e20095754a02f65d0471d192a2858776b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.323.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOUguCRA9TVsSAnZWagAAX80P/iByzzHniSh8kIs4tIQN\nhELF+7mAwxhhEzLbO3dNtNalQoVzkr+AXcHdSVZiXGyW+4bMHtSKbGy8RhBd\nsfFLOPeRiqtek3uA8Mr/BOOsP9QFSI9Nj1kJt8dfsPxo/LBHpPGjTIpYbLwK\nIWotxPjAugCxWubUlJz0bWVBCRlNtRSv3XgTOEVjbYu8PRQMonR6bTmL99MT\nl4SbthdD2XhvEHK/mz5CXFIZGln/WRsd5wskuPAsENrDv0sanuXq3W3/zs/c\nkQt6K69/8aKqYivkUtQUN96YaZoFoeSv9ea6aRqoyxVyh1v0PWA2PSBl+Eo2\n/KbdtHPdxD4gxaziCayRWXEhKPZ02NtCywu3UVvwJ6+khD7UslvX2NPGHu+T\nOYuLhtPeJJbW9AmMoZcQsnHiLK4TENiufn60Pkn15Y4lp4zBRi0RJKBTIXWK\niGh+4KBNXkQ3ha8rsxZoNukjSWSxHCtbTnS8kUPS/RbNcZcdw1iSLjOINw0S\nb3K8ufkpbX2ffl/t7Kl3X2WA/xma3TW4s8kWGsAIngGgDweBrnxBs5zpTa6M\n9VmmtJWkX0ySD6PwWdy216R/Oqw1SboEDXjSnZ91ZjpAKb0wvAb5AIlVS5O4\ntXSIZtPUEnMoGKR1iR7QzErEzb+kdi/L0cwSFpBkOm8O3TsqfHwoU/yxc6h6\n3efk\r\n=P8qG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDz6JyfQnsyhJzEWTuRjq3KO4o4lTftvnyD/4R7Tmw2DgIgSEMBJmVsg/sM7jiNFkXVOgVjwwlRPurUr40mzO5xx+I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.323_1631143982170_0.5101062452574017"},"_hasShrinkwrap":false},"0.0.1-nightly.324":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.324","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"23f666477be1afe9ee0ba31be9a550349cc4e1ba","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.324","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-6Ck9HSLWlFE33nrKLE+jUQ4JabIB/rHoZ+nj3X7uMhaThwxaTUFCI+vw9hyg9pQooUOtObSMDNCFI/PmkG1pdQ==","shasum":"0f2ccc7e85e9fd3df69aafedac099b5b6f47219d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.324.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOZICCRA9TVsSAnZWagAAQvsP/id0FolMRG5bffNRw3Pc\nt/Cx4WYW5/vEt8L+nc2SMZ14qoVFDZEacr2EcCswgB73elw7x6zUYlGJilH+\nHwg/jjfY/FioiKp+2/Ik+UK27Kw62eXrG6DCpg8h6YW72Hfey+OQctKTrTE2\ncjd5iPX/GTgtTuzu7sbjnkz7rXt+f+iMNtfnsvymJV9QIMbp1oqrbDt3MOBb\ncHt9YvPdxFxB9OQ4rd3C7ytIntux/am/AzARkUM40xwT2SqsfqxUCXWGKpyb\niTan9IQaW9bLE9VyBT7lHkIv/GvM6n34J5vXk8Ia0Cd/iZG+KPHIAYbBs6bd\nepb4grpbudDIKs4NG1Ozd88HyU+oOudavLhbAmrOEMvX5M8+Kr/E2gUEp5fD\n53znAwXsRiYjVKWRQIQWUwT0Bquk+FqwKV53ZsNG3AxkP57mQ+HsNKvxqee0\nnycmeO6avvGeoIrGq54Lg6CmMaHCkUfje7OprscQZfxBtsEIHDhWwHYABfKI\nqFOVGbKN+aAaY1Yn2CdcW/bRZQSTLEMzql4w/h0IgBbeobnrDNv4oDw932Jh\n69R7xspHoOHnpa4XOA6JxPQo6kW+/GAhk4FbRFLe9dpv6nlk7asnHQTXe3mU\nsWQqYuGE5Ny3eGEyoBgLosECoi/AxU5skTK56JWe4NH7DqZkOMPD9zcXzXl7\nKhZw\r\n=NaOR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICNfjuBKK0kCHr4GzgCKbngk0I0eA6ZLV2sYmY5KDWDZAiBRa8lLSLyG/tTvT+aJ4YfwarshjciMK5CLWdtwG/MhLA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.324_1631162882211_0.7036976880114736"},"_hasShrinkwrap":false},"0.0.1-nightly.325":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.325","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fd682f3f16dc1741c61b1b53e2eb4365cf72ac5e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.325","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ttdXo4MJt3JO9oBONgjqx/xIgan/TPynPF6BjyFQ/7PYiYxWtfgaOBgxCOPbBMuTUCh9jZBXEZ6M/wBCcEY4lg==","shasum":"b33ea238fdaada38f7e10342ee4d450e091a2608","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.325.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhOz3yCRA9TVsSAnZWagAAbs0P/1LGzPiTnWI5L5OcaOmo\nkfKa7IOGJH7TXAhP0pvAfd5FNcNSzYnOLS9M439xvF9EKa7t9HENb6RcbC87\nBQVgoEkfpV9k5kLun7Jces2kzTHAMzRguMYmXdobM/qh46MzjyW2BRgLqbYD\noi7QMnPleW5iLUjrynQSJkUVby9B8Zo3L4wBFauQNPFEQhjGBEcsQQxEHRFX\nKcuhmdqoyRx1YIfGshymMryRDxKgNaAxUjEM1LRURXKAcz55+jy8u24QW4iX\ne3ZiAWvVA6r5eXmalIkyqTzH8/ZnvA/uWPpkOkMNOBSpjRWnfNJBuSZxd1b8\nt+3ktgueVhVqsG7EsW0+gteefcoldEw2So2jREgUbpfKHbGlT07zIP6dhwMq\nXbLpxw4edc18jLd9UruSzOREPzBr4/JlAKmrHOz/ehe7yU1iKKb1oSUtbFD+\nLaA3OIbOS/bL6UgSju55giIkhY/PKnl3XgezfdtYc6WByxBKvjXmGZ9WGfi0\nOfmoi/eSVJt4CIBV/O6Bt5hGBU65FWDrsSJsHDLGmhhUAxyrMBHEHX7o9PCR\nh/yBFNvlVeYxnfSNPrhGF+menS4ENFmW9UzKmjYcjD1VK6Et+Qhfh6AWdPwq\nuFOsBjtW2tbXyyl+8Z5O3p2QAs5Dp3dPyBTpLH8waSHYmGswiP0isiMaxc4B\nqUNW\r\n=aG9V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJMFH94GvwLdGuOw/juDHgvKrgX9fCI/cKqPH+cMZ5gAIhAJvBGRw9apMKltgpniwBW0oMEGYl+MYH7l0bNf/oYzRT"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.325_1631272434206_0.2956535223118337"},"_hasShrinkwrap":false},"0.0.1-nightly.326":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.326","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"90ed12d9bba62da2aa0dfd3c45dd6ba2441323e7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.326","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-/wvcVSWwuGeE3z4Qdt8TPmwJbnibmIFsg2BWKb8FG+DckTl2lWAJWEEMRzI0IFG9sRYP+bT6mIUut7qfgozy1Q==","shasum":"9422090e3d0fb67e40648322a0db08522ea6abc1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.326.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPJXMCRA9TVsSAnZWagAAwkMP/jClafwIJ6DCGCzrgOES\n0zSlDozVWvDTpNSj7OqlMJbUWbZTy1juSgMW4g5zJnE808USHrZO+Tn+2zRM\nlOpN3PGmGKIJ62vmUNginMMutIZFLFWlU4vmuaRPpQ5hewWUHLjZINq4pq+b\n7zz/kaEJ1S4byBK9bpMkPDgnnpbsmKPTPk6mmuVj/tLkPdgKiE30aFCP4y2E\nios5zYoRcDUPh0l3Yes0o0VeInMtjEOu7kbqliM08xDwTRCx51re0dcV0RLo\nHjmBb71treREPYtGHn3qURSmMkcqkdYJ1Cdar/YetzW5HZ8mMDJM0E37QB3W\nINiABw5Kj1vL+zjlunO0a5s8E35l/PNvkzWwcDEU9121WzVwKSnNNjbz6V0o\nX5j6o1Uf/SF78I9kSLuCHtlEvBXiiU8fyvPiPYLg25H9sWHKQbLBS1aBU5no\n6F/B9NL0e903OvZa7dvJ1Kk1VwEWK1F9OM3Q8jIKsIuyEYg3BMb9kCkU3pSH\nhAcmXOhEclc/65/unfzn6b2bpmgHxQLRD3pBd59Dcbpqk62kZAW8SBKhrEHp\nuq+/wiDmYPQ2tS0SQwCrHSaX2mPpwp2bOnnPjTSmK8tjnYu0ozdQH6lfm6Cj\nK7Wzs8B6mm56m9E1E1fi53paBHwX3ecdLj5X2ll85lMmbcwCwSj2QWgLtdZN\nZ/CY\r\n=DHv4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgaLekz6/oKrhkY8D99nU7RpoUMEhC6dazBf7SiN2toAIgXwofXNADi0qaU8CUV1WOpS5NsWR5DsNBEAqGTfTEBeI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.326_1631360459806_0.2900856742542297"},"_hasShrinkwrap":false},"0.0.1-nightly.327":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.327","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b7cd5e4d8efa7a52512d8c89e32b3519e8d29eb0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.327","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-IRvA738l3Vmgu3nLFLFeade3NPXnrZON5eVubm1LhE2iUdYNcKfuyQ7NLCEq0j2SuLp/TA8Wk6AbpdLnMv2vaQ==","shasum":"ea6b69a0bbeb6a00f1c9b4693779764563ffc663","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.327.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPkG3CRA9TVsSAnZWagAA7C4P/japqRdK1Ukuz7LRm++r\nO2rkMF/87grA2+ipNd1ZDAA98zCvO5QpqjRKchRgnRGiS6Jmyci4Edk1hGyj\neoOPUNe7Bz9qdrUCRePeR+9CYex98U7BR2+mfZ4Rx720IvHnWmecWkUn9Bc7\nxr07OGnGvweub7bi8NhMElkyeKhYpY0oVgBdBRkE/uYXbXGZN7YYlmjTWsIO\nD3XR8k98IYjfxOm5vDk1V1XHOcFprcGvF2xuQthg6OMhJ5saTjKOe/JH93Ip\n+s5Aky3orAim0ikW69TwV0ZhwzfTlJF2aGd4GrsN77HoSk+Pi0GqHG3mG2lg\nua5+QSHy3pFy776Gtwkl2PR3ksC5fDDCYjjnTf4dJdHfAsuKHOctQGF4j1CO\nMnqeao0h2JrxHEm/GwEYs8KPJQn3Nhb6Uu3pkkts+RHgCnk5oNA66V4o51ih\neBIbl+zEkVClNGfWcQ4SMuGfA4nD1ZKoJj0JdpwwtqYLo8uIXmbJEVB/epwc\nrsrflPSTdgbGR1j5BR/coNpMfj1liCjwYkdgS4Jk4u5ps4FsWBilX1qguNOo\n7f4KDaDW21T3FUgvSkHYXKPB8mrrQxQ25afiINJ9GMhqhycQmJuFMJ5i3TwI\nLsvlTPAJmq8UOTnToX9LdlPxJ4uHSMUymL5GTJ0IYgi0DsaEEFXg8iUy3qqq\n110F\r\n=U5h4\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmXaA4Z+3XVWTUke5DBI724Av6Vib64oiaRHDpsNRG2wIhALU3zPx+8tmq4QCG1Pv3VdyYib+6Wl1B9ASUGuz+GtjW"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.327_1631470006914_0.5741555325081351"},"_hasShrinkwrap":false},"0.0.1-nightly.328":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.328","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0661e850787811e4b28b385fca8d974f340f6e99","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.328","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-BFS68Co0L7TMFOTLwyLUT9JmvOZuovc2ngyMG+uzSvVpK3Gh/oMOchSDD7DgmZVslE/g2NWK5ZRrWse32xyKTw==","shasum":"696274e9c1d044b101225ad325799c0e8172a8f7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.328.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPxRACRA9TVsSAnZWagAALRsP/2ilHAVfb/nOqoJEprDc\nRS21AkhJabWFpCNXacYn2lk1/O0eYY5UlSAdaMeocuBminTx2rcePZyvc/sl\nFkYWXCmjCFBF+D3XLnlKLwQ58YDz9i96bs0WTW5I7Z+MW3FyvAKsIQBNh/0N\npeCC4lC5MzsWHm6RUCoB71jJ3+R0D0aFXRi2M4WiWkvQoaWNqqmyIOKWjHwP\nAWaaT39zH032BzG5IcREVp0rIsQTvWZTkBfjv8iUo+VkfHPRKwBSFLeVujoq\nIcPFpdwBbIreUY3r5gJVyWxCylL+VGOzFblgjtyk2XFdfj14jiRMmYEUTNCI\nLQOodE9d/4XmHC5HxtibGmkg+4iMtxN2dBTmzAyJZ2evjbXjkU0rjjVqBL2y\nhdrwXugs6vUsZ0T/T2PmkdIs3RpGxPuaxeK4wkJinD7VVJmnk8HQtPEorta+\nfouQAkDjQO3exZUSxqkzmEIznFNMWEluYalvcoFlycAdmBXfh29N7ertvO2C\n/S2XPuS4r5y5MFCunzewan1V9Dz0nUapyAyG/AXrQeI1h15jWaB4XBH5A+hm\nh6ZTPwpVR/pW0fgrkLI/N7t2gh39OhdrZoBsdMUma2/X1kcfBMzF8vXFnvdj\n5FE2Aam39moEbbzkBcOJcAjajyqmDEPnvIVR7dtxoxoXaMsL868hLtz5u+TZ\nRpfp\r\n=9Rmm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAGcp4kp0zrr34zCrzhW4rQXYEh3XAGubVv4IN2rn2BTAiEA04IWdyP3lrmuQe/KaasyYuZmq6VtzVg7TW5Ar6uQyzs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.328_1631523904642_0.09562960203599347"},"_hasShrinkwrap":false},"0.0.1-nightly.329":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.329","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\n## Services\n### Codepush\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK.\n\n## Lanuage Support\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n## API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid\n\n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5e2bc064a1c5aff8e7df7ca20aa315137f6d4b3d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.329","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-w8sE6tyU/KYelXM/E0U22RYscst3H/UH+sJTnATStxGwKqv+0+wF08zc+l02y5F7bOSmC16Jqfmbld7U5fE2EQ==","shasum":"484e2969449eb73b1ca54a712d93bdfef45ca4e5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.329.tgz","fileCount":637,"unpackedSize":2714873,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhPz3aCRA9TVsSAnZWagAAYYIQAIqiSeVV+UHugAfuaKaH\n1fAt12qZL6XLzRlUaxSCyXCXo8bPgo0ivsXoym/W6bCq6y/g8++dq7pX/q+d\nSLGH9vNk8gaKTP4+Lbi7pBFzWpb1kX67JLnFletgQN8nY+FMuxhujWZWiqQr\n8y22FMpg27DBppLFHxivL3Q/ZTrKLK8IuwiIF3UY6rC19oesxuU+k6980UFF\nQfrYEeTD6oYfbae2kyOb2KzDjOBDMhdpRv9Nmi3FrXsF6W84VIyyXkcbmz1a\nPxZEG0Ps+fw/AHXNxYjSGfOFxzUgPc/JfwrtaGB9byuZzFRt83+WDHaPfFhv\nshUqd6KURgHYjpezO3ITFjUx+DdLoa4E9K+wUdJ8r3XLuJAcJJhu/MHYSUMu\n6MOFtDjnRmD7g/eFROluRVCdkqKRwFK73Zgc1u4Slm/17QunTWBHLr3+KbO+\n7TX36C9eyQ3a4uegEa5Knaoye8HSf/d7A6Likq7C+Y4o7PEmoVVJcqvKV1Ej\ne2GOqemYsUzwZT0Z8BF/M+WQs8T+9wXy1VlX8Bxe+/BUVpQa9AMXy4dQDJSY\nHH1FHte0GK51wgU+qv5SrlpGy5bbYpztmkLEWbreVUIorbTpSPBZISd+7oxy\nvYlTlugD1bjXVXxLpJoKo34ZrZWO2daNXomjevB+1Bg8WW5Hah4o5eU7V1uC\nDRRa\r\n=ksW/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD9YufDkyBpO2Wwjn6ArxDb45yiQcs2DBlY5u8VKmxG9AIgScehhtYwg6eIFno8qtKRlUVfHfzd1WH3d7QCwn/hU6I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.329_1631534554497_0.6035409009747146"},"_hasShrinkwrap":false},"0.0.1-nightly.330":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.330","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.21.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b1c653d560cd70671652b0119c7829799ecc9d8a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.330","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-ZlsV03lX1xjBcvWB3s8iB9rD1H1OT89ucDAS1kq8Yg1nrVtTfYmQrN91+j6uF6LLwMSQKQMNrB2Da5JEb4XrTQ==","shasum":"4cf55979580048e3e3d682903533cb0618388b45","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.330.tgz","fileCount":637,"unpackedSize":2716671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP175CRA9TVsSAnZWagAASCQP/0swmioRWAz27aR0Qvww\n8Xh0iDZE/OhPSDdaISj83YnvOKvU+GoGmSwXd3SN9j3dV3D5WIHnWG7GgFC8\nLqTIzSc+i6KnblPieX2bHuN+pWJl49qkw6fAB4s3RYF4I9n6k7kjoXDLIrOX\n6B/fdw2//+ao28Ly+i3HWmxMM0cZ4ENIQ25xyXVuWuWWWZFmAtUcTlSXb+HM\nLB7veqWNPonBvoPXncqqSneN7HvET0+ciMPWok6B5BgPl4wT1HDf2cUP3tmi\nVS4HZ8qZ5LdFwqnVPelw5l4ysQtcGPsu/FCFUi1/yMCtPtL6+1JxtWRR+KQR\neKO1JJGnI/wl3YzRemGSzaNOImuH3qJStQIQqwcKjfeWWAAhOpDQj28tdmcn\npf9iUiqpQLxTqu7o2LXzbeVOIc/z2U/Og0eDiSkF3ZhSDGhPC/IlW1WdIfAX\nUJWWeyjTzMi/5hFF9dbIdIydBaLjoEHSEEQ4QgfS/8FaqDSXqU7spWIu8m0R\nBnMrRsw/VihRPjUo407lToKHQftkqMLuCdxQB0gXJUDg830qYwjHlt9bq3tP\n+bJyZJixfETVMK2yL6LbaNu0zLLtQBbQ1kxoevrHuuHxMMKRwUtV62avFinl\nBkYYi38KSh6PgWNYJdn7NkfGbQGfNt7+1uc6GeW7qPh/my+XKHnl4Paib2AL\ni2F7\r\n=dEkF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAxmXX0CM+37oMcB5/VEONq+Waopq4RzKI/TCxgLS0CuAiAOWFC7eAT5O731FHytbjHn7zh/KGi6/4FFCmeQChxqaA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.330_1631543033125_0.8478114359289686"},"_hasShrinkwrap":false},"0.0.1-nightly.331":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.331","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6f6e30ccb8b5e322da57901ae50546c75daff6c9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.331","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Wjzl3j3urMisnBGFPmltkUOoJIGKJR9cA4UtvAnTVHuRtpFLQCvPj3r8GJycBZQs2BwPDuh7mBnWGxsj36bj2A==","shasum":"ab3f4ad323922de0cefcc857329d63b5be7c492d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.331.tgz","fileCount":637,"unpackedSize":2716671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhP83FCRA9TVsSAnZWagAAiIgP/RGK5imQTfyGfwg5kFhQ\nUXCg+UZrDp2lNQ1dGX8DzhRqKtPBeB7t0FKvQYeG9hZFDLXwaZamBsNh10dU\nnVAdhy1ooGur2RLyPP7ieSw00seHk9/I9SofFCIxvwolDcJgdagy6eZP70Mq\netughbuRrnkdgk/tVmuCIBnu5TLpqWxGnfj03QXYHyD4a1Ehbn3xqt3xkCn5\nquWLjiGCIzaZQIJpl7L25r6HNMVurM1S0+F3ML4tK62rTlQ15BXxZ8Ze77xP\nGDUW8EGuEeCcD2Hz1DgsHj37w9sNYGEkN1Kq1uNsLvjoaOEgF/S7Obk9YiOw\nZggUf4hpLyRI9kixfz6gWYLQN/mGmAZTgJNKU71CJwMTYp9nAeCEPZA6UBaV\ndi55rO6HjDE2cjSXWiFk85CZ3FpmpnPbP+PJpZ0lYDYolvmSmAgURWtfxLlI\nFSyD1UVTDaCfUxUq/OBPMYt629mPfjtv7cXQ49djDffVKzRl+/iUUYlTcIKN\n2JnG/NauWtAk5CllVnM0bJzKfROTy/Va8H4ChMkt4vw6ysPdJV1aMe8kMS0c\nXIcbrCCPj5rCVJ01AS87ATN+YWggthrnxjvi4Mayp7QAxdYu9fob1s6cpVJC\nDlHWgIBIsZSsw7bbV4qsF9q4XfTcIA/r8PYRXYA9A207k7ih1to8ZsAVhSa2\nJ8RZ\r\n=25QW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnamIAfvPW0kJw27AJooCMvHI+qXTUVe8EmvqV9qz8wwIhAPMl6ukP2vKDtwHOVw3v4zYlM1bHOQ16C+BgWzgwMvO3"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.331_1631571397054_0.5633054785605223"},"_hasShrinkwrap":false},"0.0.1-nightly.332":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.332","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"75d4bbb19c387a86a21db6fe1da7988e4840e7e2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.332","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-tP3dvqHxvmgU7O5UDZMhe5YgECptP2cFtOC+DGMrH19Lb2GVJ9L/ruqc1s9C496zZNBCjEqBwBFXZ2tATQY6iw==","shasum":"dae934abf9b73727027245557337df92356a9e49","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.332.tgz","fileCount":637,"unpackedSize":2716671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQIcoCRA9TVsSAnZWagAAgqsP/ioqgzirAIVvkjXwbaD3\n27p1CHYoir4t8Gc3D6d+Q1T3XM3TJyIgZsi64XsveFw3lLC5zu9tcPh7cQev\nUjZVJB5wNQ0p0p9sjziVnOvVsiOGBIa3lOONrd/hijpjUuNORJMhVLsMpz80\nONBCzS8GD64wBKzM+obBAp8n503e/5x1A9iUmznWMtq+Uq1kG8btxQgIBS4F\nrtnd/1R+Np5aL4B2d9/XEPnRRkVdRUz7P8lKIhTtGCia7vGu2EoAcZvFyMc/\nvcicDQRGCWIsnIFIE7a08MG3+wLqW2I2obyjiPvpR0v5YxouVIrasMfkXjHw\nsHoPtRVqre7G9nu0PErR51YprQIRPdKWwLExbvpBA4ZqIVF5aWkMT90+DZO/\nT3uZ3oLv/puh6uTeCwZIU92Xoo9zsjgk8AMs72hu/hR/pW1MRfJ5P8SAYYBa\n+GVN6f5a41++pGUg0EAxmPVqX8kU3SL4Tw2j5FqrEGXAIhV4md+848KZEQ4E\nAXy1MbJ+atCKEpTgfLqYTD6s/O6GrN7OBB3tzRICemlG+mb77BxaCOsLrysf\nviGT5HYhtfIV5BETL+V6VEdw8iQniMZTYsy4Hqlm2cbUC0n9pr2EJAObRS6+\nEeVbopRLwhonNo+B0AgscXsoHhgTWGrKtzVKsoI22SPqZZtA4uL54px3xD7n\nBynE\r\n=zPS7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICWUfiv8sqEBBhqoQ/FQHJwFX2Scx5yp4AiC1SCrqi21AiBBDHsbHjsaormouZUuxr5kj+/Cx/XQBIThmDH4C64fZw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.332_1631618856336_0.6730569405648661"},"_hasShrinkwrap":false},"0.0.1-nightly.333":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.333","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"732bae2062e6ee155960c95f7812eafdb7c43416","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.333","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-01TEpXJ7GEgYK/opsu4zUzq68G90lCjzNHgxwmBnxMwDP3IRg2YBQKu5UHBv2MUJ3Qtfe3vh6bNLqdYuRF8xfg==","shasum":"c0bf29a9fe7e86d0bc3a3b63d9a086b9abcc664c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.333.tgz","fileCount":637,"unpackedSize":2716671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQd11CRA9TVsSAnZWagAAziUP/2Q6sURF6LNas5bRCjj+\n1FgCnC065+MBQdQEvp6A7H3O/THTUEmh27cEXLbB4iDE31bpodTl+FCqwoF1\n9rFJeaiRFwVrH8uQAA4RaJKqZdawbfFQzpKUSzBk/ecSBT94oCYoXhYi2sNm\no2wTRj8BfK9p0KuhNxAp3iIK6EPLYyQAdjyp3vcrZnypodJDAy6GmB7Mdpnw\nT5OrZn7GQb6FAkUVBKMBiKUacWdANFCome1FzfhutLOie6VrQOycfk64WtU9\noOXOOPJl4HXGwMP1NKcpnGskSEqrBmtBLcaKbIPkat2+Ifjqnnq7MddaNhwC\ndnVBIl42MB8AlgtPfQIpq3jfAY15rp97hHVpuAdHlTsYADg5WLS2ZVieNtZB\nJ9uiqpNtN3G7YEtOpWdWRGOmvUPIQBpjqhlbt1DFthnbNFnjUwf078alvzPr\nDnIlAtUSXi0XQ+o/325Ah3kvGJlu3qVs20FaufLLa4VM9m9GsTajEZGWF+x+\nK0RiXs3kEbeGvxGKVndU5LBHIPH8Bt0rTq4SaC2j0heue6piADg5UDne3vCu\nG0KOsa/FQ7TPQZD10obqHZfmsy4l3NO08olq4w7h4pZ/nqpAVb0pn9iWheqV\nYoa/7JpyULVqvDN/FZZh/lQzy8j5RaW7UhtpRymB769y4N1I5PhEuPIzaGuM\n+VxB\r\n=Kbi2\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICqZf6Dy86iTT6D6xACSo90FYlwqgaXiftzQytRnE3WpAiEAychU1O8Y3mrzvizkCbVAwZF5txg02oKJPV3ynn5amyI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.333_1631706485280_0.7081756145549729"},"_hasShrinkwrap":false},"0.0.1-nightly.334":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.334","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a47be584ff0b36e41021d28c89586e34f07dffd5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.334","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-QvYpAkLlBqe7KLdkC6g4N8tzHt3kn9TjOpXGNgi1hU6dMWcD/UdMJA3oz9d1CZDx2mcX50roiDBUsA0hOLeAmA==","shasum":"db5a106f36c9b99313686fbe96d2bf1cfcf17a49","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.334.tgz","fileCount":637,"unpackedSize":2716671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhQwZNCRA9TVsSAnZWagAAtZwQAJyMXz6rAYVXlo8jUDmw\nLQT/Ujfl3HDGuFmed5SXbns5/68gJ3weCUSxSB6ptxiiHSCkqIZTx2Is1HrW\ny9G/rakTx999x3TTc1cTchGHYQdqVoYi8IQH9b06jQjZWj1mLerAxLPIvEFL\ndQR37cbucDk+tz9MmWRXcN4G5k7aWyxpx0CnscW1ZkXLLCD0byRzSJgDrZYo\nK4y1DOYBFznRQsqfM8TrQfP989/OeE0i8q1hx5BB4gpm/QKjRKGoQnXKxGsX\nqkkHAvSjLTr40xzsH1nUyYLITCQOnqf3jfsqOFgoupWfeGsNVfSBWhSWpwZ6\n4YWtNQ6tmaOPgC9u1KYasLXDCIwvma/BgSLt4LqZHWcok3T4dlYuPy+QEA+o\nnroIgNogdGhWNwvwaOZ0AU62Q28V5YCTpAmqPAOQM/GksBYodGpg4DZuq725\nQqmuj0MvD7TgI4kFWrOpvGgriKKOcL+z/sV3xfw6dN6JHkD9T7LjucxMikX3\nJZWpne9gR4/lnYfNdCGfIpzYUVaBtpVCRY+GYghuX533D2um/2X/bryMHc05\nzncdo7i+7SwqOzQCrEu/+bd54EyHv8QiPSnNTkdiKBXIsdCKB0llREbvyUVJ\nFo26wJGGBftvm8nj2sPKv3eDcGf4Vh/JQkewbSAv4rXz9BrNEEKba5EzCyAA\nw9Z9\r\n=jWam\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFS9UcF570yEAR6aZAdu5cCLARbMoUTrO/Lux/IluKC6AiEAtTXrRLR6dvsKz6T/H1Ls4/YBHUzMvauYrMr7L9qHlxM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.334_1631782476977_0.5628029498436071"},"_hasShrinkwrap":false},"0.0.1-nightly.335":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.335","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a7245894741af664086775a105c59574c9b84eca","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.335","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-taT7fdWrnz6tokMWeSCh1POhzyQhbSxpOIUBNVgo/b13NYcPI8knaTq9qZG9xfg4FwzuVVRAWKgIafttxxmKuw==","shasum":"aa28b02c6c62957e6dc7320de5c4f7178bb77981","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.335.tgz","fileCount":637,"unpackedSize":2716671,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFgvZ4Z6pomEhWDalIpQO+ilnlVZxGiBzpE2GY4mhc4TAiEA+it3pwd11kEhYTs6GjprA4KIlsuR19gT20i/olsghlM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.335_1631880750249_0.8571097195450319"},"_hasShrinkwrap":false},"0.0.1-nightly.336":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.336","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f5a44240d69c9523ad575a91c819730432f68514","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.336","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-wGzNmXxNp1UMf94+ZoxfI1bMq+tJ3+BP2t+6AW7E1tuu4VJTu6IdmydAm8jhQ88FmYl+TtCeBqW56ejgDQ8xsg==","shasum":"47d77df46eac66b546742acd6ad976930f2616b2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.336.tgz","fileCount":637,"unpackedSize":2716671,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCRp6JrQzJ+eWXpmyYFqQZb83z9sPOGp4uARY7uCELfcwIgLk9x6AZMYBKwKP2V8yzVqLNCcBUIDN9ZmqJanJb7TtE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.336_1631915540279_0.5571041241973744"},"_hasShrinkwrap":false},"0.0.1-nightly.337":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.337","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"eb83dd11b0867a361b39d241f3d449ca14aafc52","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.337","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-K73N1tFNUC8Int8NtqRLKoADOXEDDEup4vG8kHDDp+Av84gWS7/xbNb5DD1chvVYsaLE0RHAJFo6yyGo3RKdQA==","shasum":"9458368b13b783e1a479795b18d07a7c023dec63","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.337.tgz","fileCount":637,"unpackedSize":2716671,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAOy0uNgX3y8H7yP0JFfI/ulzrwEzUPBg2IwrWcgwoZNAiBQJ2M8524o0j4t/f7sS+2PTi92Mwc8nO0FXpLuneha2A=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.337_1631930909482_0.1490992467562"},"_hasShrinkwrap":false},"0.0.1-nightly.338":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.338","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"375b0244226c25abdf1a969086e2d2b28cd19d62","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.338","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-nsrYoQ9UtpRGE1F6sB/qBvUQTQ5ixKLs+pm2fCYHFTyNPR/cdoK8JYWfRF+bNLXZ/qC6ck6x6b2FcOuzT5wllw==","shasum":"269eb53010998197600c516b437be897a17ab338","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.338.tgz","fileCount":637,"unpackedSize":2716671,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCgZMK5mmGL9flsTPvtwVgc8B2SpOjUiUpkhiwxyeJN9QIhAN3YbgVgaa/230jKcYIZN0Q5xDwOqQT5YyiDUBdmceeP"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.338_1631970158134_0.7821885095136905"},"_hasShrinkwrap":false},"0.0.1-nightly.339":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.339","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8bf76e7af96b93027c4cfc66918cc1549c30ec78","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.339","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-z7T0c0vG72EIsosMoILcdA1zaUcHOkz01NagLu79jiIt6Mdu4fMg3l5WGBCOqrw/gPeM0/KQOBrAl3SS2QGvSg==","shasum":"40b3baf37e6ad44f623ebca3fafdfc8ef049dd7b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.339.tgz","fileCount":637,"unpackedSize":2716671,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDRVILlz83/4jF1hs+vGoHSABMRhbgLJ22nDmqtcI/QwAiEArcYtqTdzuThTb+c5Qo86/pH9yoeebJupD/OschLK0Y4="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.339_1632010198483_0.9025077037531932"},"_hasShrinkwrap":false},"0.0.1-nightly.340":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.340","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"409c422fdd38af0b940a194456f94f78e7f92459","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.340","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-oBmmcuHtqekKHt5/7rYqd1sJbQF4UkBeR8ZXbKtOCXj2dXTredRObB11zYH34tSdAIY/Evdvkrx3smFaeM2NwQ==","shasum":"090390134b3664a014294ad69cd3f6030489125f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.340.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGazvCrfTVy30xSke46Pvr8dMeBO4P9PHZJjNA/tzHNrAiBCFZPPfz3jixuYKBzb4C2Jxl1jnxVbdci78SJcOp4/ng=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.340_1632072402604_0.3040561848363983"},"_hasShrinkwrap":false},"0.0.1-nightly.341":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.341","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.3","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3b7ee4cfc1f9f4750b177960488a848fd8d13f16","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.341","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-GF2A0xnULZXV3Hv/f4XgPa+Mzw/1eyZhpIVB+uSlEaq8k5umfM1bFgpu2CXoQ4qQX46EM0/XaQqFmov0hrsChQ==","shasum":"990c024b62a7f6041f372cbea73e44b2fb005840","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.341.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGcB7XaV080d3dNQGFHFjT8H/AUIKU9l9Xq/t6PMn3KaAiEA7Yoacg4SHMFLY4f8tAkgK4aqPo4+Wrf7XtUG4GFw28k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.341_1632128080603_0.5196569716085895"},"_hasShrinkwrap":false},"0.0.1-nightly.342":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.342","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b20774a2d0950875673bd161d8423f7e0d499701","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.342","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-FyCQTq+nwVK8QrYjW2ku9qWgguZoN5B0ybXF7rYYhtz9LF5j99qT12PIhd3mfxyQ/ej+GO6PDvBtPle5ax51vQ==","shasum":"fa297cb28ca67021aadd97bdb743c33d2c2b59a9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.342.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBtl0eVnCwaA9rrhKXBgxWUs9JbKtyZ3te5qCXGiWeypAiEAwCtw90Y3Pk2PXjVUbDf1K2yf9P9UBjECXNcv7fOFlF0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.342_1632137023983_0.3853966290125135"},"_hasShrinkwrap":false},"0.0.1-nightly.343":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.343","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"52948bfee64ba3b86de20f8f3c20e43ac63d14ca","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.343","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-R2Ov6vUr2+QAAgXjepVPGwMyg/19oKnmr5SA9Fs93j8m7ItBhleslLDCrIT2xp1qk2U6dzQ5OkgdY8Zm/CZq5Q==","shasum":"454f1e2559bf1c3d8bb6e0461332216e24bd1721","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.343.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHZ0ZKbanUO2S3cvz1Yol8al9gfTf0cD84ps5ub8BMFMAiEAiYRuBs1wnNqa4Oc6AQSzBGVGmZnLEap8itxarVFnbFw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.343_1632225312265_0.2864279135504184"},"_hasShrinkwrap":false},"0.0.1-nightly.344":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.344","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"43ec8aca3594d43007d65455c1fb648903f8a223","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.344","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-1jQCnQBFoeLQ5hxInZp/U1bAsGrP57zqPWI06kXgUJBqbTLq6a48U/dcY0dIda41mkyBPYq7d4Cnhx0esNlIFw==","shasum":"b58a3034bc3773d9b5ab292adafae603b10f6249","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.344.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC3t+omQRVKm2cQnHcosaXJGsVxiV+dDaiItZOMDRVCpQIgXL2K4QvTBAqFm8OH0E0XVrinxW4EsHxUoRpzqBeda1A="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.344_1632278305620_0.923734340057941"},"_hasShrinkwrap":false},"0.0.1-nightly.345":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.345","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0aec402599cc81836911a1b2c220463e76af751f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.345","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-vY9IvR/H8/N6GnF+2BXNPhpmwbLCPxtJUAYYTU5xPad20d9xVIEdvrRQciaSiiZgRZOCWanf+rvT3pn5jAmXnw==","shasum":"864cf037f014efe6a3541369010220b7cafa18ea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.345.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAovMNChFzF6GK0F+p9fqS4m121R2b2Uag0j0ONxLedtAiAJAAjv4SPPsuhbpmFFtPcev+tJRiB5cFKZFcmeVlfyaQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.345_1632310896562_0.2782197697395792"},"_hasShrinkwrap":false},"0.0.1-nightly.346":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.346","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5be9e9176b15fe2b8f856b8a124130bd14bc6125","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.346","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Zu9yebD779v9WpMkPoO/E7TfPqtprAe+g/oXuT1Bc+nN6eO9zwp4bkAy+reB5Ntn5CdkWAp+FwcM5Sqlp0GAiw==","shasum":"1200b1bde7d7b46f6a0b310d732ddc18adfb3669","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.346.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXoNqXBI8asHtlUuw8DM2wztcBSYYv/zpQHVvTHAKwxAIgQnt1vEUAufTy7RstUssKU5O5CDzijpArjd0R4UUI/Iw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.346_1632492648595_0.17813453904567944"},"_hasShrinkwrap":false},"0.0.1-nightly.347":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.347","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0300fc08fabbe99156aded19c82dc435ff3782e8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.347","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-2mX+lcBcI6msVWpCwn0ZkHLNM9HUQyvHfbkaFSWrXaJ30uH46rV7k9VP5SE0TmuVkNjizaDmPDLO5u8894noIw==","shasum":"b0f85ab6d33fb327a0617ad4e859abbc0f616ce5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.347.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCmGhqMe0tf30JXI7+LUaGABvAqjqPDdvsfm30MjTCsjAIhALPtuPcATi95MgyXA480ldXfkPTKXwrLGi9efhmOuqfB"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.347_1632535099556_0.5518119970864177"},"_hasShrinkwrap":false},"0.0.1-nightly.348":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.348","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ed4afc5551f35463955c99fdfdb7d1f46d51c51a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.348","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-/yInu8RtSCsl0NqSg4tEB1v5lgTf300FJs0gLPOilLPvB/5OOW/vw03alQRjvIQqkC0tVO2vO/GmZpO745c/NQ==","shasum":"a2a5dbdbcf83a018ade10725b4c641dac29c6ccb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.348.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICMli4QxOFZdtIlGBfqDYqCcoON4/DNo7cbnWWe29ReBAiEAvCXfvLHZy5ShojQtaUU8JWX8aUeLDBoLA89A4zVPanU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.348_1632658891702_0.6340004627642455"},"_hasShrinkwrap":false},"0.0.1-nightly.349":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.349","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3ca6ad856192e6b88f44e1cce65e1409ea01950f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.349","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-4GOs595mwlUNVVS5QAcaQKRiZ6avsSxSKJ4DTqIPAcPspnpBe9oeavXOWPtPFx5UZDsPH+i3xYkbrZRpT+wMMA==","shasum":"73c5daca59f34566deafeb663b375a4c910f622d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.349.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC1RxrIz5x8c+ozLcy6LK3x6TNBd9Lv3Qj0mgqoRfOw5gIhAPXCkvOBHrJ+38d/S572fckIekN9yOHd2/3tTVbxM9Pu"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.349_1632745220674_0.6356546332460136"},"_hasShrinkwrap":false},"0.0.1-nightly.350":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.350","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8f2ba9a704461c87def1fac82dee602061f72c0d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.350","_nodeVersion":"14.17.6","_npmVersion":"6.14.15","dist":{"integrity":"sha512-gLlb/JVa3NT46gB9mnAelCXECOK3EmopmGxYRGRDgOEXV9HUwYK4usLIbxMQN/ZcXBp8ZPdBGALltpLtunV9mw==","shasum":"f197a9c09ead06414068bb75eda545489ab9f7de","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.350.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDg7QSJG2iAw6qIuLj8FKBsbgEvZ1HkEt+eLoeSIqIWmQIhAI4hYa78BRKPvwwl8ELb5S81d/f5msVVYJBA/w+XS9zC"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.350_1632787793310_0.6104892315842367"},"_hasShrinkwrap":false},"0.0.1-nightly.351":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.351","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"3b84aded125af87ac404f4a11413a5fffe55e3e4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.351","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-XRcKQgOmVm/q86pMVroSX79yA/QhNwHz1g1CI6gUk4YlysTkTiIKsPdU/FxpcpPrF1ya3I7nE7Y+xke3fJDNYA==","shasum":"37786cbc540c9f1ccdbca93b771708ecc81ce1d4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.351.tgz","fileCount":681,"unpackedSize":2969104,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCa8kaE/5n7dQqIo9Eoqi0oTTvp8eRbFE4+OImVA5BbPQIgd8jUtcWvKgJedG58cp3UiMyK3SHvKdHhcTTGLZErx/o="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.351_1633014906244_0.38233759416106294"},"_hasShrinkwrap":false},"0.0.1-nightly.352":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.352","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f8eb6a58e58a41364e8c1931b5da0b4008b1ff49","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.352","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-sgnFLK2V/CLsSHz28EKLbDmLHdpx5e6j0hOC1yOt4/7U3LCiXT7jiL+xymCm1rCX4CR11Yfp6LLe64oOAhi02g==","shasum":"ea0c465989035e3f64f84eb1a821a4676a166820","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.352.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWJXPBk0+jdqyvIgaPH6nvzvvZEGXexK68u9DQkEky6AIhAPa3YJp+8L4i/efxFRNOfWUk+Aqm/rsAo2+blGwbieeB"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.352_1633287017274_0.8372001821330759"},"_hasShrinkwrap":false},"0.0.1-nightly.353":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.353","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b5108f1d78a6a930afceb69da285cfe312520e11","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.353","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-x2qge15rwnoK5Q2ZQyre7AnEbh2P2ZLQsiyQgkS6KINIoea5uKwvunH6BDk4GXiPHPE1MI+snG4qBQIjsSPEKA==","shasum":"a24e8034ff4e3a21d2827c930129a52e62206155","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.353.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDFf6SvqcRt8Wkg8DDtm80E0hkDgm2lTZM2/5uKlQ8aJAiEApnhAIzxwE8Cerk5AUgXbVR9BTaMlBkb9zsM3gwVekhs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.353_1633337485635_0.5212262054188201"},"_hasShrinkwrap":false},"0.0.1-nightly.354":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.354","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.4","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"55ab97f760b2387d4f01e85946593902bcdcf884","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.354","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fljS/RuPK05301JtjC2AWrHlsiRj5KLvIHHWlU5ZRTcgDDhVUEXsFgT7XTWdwBOYz2nb5ZRhGuroZW7i6+mvRg==","shasum":"340a9a70e1d2d6451b16a9c3d6b000e789a6ec28","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.354.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCJ+/Wu7e93EqvZLuwjHmhvdZH5ARQLjNMZTkyRyn2hbgIhAL+GQCzCa2GyIWUHtPZS/8OPAApOGElFpbUl7mgNbpLV"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.354_1633352061344_0.2034314236185546"},"_hasShrinkwrap":false},"0.0.1-nightly.355":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.355","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"4355ec0dba3ca0c1cd67301f854a1bfbbba09a1f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.355","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Dle5HIWGUc6DuwWLUzXRWTlKd/bSCSQ6xI2EUcAm85JridaHIRogbTfMvefYAI1R/b3TaetNeMAb6gF+Z6u4DA==","shasum":"de71a8cc95bfd3d5b4648718c49e433674d5ffdb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.355.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBINPgFJOISJrA0rjA18c71eWygKTlR1vT8LVD/7tV3fAiByqIz0qDkrmqsnwH50ngSQhZsmX2NhrgEXhnh2Up11Ug=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.355_1633430090976_0.15215656390535193"},"_hasShrinkwrap":false},"0.0.1-nightly.356":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.356","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d2b867b65257fbb2ead93040135265a5443b21d5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.356","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-VLoeYfjaHuvYrh+X+frtlSar3a+Da6beWivpPNA8qzli8OLaZr56I+czuFaUV0fpjfnsSMVbBGIVkt+7KHjP0w==","shasum":"efeb054504167d730434f7ce8ce0a0a12ddd75cb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.356.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNnDqVEWdBV3ySgFRqc2PGBqP3Snklzr8ZCW04ZOBgBQIgMGbAbDV8z7xwVTBiph22u+m/WtXmFvQrGDTGUqBFktk="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.356_1633519883779_0.27235596748794966"},"_hasShrinkwrap":false},"0.0.1-nightly.357":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.357","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7929e74cae476dcafb48768fb7436536618991c9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.357","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-jihrJjIAmmGBqCXSecYWeMI5cYTt1fJveKJzyzfRY9Ek1o0or2NFyeNo9dheutPu9inFTH/tOn7EDLiKknUJaA==","shasum":"2837c52d75e2c22396ad822a31ad24f22c7454d9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.357.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFzgpfjDbEMmhzxFi25Jo3Q7X2csZgdNd0O659GmVRuvAiEAj+zngxpC91cCa97PxWQzaY3rkYODnKNTA74kAtI4wVA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.357_1633557146413_0.8492603089713597"},"_hasShrinkwrap":false},"0.0.1-nightly.358":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.358","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"71018a19a4f38c1d465554a4fb0cb1f1356afb43","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.358","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-k55srEMpAMKgeeDeDGTl6C/tH1FDLL/ABAWkgr0Un7LxwxcTYpiysF4Z6bhvfeq8PuOO1xa+o0693OM1JdguSA==","shasum":"5f58c15c2f3478758062119be70cb0b1926c72d9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.358.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGRH5l5xjPRHGjmrmsha7jUCYwHiz37CTjMCXtSLpT+mAiBDzOlx+YIEkGtBoPkujmfPEhDTXV97l4vMy/TocGTdCA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.358_1633649799665_0.34378517153125676"},"_hasShrinkwrap":false},"0.0.1-nightly.359":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.359","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9a32afc0db21894d1fee0b3e4c90fb60c3445684","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.359","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-bZ1ET8j9aKI8sa4A2+mBU/W7LYnMyfYC0G+Yl9PxzDniqyrtRSSHzirYzweOeC2fEJkdnkQNXPEDV/ISifYWqw==","shasum":"70ec2323273eab36ccdd2392c93f552bae368d1a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.359.tgz","fileCount":788,"unpackedSize":3481349,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDFtIEIIsgodh2kAUGOeFMl/aw2GomLDmRF7VJn8PmKWQIhANWgHM59elE6QeF6a0QOyU6bRcqqCMEkKLtrlP1z2gMJ"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.359_1633903792619_0.6435355470008837"},"_hasShrinkwrap":false},"0.0.1-nightly.360":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.360","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9e9629821b037c45e5c6316d3ea1eaf9d6e098c1","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.360","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-fnID0XydAIJm51Wb5sHI6hp9WRQN9k6xqGTzMIPduRBYOSCOe0kakmJNxpFlNlahh1CF/Bgiwgvm9J4daabtlA==","shasum":"2787806be2f7143587963346e0d33688854ae6c3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.360.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEm5vfCdTTnZLTKFJGP28I8bQlNFmYJlZkbg8jTebiGIAiEAmySBeebz96Z7uE4vuQG+epHDACVW3Yr86an23YNVOwU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.360_1633964647822_0.11668123164211153"},"_hasShrinkwrap":false},"0.0.1-nightly.361":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.361","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"935257d9785dbebeed0ac70a86e78fbd2a402f7b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.361","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-eyg9xj0ovSEGKp58gPyX8NQleLDSSZ1Gum3uteoV2qC6DxqR+pf2yTSrqOX8Qud7bIk4pv6Dcb9R143iA5R9WA==","shasum":"9d9c5e275456ba43421688af92aba24cbf93f59c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.361.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDS0wuSzHD0d/2ZdT99bHamkUWJ5xfnx7jKu3bSerQ40AIgSD07rzQ2EPxovOqE+bwE1hhNCRuSsHX7+0v3GanaU8M="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.361_1634115007512_0.6710740479590771"},"_hasShrinkwrap":false},"0.0.1-nightly.362":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.362","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"672abd710d5dd35e336cca230c98cad785ecc0db","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.362","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-0ni6HleQfyX07Rv+j3wBO6U+y2+taXIsFODt/68ugMoiKcQZWw+wom/yMgzjaBRkP9ZNVV0Ave/Qz3NW/eH0XQ==","shasum":"d450865449ddbe50c3cbc0b4326783c90750a037","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.362.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD2LTol1O3f4GuBZeWn5UGigFr44dXUEkKF/6phtldqBwIhAO59/r7moU+DcJr/G6s/4qwDy82NEC5l72mNMBgZExvt"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.362_1634215316988_0.024931473128690262"},"_hasShrinkwrap":false},"0.0.1-nightly.363":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.363","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9893607f42f965b9d19ec1175bdcfe4e61740329","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.363","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-j7dWIqtEUVysBqjSnfBecOw0Il9hrgOTV2rlWwiKYDzOoCcSnIWUnCdx6ynW9UYSwA9SZGIJybeAxZeRTRF6pg==","shasum":"8e953fe5c5ec33f4e6efff4698c77952a6ee1eb4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.363.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBN34pr1azfD50CPMM3XljijfdypTRFPf2Vhbb6G+ciNAiA9eYh6AHTxithEhLA1w2paq0Rlck3q7BuxUr8WAWNgFQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.363_1634248255116_0.5156762949284746"},"_hasShrinkwrap":false},"0.0.1-nightly.364":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.364","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c1e3040ffaa13a195f94649c61fc58b6adeeda22","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.364","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-1lCWUYf7BIGFqUyiQvfWXGAvlmfm5L8d6eUCRY5ynmPOOBQ361CZfHHtW1Xo0xzsetnHQjCr4+lRX34zcWoefg==","shasum":"635defbe9b037681b1f3201fbe4ab50abdbdc00e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.364.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/fqJqNgiT+GKBQD0dbK2GaqueHbd4G3UEMrR8xt6eEQIgFrnbSfiDrgI65Ycfm+W0Ou1cQSqCS0KNhjdTXe0mABs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.364_1634288535842_0.6249919149306664"},"_hasShrinkwrap":false},"0.0.1-nightly.365":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.365","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"792499e59135f3a863b3fa2277ec7d222b882838","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.365","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-p/aslwBUxr1MmTHvyZKAfdWhgl2IS9i5NxI4GhESf6m3wZ8X0/OERwVmIjT+BMVkh9vu+NpSJQGnua3mT4//LA==","shasum":"ae652bf74dcc7b87e177043c3fd5f5af876b2f1b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.365.tgz","fileCount":788,"unpackedSize":3481778,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDZWj/rU9R8nTQlInHvwlnCTjQPNRigPGvWlv/VgK3UzQIhAIibdfYpcQVivTE9nIRxQN+Rza8orCGCch7PPtCXP+iK"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.365_1634302470178_0.24594877719335972"},"_hasShrinkwrap":false},"0.0.1-nightly.366":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.366","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"37e7e934fa950ce3d7fc22763bcbca8c6270cc74","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.366","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-JPVD/FJoCsSCStf0rXCSp7iYg0cDL2/SmXa7aqSQAvvoi731hckFUYfXcImYoTT9E6AjCg1UQfXpoPfuQkfosg==","shasum":"00dd074ccd91ea65f5347ef5b7ab4b19690a3a94","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.366.tgz","fileCount":788,"unpackedSize":3482002,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIF2NhEAwr/VpJcNzKYnxZDUgc3ADD5fydkB8+sfZHATIAiEA2A3zsD4inZEcUdhxdA/WJVn2AmNisfEJp1O2pHiXN9E="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.366_1634399851332_0.6504302598223459"},"_hasShrinkwrap":false},"0.0.1-nightly.367":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.367","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6fa12e6f07a6f5bb29cb0fbcf6c6a487c57934b8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.367","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-E3feRA767vzEzKClugR5D1z7ZVZsHce/BRm+w+ga4UDWTUBQ4YDNMdJBmKAADZ/LAU+QHmC7/4pxYNKCiRiHZA==","shasum":"9fed127714aad9ba653515f2924fd195aa9d3646","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.367.tgz","fileCount":788,"unpackedSize":3481958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICNwI7zjLu/6YzblI9xQ2hCWOAtYAvdgIa+GFZWeRmN9AiEA884w7HeH9OZUmasLLNecDq9mTL84n5VO+Wc5dYvc5ls="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.367_1634482831112_0.1627898285075986"},"_hasShrinkwrap":false},"0.0.1-nightly.368":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.368","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.5","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b7a2fd54d7415655ebd6cd89e3c5ad4d3f1105df","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.368","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-7ydxEFaw11k+pxSrx11A6CyzSiRIO1VcaV7zBbpwfEo2egiotl9m45/fUrmpIjPfnzn4Nek8ZI5a5IuB+NRepQ==","shasum":"970748b6c4d9108dcaa28e0aee5edd7305c3bd34","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.368.tgz","fileCount":788,"unpackedSize":3481958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCQbp/YX28SdI2ZhdtF6JOWcmqD0hgqFGj/NsGKMCujZQIgXkHCqr+BseFjA3XbWfgC2/c0sZH7J9FSxysWKJQDEDA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.368_1634549823905_0.8676940524595631"},"_hasShrinkwrap":false},"0.0.1-nightly.369":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.369","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c26bee1c6435e45558fab1c81dc48dcdae2a38e5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.369","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-SOjcexmYqdt3JHIzyE6w5LhZVN7wtLnZ8fxwdcjCKlxrW16fxtgQ+TWwzgZRTWmip6oot8ZJuagTdxLjjpsegQ==","shasum":"9ad99892bfaf3e5f65fc7af1b418e205994f973d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.369.tgz","fileCount":788,"unpackedSize":3481958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFk57cyw4Yc3d7/02fbQmikzdW8oCONHvCEMogzN3zfqAiBUqSNsWaf4jX56w0Lal39y4QuAkzWMVBCZJpqQnuI7iw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.369_1634572099482_0.4022580123319275"},"_hasShrinkwrap":false},"0.0.1-nightly.370":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.370","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2f2cc6b21738b54f673cdfea2681f5da873ca41b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.370","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-BoJFzI1ToHD3PkPehtGwjYS7xRUgDMLKexB/IXgw+vo0cpalVZBZJzf4CWjRaqIMphiV/Uq9l5zaajGHgV/hOQ==","shasum":"776024c44673b3a68907fd73d163eacdc2892991","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.370.tgz","fileCount":788,"unpackedSize":3481958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEraXpJugmkze5KsDhLcbMy+n2reMxJEmFEps0Qx2zUhAiB8Uh0fMx1tIMQ+yIwJmch8ItwsLuBzU52KrsX5rAjrGw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.370_1634613109138_0.8603107065388291"},"_hasShrinkwrap":false},"0.0.1-nightly.371":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.371","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2fa5535d2e02301c80af0be865a01a3ae799a381","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.371","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-be59JvbdLrSpJ8sgXvVKk7VKnEax7pCN/AKxdO7TprK6k/Um9tiwf+d/dLcPeIoSnCIA1vE/ok2mY9FGga3GXw==","shasum":"1727a10f3f7d384793026cd5b52500bb0c74ea06","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.371.tgz","fileCount":788,"unpackedSize":3481958,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFXQuCIoIAWxTuwiMa2+gNnThfGW1IEEjpHp3xYoSX7OAiEAvLa5BOtDs393J8VNKPRsGJXu5nGnb68mF5F+oFhGQZ0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.371_1634644274755_0.10474612343732326"},"_hasShrinkwrap":false},"0.0.1-nightly.372":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.372","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6f260afb21a99267c4aab5bda0b71547a791a262","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.372","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-XHS4QQfERJfEY9rargw9RbN5+vgAK7nJDJ5cl8flvbhjD9mFquCTyras7BHM1wbhuHr383QxGlj1VOEnAow7Sg==","shasum":"a680ae72c73e904241330189953584a3f284a435","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.372.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD61sUOCHdYLlZ34/uyFiP4vka6a2HC7QrvutWXCHT3AwIhAMT0os82MBUA2irmX85csnCyJ8jT6W5D0zSQ8b9V28Er"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.372_1634732264075_0.0811123680086967"},"_hasShrinkwrap":false},"0.0.1-nightly.373":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.373","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7982d08969f05c89ccfa5a6894ac34e5f72c1594","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.373","_nodeVersion":"14.18.0","_npmVersion":"6.14.15","dist":{"integrity":"sha512-es61ZpnKIXcdt9JiALTsEfwz5Ji0WVfAjA7LllfgCGDfErl5JmPyTzZJo07cYwrysIs5JG7XMfLiIAXUKuePyQ==","shasum":"ba9336bcdff497ca73dbe05fe98ba86ebf010275","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.373.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAMSI8PDog1TxEesv7O68nJ+z4S9duwIpNqNHP5A6c61AiAFIHttHm1CxD5jivrP6qLh4lqtcpuseJEhxPfsLCkqTQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.373_1634768189996_0.22070231089592984"},"_hasShrinkwrap":false},"0.0.1-nightly.374":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.374","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"449dd9fc878de2f57822171856f2fbb65ef1193a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.374","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-UC5P977bue8oW2GgKeDmy0hnJnzZ8UjS+DOn0nBiWAW0/jR6/v8T4VfSQDSwR1dfTktZ53B2rSwBaT4MR9kJOA==","shasum":"c61a690fb5defc65762e203367574b86a6e3116e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.374.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDwjPaWu/973NfPYEEmxkAnyfKF7D2XvGWsav7JggvuIAIhAOmpfIGU4lTQBipYTcUDgBFaCzqyyWxNHJ/n9k6FHxo4"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.374_1634818512389_0.22266612001351094"},"_hasShrinkwrap":false},"0.0.1-nightly.375":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.375","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c550b58837509a8a565322b7dd5cfbcb690665de","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.375","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-3AUeV0LujDep9cIstNEZAirRc8U2SfujGjimqg9S+RYbgxx8X13yOKld7pCmBKJH4hw8XMlVruXWMaB6IXy+/g==","shasum":"4bd74cc157cf16beb29819e521028a62e048f441","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.375.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCwhZsFCPWsLmjojFd28vNBWKdx8jW/D5OuJdq8m5Yn1wIgSiXCDLZmzVLSU/g6g0zDBeNmoYTLJIeLyBN1P6ZPZCg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.375_1634854561218_0.9541347912138842"},"_hasShrinkwrap":false},"0.0.1-nightly.376":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.376","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"db833225ae9778f4e86832f54f705404c9dc143c","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.376","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-RqI0mKKbr6Rv+4IhAdJAmQGeghSP1E8HdCLr8WraoEJ9lejtiSqzrV96Zj9qGlUvx9wGjE3T9Y58R2mUwr9TMA==","shasum":"17ae43dbb15ddd8bf08acb213eba18ef0fd180cb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.376.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCuFJhsEjlThM/yK4/jsMPazJUxpkQx6sIxPfncO5RrLgIhAL691vNCoRNDVa9fM90ebJhWOClrtJ9fl8p3nn9Wr8gG"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.376_1634940303792_0.6556968559175653"},"_hasShrinkwrap":false},"0.0.1-nightly.377":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.377","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"53cbb52f700c40be7600824deaa559111f898c8f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.377","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-X2K59OJwl5QqhM+O79AKZ7HAN/Hw2S3m6RMTvkhsnKeVgcAZoKBVgwtgzsXIujWjxTU7h/LnSJ72/F5k9HD7UA==","shasum":"f0aa9fe2024a3936cde45e79fee78719a8044dcf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.377.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEMCH38xhhHPWmb+rk3IoOIHv0ddziCdQwvBwHKecDAX6LwCICXD1MUC+8vcyJwSbW33MxZURZFJkj4KJH2QsAjOGKBJ"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.377_1635029219369_0.8442400292158454"},"_hasShrinkwrap":false},"0.0.1-nightly.378":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.378","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1fd2e09a8d4df92659a76cde7b3c55677226ca2b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.378","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-c7vF4QIUVBJMzfw3mfeQMGx6Wb6UZ0JXyq0W1YkQsqo1qRHx6Nupwh0mMjSYLjolRGJXRsc89Y3UXvCarXxR7g==","shasum":"450ed050a5d04dd71e5e869398d0a9f26f48451b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.378.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFUy4uA6Cxmw3mfTiydv90fvLksAWXsMvIitguySjV00AiARKGmbmuI4377ie5G52lwEeMFXGRx09J4RG/VIr92FPQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.378_1635161791448_0.6552364990302029"},"_hasShrinkwrap":false},"0.0.1-nightly.379":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.379","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.6","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1ddfdda0e1f604ceceec593d04ac10b5e98c78b2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.379","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-kL9F2c+9ZMYb5tXesSNO4PLrU0Ea1gS9qFHmLykoVb0DE7EOx6dpWCpMQcXO053OnGoR6Gpbz3Vad5mCOtPrcQ==","shasum":"2bfb24404c45bb17b2db325d3dfe8fb89f728149","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.379.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCgz9NIbaaXF/LqshfdpMf87viALDq637GlH3T52zlxEgIgd+rwdOUF9TIiDve4Tqaqel+v2dvr+4NWCNRm1k+01zE="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.379_1635246714346_0.23405904971071156"},"_hasShrinkwrap":false},"0.0.1-nightly.380":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.380","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bca9ac96c7375fbd7be2b95e9a5b10ef86ae673b","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.380","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-OVwx2EYGvbJZPgybZ5OaReaq/D+kckd/DbdhEWjldU8+3Hoj7Nl0SXK39JVNkIewFURuGIspPX/2Y1YPFRVc+A==","shasum":"3cf5c536d695ec8bbbb5512b4be18f31a101b455","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.380.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXF1f/+jHwo5ny9DtY3XyntewQrx1V4IJQpF5EIo2oeAIhAMGYDSHzk5+8ZnKXUXD57ZVbIuL9lLbtxhw9x7SF30+Z"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.380_1635333816693_0.5250265060016"},"_hasShrinkwrap":false},"0.0.1-nightly.381":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.381","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"eb47885e9fe39dcbb8a93bb2f8209bae1407fbe6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.381","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-/crACWDhmIu1DlxppLmjKCBrpjLhdYTD4l/S9VaLbNl4PEUfo4O5OqKeOmmxsOhK5kGXufQP+xDDE6X4sOY7SA==","shasum":"9ed177289e0cf989307b1e329b170efc0148910e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.381.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC/nWVhaQRbhwLmqT07CGpka+Le/J7Klfa32ywHgVhvhQIgH9dAGqABMbVDYtnXnFMWUini6u9UQx64eou9bdc7i6k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.381_1635411700060_0.9191903950501514"},"_hasShrinkwrap":false},"0.0.1-nightly.382":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.382","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2ea625db9e5b7699eab5fb5e5f6a3b3fcee8b3f4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.382","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-0+shAykmtckzv+V5vjbZmGS4nfIvEf1lVOzsAWdyJt9ielQWfYeSxFctj4MVPn2L1BFsmLcSTkF6E+Ub79QYBQ==","shasum":"4c2cd50f227cb567833be8895c9b23d57a1f1b8f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.382.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNPre7TDDQ914N5nDWRBtE+t4nU3R+0ClEgQ6vSutEzgIgW/FrWQcGFxSSImFvxPGxL4XALMLnN2SfCTH3Uqak5l0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.382_1635467730387_0.8709314030606121"},"_hasShrinkwrap":false},"0.0.1-nightly.383":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.383","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c7fccb86aeeaf8083482a39589c2542d37176645","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.383","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-25OdzCB9/A9YmR7Z1uBH+fLA/R42hbaor5TsSjCO/V9A4qjuD02HSLW1e4oIMZzxbIFLiveuQul6OYQuRdxbEA==","shasum":"feb03563b8651a44640260955a9edef0400e9ee3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.383.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOznJKLTdyL/SF7QJ+FT9bDEUaxyxrusiincBd35N1LAIgPsnIIKHWvc+vzt15I9Rm0kQk/HlVzf/MEEXUyBeMn1I="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.383_1635558706269_0.8815011123343441"},"_hasShrinkwrap":false},"0.0.1-nightly.384":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.384","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ac28b717717eee5de9d26e7f8afe2e27a2764714","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.384","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-gAgrEDJFufo9MiQ0Wr8cKAgv2ni0O0MurQYKqKhB6W2ECgdiFCQGTgXYiMYRiJmdkgMXshJ3J1kD1S3LhKKkGg==","shasum":"d7833c0510c05b3ff48118dec2aeacd4f9e5c18d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.384.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLJwuAg2+eIBFN+NNrI755OArcV4J+3N7nc7N4SxwUGAIgX1Ituwo+syfnUZBFPuYYAxuG84bC7pkS7jtnZ5usnfs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.384_1635770633205_0.6013615849134066"},"_hasShrinkwrap":false},"0.0.1-nightly.385":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.385","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"894e413162f44250ac65e0e107f20e0ec554c09a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.385","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-30XCmoSoJ/EV5HDDKiPhHKmWDrVukXwRjx1AH32O5Gwyt+2+cDOWG8YRyhmtuOBoqpUlQ4EElBUO2QJTiNXL6A==","shasum":"580f0aa6785a4f3378bf4955d018de4535aefc8d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.385.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD7FNy/tJyCyYkg0Sed8stleivmeOnEYNlRhiLB8ThhCwIgX97lwTStn3mfBiuitI3zNA3QpgYBTDk+7U+hcoFwGuc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.385_1635942914769_0.9008899182402292"},"_hasShrinkwrap":false},"0.0.1-nightly.386":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.386","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.7","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"84bbb5e5731babcd9cfd2eb60a9ddc2dee133b32","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.386","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-nk5TKbiaf4JveCkNSn1ZyFrWZdJcNLF5ilSW4eYnmOirh5Cydj/M3JQ7WZvM7UnztmG1SZpmOp5NGxLbbRk40Q==","shasum":"2ebe0fdd55367fa4b69e349953bf9229d9b13f22","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.386.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUzjQXq7ATx8Uucm9wTaXBAkX0rQx8XCky8eGvHzMp9AIgVUynMlIN4vY7fjSwNpq9et9i1sbuuxxy7P74ATF0iz0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.386_1636451448983_0.8566258291891802"},"_hasShrinkwrap":false},"0.0.1-nightly.387":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.387","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.21.3","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.8","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"21a59bd7e61b8abd22a3b2ab5dbc316e878fb301","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.387","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Ky1+lheJpF1NWxKrpfzhJNH+0DvlQ68XLk17QW1W6SWV+KggOMVvDLJcKu4FISKHOHtpPy4JA3zxrvHdE/kKRg==","shasum":"686ea60217b0b4a852ff1eebc4b9e8d5f725c638","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.387.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBtQ5uJ7zDhYGvwtYjLS11ocyF9wqwyw5Z45rLjCzYogIgV+kohMgAaoVUwhoLLlpmND8OhXS5NLHneKyw8zAW1Eo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.387_1636459635222_0.5725082762324372"},"_hasShrinkwrap":false},"0.0.1-nightly.388":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.388","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.8","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"becd60f762e6df88f385a6ab0eadc4a618f4d06d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.388","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-D2w7GTCrXHOKj8ogq0K8k6H6mqBx6Jjkk0eve5w941Jtp3XB2AsdqVPhUORigr7cj+c80Pnnv6i695mimlMcGg==","shasum":"c8a0efad73839c5dd595d0a2d0b5b9b095f76a6d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.388.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFBiU7PNZkJ/ln/qN8Xpuazw9pR5YYUMYxusLmOL8aucAiEAubBOtg/2vJ5IZemFXnRmOUKdAhGNOfycr7P13D1Gz6o="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.388_1636638726648_0.6098538466911567"},"_hasShrinkwrap":false},"0.0.1-nightly.389":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.389","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.8","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"54d200aded3a918c8e401a8ec246dc75f19ffe43","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.389","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-yPyqGQWk9MQ91LtceX+tsIUUHh1CO/f4ayXtcRZSDAUFqVyA9c6rk2PTmfNQGfUN4Jp5jxWK2X64o3Us/U2zUg==","shasum":"562af268a956a77c973dd186a023027570aabec4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.389.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDqcHDTRXfgOk/aA6FLGY/wmLan8InXL29AZt+CDHRKUAiEAtwpkUIoYu6bLXTcTQaHAswvTamJH1sIXG5jhSMGWQhI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.389_1636668618307_0.610224138058344"},"_hasShrinkwrap":false},"0.0.1-nightly.390":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.390","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.8","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"096afe40d506e05ef81a84b85e45d6e92fc8ed57","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.390","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-i9cUbUXqK568IZDVjvI2/nPOhRNXrMAhlHOlCdltWuF3wMYLh2YZAmAsBX+r31lEtAjHs+q4bciGQnLf+aqPxg==","shasum":"51e323c414dc19771781200c726740153a05a65d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.390.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDrSaIY32cELlbHLV1eXm+eLtDCrQQ14Rtx4piGTZ6p+wIgRsVFS3WPTC+WGOgsCv3bbhACTYYldP0bfCCopYJ1Eqw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.390_1636726176741_0.3528650083584457"},"_hasShrinkwrap":false},"0.0.1-nightly.391":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.391","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.8","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"40987d577d66dad80e0a5ef28698ac4a80d35cbd","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.391","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Oh2jsuPa6ligYlnMIRodM1SXWefifeBQJQt4bOyA7uOrmiFicmhpb9XrR8DlFpwpE17wpRW8e3Hu9uvUp6LovA==","shasum":"322d5ff042ac59a765f31ddf28ad8dc6687d6787","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.391.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDgeJ0Q7BnsPaqGHh37rR4V9QReSkqBhm9v7zqBA5H5kAIgHUEZ9BnAs7Rl/Ywj49CfHXxXFMUtz1sqPa2f/l0qnSY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.391_1636759313551_0.9130164437507675"},"_hasShrinkwrap":false},"0.0.1-nightly.392":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.392","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f1e9e64e16917ed84e2769457bfa231a082f9443","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.392","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-wkc/VzGRAaRyMVZnFDIYPBJgZ/fX0ce7F9/MVxKDZfcEvi0R1IhN+iW61IXazflBdvH2soq/63zglU147Z9OnQ==","shasum":"8255a327583cfc7deb374cc7a3a6bf0a0a1c5335","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.392.tgz","fileCount":788,"unpackedSize":3481957,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDImhUhwu1wsJZDiK11OCUlroNXsQfCH4n4l+rmEuMduQIgPYBD5iE3npu+TX9w5JRPNfuVBlUd3zdnGWpFFPlyT9k="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.392_1636987455432_0.9666508366510647"},"_hasShrinkwrap":false},"0.0.1-nightly.393":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.393","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c5c3486cdb174c9a286ba2be7a5abf45d887cc56","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.393","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Fawj6h9zXUmZYpe2Hx0aYGlJKlaxpdcuzWgxtkwbw6G2YXICVUR0Dm4JQXTUI3XCgwZ+SZ5HZ+rpTEsvl014Qg==","shasum":"da155c64c8c4327a7621d748d74c77a6ecdbc51f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.393.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhk7crCRA9TVsSAnZWagAA6aMP+gJrENIk+vTOAtSTg82N\nXqHbP85x8Nc5z/ykvCDsjvsAdK/wfXAZWQsDY1iQ7SyjUH0DruDITXBWBhET\neF8yStOnaPRMfX4W/hRD+2gTniamvRhHT07WWplR+vbEAqZMPbQHsHBqwD24\nQsV64On45SKOpj7l+Zl3IKDsPhoTGN342AKQ3BlC4kl2/kNYrMVSc7zNBmaF\n6oYil6zyjmBLDKd0S1yXw38nXEaWRo5qvVgvPxn5Xmbl0Ba+wRSO1eFJlrbB\nDvPrK+SGt1gQ9nlplvQjJC9Oamr7+JkEolTohFfEwGi2Er2FiVUc9IZpLSRH\n3JYFoyc7fcl6f19vfI7YQBv1rGbdqP+bvyMM6qHYuZyhdAYssYUq3rLSsD0K\n+sgLM07LEap5ihgghH1O4tJsCebeJSZ32Ic8KBog7xgs08iXW8Y7PV0RU/sv\n37M3TEgLbUVmFECzP5y7iKRUxCyQ3PCH8SE+3TBOszj1N1adyJCGsTqQATWP\nA9WhMppZeLve7VkLXtEYLBOYuEHaewk0MGk90QyroI4eUtgMlEt24Yer1V1O\nRmF0boFolFNOHR409CmFKHraEugu54l3EcXvHg7h6DarKvOObWlnrdMS/bmj\nBWCWhgjskIJREoTIOqsRXh2fjY0nOvDuTkD9fIdVIuKxwh2/WDkhmHaDSLIw\n995a\r\n=nGq9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD7ASgjsOib6rydGyZbOsf1LlKMNbCAP9h3m5y66ddhDwIhAJFryGdh1M3a3od63Aq/AUpKdb6zVwHxk8YCn4aukkWM"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.393_1637070635072_0.1265277558171567"},"_hasShrinkwrap":false},"0.0.1-nightly.394":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.394","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b6958a0982783d43cd28a930435910325f5c20c5","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.394","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-vTneVXuprXJZpZPZbRb7O9MQPF4/wKMcjkxImUOl28fM2VwsQKw1t5qVvM1kEOD6ePyPmU+fNbQoehGB0vC1WA==","shasum":"255d7015e1bfd11627d9ee17438d8963e2bf49c6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.394.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhlwGBCRA9TVsSAnZWagAAUgkP/ieqIHszVcnghk722fGQ\nYDNoln90LiKUfOtaq6+B/Jw0WS7WMG6xq2RxVXi4swQi7Mb4hsLBYMl3mwN1\niH9kQwoibCV5ksgtWyAPv55gQu/Lz5aXuaYCjtxATHvZyeac0KNQNck/Cn41\n5HXsCSrJ7TCd4MoyH6EyrZGylhqRmR3TbsWr5fjjkbgBZpPF8uXqn/pnRXYO\nm8Zrpc5mB2+GvjRj07ZRpqpY5zXDb8+UR8gN2+Iqpi/S5hOKrYM05l9dmxTc\n+BbS7eUSoJQ7IZrQ3DatBA//bmzfY1g+0t2DXu/eAPbVYFGbKPaOY+E1zEz2\nJQ2YWKLC3zzEt1JnR6tV7bVfRWp0109NecpqP1Ir/YFccYAWojdWIzAPfmT0\nCkWjpveTs96nwrc1XNedQw0oVQtvc6km+DMH9KTasx92OhBLc6t2e+q54iCd\nbKt6Tay6AFUf5gYfLEbrYwv+0jMECPm4hkoJqkpqzr0F4dL7LsoBvlAGGS8O\n4He+pORE9E2CCdXfeZ46FXX+aZmPdEiB3bhPtszdZouW9RfS6jKOyW6Mv/xu\nj3bOXbUK1W/XGD4KfDWTQ4/89KIKBGtq8NVXJ0ScWMbvta6VNUWnwAKeKgLG\nCYqo230e0oBRjkf6BCj7oJVa+33+HssPhBvzs1gTzX1fTYiMpAgtCHscPKMn\nTXNF\r\n=3V5R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBipPMJk0fSguB1UFDeNH48vH92jD28CkXO0jFLP7ShAIgfAFZh6dH4txI38XtMcICK4O7BNbtfwYIiQKcMmnmiQw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.394_1637286273572_0.33053138476851673"},"_hasShrinkwrap":false},"0.0.1-nightly.395":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.395","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"094feb113925b9fadddfe9a4b8a96a2fc9469ac0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.395","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Jd1v8wllvaKOJkvFo7nqI2uf1Bfj5Wz57KHsz2UGIvG1R25bUnElQ3EBapKuYOG/P2EZ3qGvQQJjVo+KaMT4FA==","shasum":"b10fd8421ea64efcbc476be022a6f5372c3c8ade","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.395.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhl5+JCRA9TVsSAnZWagAAgrgP/1PfYL0vk1w3ov7i5L+o\nId1zj96oJ3SGdMN6xg0E7exVL2PzXvQ04iwn7e9K9BjGWYpYi7oLDBOPezts\nRgabTc+TrBJxCjaKqYRuoIqkPqNmGPrnHGbEjKSG7MDc2vcjTwxMmoxir9KS\nJBmwTYfIAwcK23LCtOJ8nbDNxn01LEpm/7ZHsnkRf25oZjK50v8FEP8hMUWY\n6h5lBdgmBkMkX3FjZKgTwdxHft9Nlf7Kk3rCw0woVl9OMsStqF4tymmCeLza\nn3z3Wb2b1h82uZUBmefvp8Kwv6eMttzZejbCW+uXJV+UrQ1stNUkXxtVERBV\npUHxYBwQ0mYLce09Q61SfFH2gTw5rVa7Om1Z+1CuLXjlZ3xMuiWkC8QmqG3o\nQlSdaqphk4q5W3jAu038uIbanROkMrIEP5Y+bRAIbz332U66bcVcBuvCM1Ix\nERnZzCNvYP2dsGZFVQjp5m5YOb/tlcNqiEw0GCtgig94MGu/bEIAhVbsaCgP\nUEut41CKXGiLdWfWlNyGG9RkxMfWPBs6ZmbGAJPEJ0/waNV9pP7KYPK+xuUw\nLHKjlgMIkeCu8OXeClok7Ol7Ea5q/5UCE51AI4Fx7XCZ6JZdq5/+dJIi2t4i\nS207U/WP56Dd9un1E5oBSSMMogJZBsaE5jnxVeiUjF1N4zwaWrA5fqerImmj\nasrV\r\n=naQz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDcOFEkYZVtF07cto3ywGdw1WAtOVw/n3Vo+ixprrqooAIhAIHz1iuW6MeNWzprWbGoiQqWCjulJudUe4lPK1wq+6gL"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.395_1637326729232_0.8104447396346341"},"_hasShrinkwrap":false},"0.0.1-nightly.396":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.396","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a72d1c1eaaf5e9fcf195ac27f7b07861e2651822","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.396","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-DQLxwF8S9t4gO6ZxXpPHBnEsiM/L0d0JR/qfNcNUgaD4Vbuc31tVUyKU38YQW7nkZkWr1uV4CFMRAKA8/bffXw==","shasum":"4fa1a733d2b1be48a6235d5a63b03f544995308e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.396.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhmNkGCRA9TVsSAnZWagAAKtQP/3rC1uyA9FZXr3/5iGwd\nCJXy8m6O+6qQu3SPdEorrm7SE6LWTyX2+IZBJPq0Ct9SQrPSxp/wuZo89Jtu\nJRVs34+es113ZuOz6RAJHEsnFspYfN2BdPpip94QPdTQ0RlTYO8D7XA8RBBQ\nO+vRqkwWdGHfnJvlpfqpLfdOdKiU6KE+Uejq7/9OnVvtHRKzA0etgZYOPj+F\n3B82ZN8punK7fzalYJiLZgRCSEWTt8QH04H/37h+vq40NXsJmA8kBWKT6zgb\n0T8kWsP/MTz6lH6wl4ApdyWuUh1HweuQ93nuXDADDnJii6AcwhmC77U9Zskm\n+HHRUFoj27ftpkC1P1jqn/b+wlapt/8cskT/e972E21tejvBPb8hanKZucz/\nhQZ83f09wZg0piLpn7pY8UnLR9d+C1wlLdXESBLNk9p27rWHocOcS+bcWNxL\nr3XIZyqMf1nuOu8rSjXhse1Mkeiu9Ps2fyyOVyNRpvLh1syR+clnzrqBaW8m\n8Q4DOYZiHMU3dqwyRNewNrLyfSyepygfU7vehkyO+yXEPeySw5W85JtF6yMD\nmslVqQhrwWZ1tQ6TP4ik/DvA5v7p7D1p7U0Yyq6gMthPQChGbSi7yZw47af/\nwMHjA02aVTvUZlGotOLqSP93BKzuEQXHE1R4ojZyQsvdJw43yoEQeMl93fIm\nEzgg\r\n=6V35\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDYtpJ07Z6I8W0UV9GOiJCyq6f2wjKqMxEKVMBvaSdkPAiASCdhwF85ZDBqiWAgGwM7pxqHA5t2QJPG0ShfK5c85Zg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.396_1637406982038_0.4705498646629471"},"_hasShrinkwrap":false},"0.0.1-nightly.397":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.397","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b183e6049949208062f1d2fc4c7b66ee78ee2cec","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.397","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Zo2F0D/2ibRQJAi9cfsgduBbNXDjxXrp9hblvb39+Ui+ZHpZ4lrgmKvFjGsHFVZlPsTOi9UoFf0bVgRIpzEXdg==","shasum":"f32b5670c0b564760a9f0aa004127274786819dc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.397.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnCUsCRA9TVsSAnZWagAAQgcP/AgykFY1cvxjRoDvMeJW\nuKdEstg93qW5bf7hqiD1a11GUlf1W/gM+8EDErUXIBH2V858T0wCsaDft8/T\no7dVSCRuggcDseIN3HDf867a3gi2OwgB65XBlLqKWMSgQO+tJK6gLuS5UUDE\nDgXLcsUxHnVjcmmdCK+VI3sFUhT/sq507I78AhSTQhQflL1+0FOX57jTuzbI\n+2JgBgpBZXAaPS26oPZ6dtAKOPyhRhjFKGa4qPpwq6IboQPTHmYtmZ399veI\ncrwczl0V202wqWQu8GK46+vDyDEiglp3SGkdTDMS/I4Lib0NZBmoKei2cdFA\nLHPBtfM9SDXS0FntZ8eMwbm6dkbmH6kEu8SMPM2hrUlKtkV+L7wjxig41EKi\nEM6D0VJ1InMnHep2PdMRmzTOqYTsFv0oIFgoMdCoeQquXb6uB5Cyvm2FoDPr\nctsBsWdsTOt5HVxkMHHEBvIVLNNZ6rD04NlpfZEmieyxeGnSDyggTvmH2EoG\ndP6+bc0X0r+RVWKU0AKfIyobUpIeLgO1tGl/eI2NXJ6n4cwPwrQzz5Cyip5g\nzEUoFTr5fOO9AT6a9n9SMsLmkkBLUvTECsVOX5ZBqaGj6duCjNV073n/6SWo\nUWyzv7TRi3OvijEuUxHL5W4yIVZ+5YOwm8lRYLJ5+9HCRSLDVp+x8UtyqeDH\nLmhv\r\n=7zuG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDce1mmujJNAVdrUbYfq9u6qnihOETMIjOyFlDFi3otjgIgJGV8eFse9kTVpQ6raT+tBeWBwzco3cDmf7Z5GDBPibc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.397_1637623083964_0.2075861100904688"},"_hasShrinkwrap":false},"0.0.1-nightly.398":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.398","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.9","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8c03e484760096fd4fd842bdaa4f43b08ca94984","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.398","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-Mo1Ah4oLgaE0KhXRxs2EVvD+KT2cVXqpO/pnS5EF6HncE3RbvmHUUya3i1/NQpzDCuI2Z7Q+Kkb3SlI8BEDzvw==","shasum":"a790098163b056dd08995371aa8494bff4081798","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.398.tgz","fileCount":788,"unpackedSize":3481957,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhnu+/CRA9TVsSAnZWagAAPUgP/iLhc7ozm3XH38hpTILR\nUI7Xzm1SUMSUDT9tFWDPduanSgNSwpZFcgAevxjzXmYo53DKpj18oHXvHRzA\nKS5sv5EA/1wHeicfEZfkQ3eeykDe6BY0ITEAiyNYLiS32nbSiR9Gt6dKaSm5\nQhdbAnBQmWTENYkc0rN9wi73OiTUDOU2JSOAlybcWdoZdo1Yr2AwrBDfhYYF\nxoCkTGcQgik46AdgmUpSR//qcuNfVMLRxRZMX+Y9WKf49q898a+LXohy/yTm\nrG0k2iSD9YWuKYnnrufUy6vTlXaQT2jUZJM2UFNfTYhYa+VG6XNuZo1jiqr6\nFtsOiUI4ktslOI1mZcd5CiMH8uNl3ACzEOhpmquiiLOYlkJcMgGUIGsFB4Zj\nsgcQgPDOx9gNvYXnKvXRo7bX7kEI+3q0bOkzEpVQJ5MKI2X7uYk7HJtkM4b+\nkg4nEB1z47Zr3yrVaaOt8lfqTS/vhT5IaBWK24q3KqktqL5qvF5RBfMZfj1F\nuohzNz2QlkqMVH2KYMTHz6tDVIMKRhY97Aod5hpiehOkU94ewXm0fSs8H5ji\n/k8txzXCrsTqlY2jTqRNDt18NG+joznzX8pIZNkGh7x6mL01qYTULgNdv8QK\nxJ6SdE6bTv0BNgTwYpXfHfmWpdG97EXuWPFqjY6bbZNyoF6lYGd2waADaFtp\n77xT\r\n=Ol8I\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6FeXC0qURHId/OOUE6X7rtbw8a/lKxEWJp3zqN1X82AIgFH71Vc61kR3f4U3aOKIyN5KpcBXxCq2qibqgc1EVtKQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.398_1637806014750_0.30483382381568"},"_hasShrinkwrap":false},"0.0.1-nightly.399":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.399","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1fa12040ef093c22848e4c8f3fafac71d92baf40","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.399","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-/zEjmaZNDUvQt/20FAyy8zgFUHsFMT6/1n6PfeI3wbbtKxjJ4kj3cGOChbfMsUdv3x7vzvf+UEIkUvN3gFWB5A==","shasum":"b2deb0f9d6683184b7a7b7a72da7140a7babda46","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.399.tgz","fileCount":788,"unpackedSize":3481958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhn6CfCRA9TVsSAnZWagAA6vkP/jpAO+Yncj/2pSyd6gBv\nDqWxdS28qROKjvxRXidKzXSSs5MNA4FUj0ouWn8cnA49idXQLtZewCPOdKzV\nMKyM500lHCWrA6HGhXwI1mS25YLMvJFanRZXa9zulAknj+gCGqUfv+l1xpwx\nCYZgieLv+Yvq5kwo/M/Ek6zk6uCBaanVq8y42z5QbAXKvjCUt31l/CD8Zj+k\nTUdgCyR6Bw2ysELpOVpbIioGcibxIMcz0PIrRdrOY92l4EX8RiF0jOVvI9jR\namashp/YqLpQZMf7fO5jt5g6hgsGpUNGW3GFts9y9ruDds9808DwIwPKY4UV\nRydAvjlZX48vDHIgtaAAPVHah+61gpDK8ziiB3234sFCvMGYD7K6WDGI2Exw\nFCZ5mX+hyw5pbiXjIUzlE/HbX6Lj7IZS9Hy0ZJRv3V0h/cNyqLJhAtKjzEpi\nkr1OE8eVQxQvdUNPmbJuCmj+WulWDwgm9uJIHXNcGzsVRbPaYc+6Tmyx5QdV\n8s1Ylr2BKu2DMLwpVaad01r69zYLhiy68tKodvrK+3zLYitqN1jFhgDGE+Vp\naOcCHEJ/zvT+P3KRYBOifijRR/lOLQxFvyClYh7wNOyzIA3LxHyCJElixcYt\n5UFuBrKHSiNuutvlOjbraxPB69tXAcx48+EwT0HpKB4jS3nDRXjcok31oKlr\nPfL/\r\n=ZyeG\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfBNG6SEQN93Qya4uPReXGxr2KTs0Hbvz4Wzmg8Rd/YgIhAMZNUJCbHQYJx31HZP7/2ImeBumHbbHsn8coOqdtDQKY"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.399_1637851294845_0.09371542489405704"},"_hasShrinkwrap":false},"0.0.1-nightly.400":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.400","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"502684a45ebbec0bddc464093108f2b90a3b7a7a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.400","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AEE0YkJYAjvl8FHFYBc7njPxvq+TSGCVxf7lV7JgzUQDLel1d5izCbFBXZU6f2Hw8nWtWdxGzSzX+K48U4RVfA==","shasum":"6540a1cb9b8d7920ebe55efa725c157263711712","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.400.tgz","fileCount":788,"unpackedSize":3481958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoOVMCRA9TVsSAnZWagAAk1wQAJJHG6vbF6UVpXBKD5Qw\nLzagWUzqZ/kJ8iFV/WCOlLHQ/gjdIyFZdARBX67Es8fo8BqmL6Y5KKLJRoVE\nQ2zuRxWIMaBMFHjwgOLV+fdNjdWKF5He5RwlXcTVOu9UmMIYjBj5vx9dABG8\ngSkrrOJfoioe6UdhN2OEFyL+zA5X+BbMkrxFiwLCNWJX0w25QZR48xB21syB\nl4VnX4cGSa5YkNvhNlePuzVd3Xs2xT82UAeaLYZ/JIdmCsioX962D92LOYGD\nlM5DqizwJ9+KBc45ciabF7z94jB8RmA7L9ohFkSdbINWLDz1ItAk2UmxUYvO\nal+vkIPl04nZSONrfYGksn2qkRwxUUZfPX9y+4aR5MAzOIpBmaVgwcd5CuNp\nLSi34R7pRgXBcyMRV+1EuO8tRhJgjtPNcqJ90akypDjZzJDWCqzUQnN2Xs8H\n6SQs8OS4h0FHQuRGCIZzAmSz2oE6XOPvjGhs+1L4lo334HFz/Wof4zZTW5na\nQCECWaPKYvTxYL9Ou/Np1y0wE/9SbAUwsSp18fu1Yy1DrMErtHSk75CM4zcj\nexztLFjD0Vm5krhPO0N8HrTCHZ246XKozdYqwxgdP5faGZIAdF4tfUkl2eHB\n4dyhGPXWqwfX/cOwDM73lCOXcMRDh+bb/3nsXeOOo9pTjIu3hCLj2DlsVBN8\nVuAC\r\n=hVgk\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGb8f8owDuXQWwZk09WZo1uA59xE5haw35OtJaKO4MJqAiB/0p+rSLruOdWzvQB328r62OnSTSpXja1DaqEzgLtUqA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.400_1637934412110_0.6930242172010401"},"_hasShrinkwrap":false},"0.0.1-nightly.401":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.401","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b422ce5f71b949157818891f939402a5d5180164","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.401","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-AiVqGDOh2R6O4yH7+Ni2sm9uHCheik+XqfKQAHJnIaJ454BIV92j4meR3mQLNRZke7Kd27J0Qt2AWJPzGWeymw==","shasum":"ab5dd05db5f311a47be0efdcb70a3f24f3a8d17c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.401.tgz","fileCount":788,"unpackedSize":3481958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhoWP9CRA9TVsSAnZWagAA/14QAJKAKyx2LV1kn+9bM/Px\nDORcwPzzlV3XMkm6nBppE7lhPfkgct5NpMFmaEpbWyaSpqFMOXBf8H2u90IE\nWLOa39bJpVRUGWkFgVu9iUJXibz8BB+X1aFq+aNK0tp4kkhOanjjrilr7KQM\ncifFtJyATHqriHeMxC3hMacvtP8pahZJpMiZMNLrjXuYliWGNpfyLiuqaLnm\nlJKstOZzAuj99jKbVbmbZs6WRW1sbTHon7czyF0osHc6td3hiD8Ivoe/wzpC\nH7JLODJqtHkGBJowxoOwVT3pug5f2lzfDzK3LonkS0BkMdA3jJYWGQLPsZr3\nilD8vtF96PnVwnnVhqDoMBhiquOuMzBYQBbmFZk8HYAKo+KszH0Qi5z40Mwt\n+B38dpnTHBkHANQnkDHDwZY542SijSmbyOrjsL0qdz1AEJ9AoY00rFxOkrpy\nv6zIGrDln02A01brqvOlpkNJh9+YwhGGu04a0EblsFLYo76t0zmjgog31a1a\nFPXpzkuLL9cFvowA32YMULGMJHbI7/h0dODliMDOUDZ5ahAF1uW0TVfRpjlb\nW+1U0n0DrY9GGNeGmQJz7KJUA9MdroG1sqjo+utjZxGalO/9IYBnXskVeIV5\nt+cXZgK/+vcN2X0geIddzLiIC6tcHVrWZYNozJpcu7QR7AKmMdOZhYhv0lYP\nTev0\r\n=yn3p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD3VOTffM4fRjbLUIwAqFr9N+pG3N44BogxVcnM4t0D2AIhANx4A2uzE68iNPps02T7CgDoXkwvYGVjnLKPcaGqaKEP"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.401_1637966845190_0.2317862472246861"},"_hasShrinkwrap":false},"0.0.1-nightly.402":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.402","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"340840bb39ed4bbea410c676abbc1acb0197c624","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.402","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-X5F0voGl5zPAx4v/kMPa2mp13ACeisA1QsP10KEiEbFkYXoPdSJLBVhMphAwCZY5bibW2UEQFdKurQFzqnQQzw==","shasum":"659d7e7220d7a6a208c42ceb14f4c1456893bec0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.402.tgz","fileCount":788,"unpackedSize":3481958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhpkeOCRA9TVsSAnZWagAANZIQAKSUP6IcMRwGosIvMsvW\ncYn8lPNIujlkUdJ++fyM2ix5FfJx+AQPRqLbDzkAa+bfRu9vVLV+TU57CdFA\ngcjUPPpGcENrqLhIEWrm0CjvgckNVg8f6sgQNZLqTKsm0aNxoJ3lNHx4CX/0\n0ZovnuiQCHWvgT0wqmUKI16CLxXE3FjLNApOA4Y2GordF4q4yfsAIxjKXue8\nXcl7dDnJZqnxrQ5dPTkwPzE4DG6IsHgNo41VHx0F4yHwZAjOzKZC2MGqhR5d\nrPYvqgFV50dPFZJ4aMQqtIzudykhdMuQSlwGI+L3T4PJoEhkMbYYayRDMFFS\nFvGpo7BkH/J92hXqXspMtOsL7fMNh30dgirPmeMtQZZ+TQhJ23fQMVS/vS29\nWhilTfdnolvtAV0OcfVDKkPkzzcxY6QI26pn+olNqUA70E+xYWeDWHAmw/lF\niknDeVJf9nD7qDYr3CH1vdIgd86OdlqZ85YzQRzZ+6QrZg6ExPDY8hoc0rJE\nWlLjLs6emmaEmqf4yf8EceV3u4jtw4GI8C5Jn8ZMgMYtftTZuyLN1qhhHokn\nSk75914BlltMxBxXbH/WKBf/icrhu/1NmYGLYEmHNG1KoOw5iYTYRtTk7CXv\nr2U7lwHLAKLsI1UdP+Vhx8n3BOQ8W19FBJ4SkgySzaelHzAq5keZgKj5mYlY\n94Df\r\n=iyVF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIASsyWwiC4WTjQ09xZjQr1AQLro6R5We2Dj2MO6zP1paAiEA+diYJA0JYWVnYzzymZ7qw1TTROLH7MRpfor1/j/wOHQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.402_1638287245963_0.36664585012242434"},"_hasShrinkwrap":false},"0.0.1-nightly.403":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.403","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6fdfeffdb35e0864c5fc0c718c81b21429709d32","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.403","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"integrity":"sha512-uqgrbdgKNVGgZhEu3waFigRdsSBnvHOlw136pdDcFalnhJWE+Yr0R9COzAzH6HLNSvgAtw5F3yMNcR7c8iCVcA==","shasum":"8a202c034664a5abacb19e532acd4929bc373cfe","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.403.tgz","fileCount":788,"unpackedSize":3481958,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhp3sACRA9TVsSAnZWagAA640QAIqUbUirBuTxMW24mf9Y\ndOzM4L9o8ad05xalno5gufdnZYgtZ06KRAcdcxnla082hNYEBCLOjr/cOPGd\nyqmD7AZNVrvESueHWdhz94o8NOjU2k0gDeGMrBqq5vJfxzqkPby3RLteYyfK\n01B5y58B5wp0SyO2WPgTJcMRpkcaaUX0FXyrwa6PtxU/CFX/J2B+OuseVcBV\nN63OIrqE9bglONhmE+ycUGgCofgtJ9u+TON9SLIE0ZCsfxylwjPdneszD2uY\nMn0ypWAUVEXC76sG5Bhi/JIwPRhNtZWLtKXsp87U3BY9lVFM63VIZ3lOtC/a\ntabBWLinutOCS3qTbARGwLk1Rz7P4g4jarTwf6bwDNp83wEx0mlRZ+6lCl84\nx4sOlpttmTauOh2TPAK3p0eEwvTP036m+AfstEu61+l0iVQa68UvXy2uUQbX\nTnAnhKxRack7GKNGsMzlK84jxmx/N2L2z3/3R2sHyKxXUneg58S3gmNHhFmk\nccWSK02xX8UwWlBCuMUNEQ+jqp+nWntGIk+7lERlQ8Fi1SV0fQxLqVfWLKLh\n7zObi34SrtbyjNoMpX8WXWxadxoYHrcdClHMmzZucPgGgSEsZ0ghpOoHNVmI\nn1Z0XVDbix2ejULs8FQCpqlttMMPjeuncw69o5aQnctKnnI3pbxvnPR2byHW\n4Waa\r\n=eND/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDHQifAfnP3FJTJAjfPGcwagbYNW1zYznUkeAMYHyo4RQIhAIQRJ2GNwiP+wR+Hkvh5J/W/eVGR86eT75i7uZMjxikb"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.403_1638365952239_0.9042693457088744"},"_hasShrinkwrap":false},"0.0.1-nightly.404":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.404","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"bc019388254104534c82614c6df3848eec1bbda6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.404","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-tsVd601HXy9IAAGqjoWElR4CgE/cnbk1tY50g57Fj6r5u4zorQjVWANqWvVkz7z/D5CtIhuVv0c9gDsuYXSBkg==","shasum":"b6f881c346bd7a97fa77899a4de7cda1c05b9013","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.404.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhqVBZCRA9TVsSAnZWagAAMkoP/iRFCXN76VvKJN+oJMzC\nJvjjyZ8fTh28e3fuxbwCQzt9D/g4YjGg0DJg+/+ysVp0VX4goTsN/UEadRmf\n5XblfpEVrpDXvbfmv/VPR36G+Qm9zZtllpZTibKzFZYPKi8jK/JXDbSL/T2Z\nkvRpu/i0/x9PVIP4Ypny+mNaDBBGapJw5C9SnCdvthO/6wwLyczihzktyQNJ\ncT5qIH8BPJ112ZVW1i0Hkrqfk7Vmvd43yn8/JkNSUSVU9eToAE5EMxO+o6tB\nceFb+fAr3W6jeh4lHNaJnYMPkXZn4xtlnxFxvRU8t8/vlzerigOZs0K8p1LB\nGNhpNy1f4dOdcRy2T2vBrZbfKp+VFhXXLpxgUrreJnPbV8CDKiHec5vBolGa\nAq4t8zuGc8XqOTm3M8EOChvAbt2ygdG8AocH/Hca18SBxtSP8TQMRPA4G00l\n1V49Qed8ZeS+z/Iz/o0gILi0Dwfn72AvdvxcqeGDbvJ+N2oQxGBGa+F3Zy2H\naHrKQOb/Gq3AYmjKOFkKlbfn6SQh1L6g9W8aZs8Hz8YmsxTvnDNna+tnikrB\n/dTmAUXTSoxqpqdNHMHzUSdOgjZ8nc83K5uJY6rRtKCKOPS/kcyIT4AzC7sW\nho1n2E/uresPMxcPeyCTWbfU+XPAcRWhB+OdxPy8tf1ZM80CVzpFd3E/TOdJ\n66TH\r\n=wm/C\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCniMltsmohvbFIH1MiuJF77QSvuPrQB3O4fV4wpyF1WAIgT6EBp6kr96hQKdb4oa+tWPRcNVdbsGmZAtluYOY4cyI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.404_1638486105023_0.5049139004839001"},"_hasShrinkwrap":false},"0.0.1-nightly.405":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.405","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"df9a07592c159229d88f515134a2e03094dfef47","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.405","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-o+/f0PAtr3Jq/annmX4fZrgIK73hUQP2RV08JRQbuvD+ac9peIVJu9YmFivceiEr6QZVqMHgJJgz1fXnFFHpOA==","shasum":"312a9e58dbc92ab6a55ec93e0126c2dca6e5ace5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.405.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhq96KCRA9TVsSAnZWagAAobYP/AlJK0vNwLQZu3Y8agTg\nAJ5YW7Fl5TbuYCJKZhQOSy5iYFrRMWwVWFTh+69n9wyJATeKwfE67xshc9Bw\neK7VvqhciVDHmVO2qmzhle2e250fSQ5FwpkUfyyGUgG9uP5bv64febglsyLP\nQL6ufaVzWo5HfMCz8SEUOfghcr3ZVR+4+YsRHKvH3rIuyOtaZDrQZuDMWZP5\ngihw0RjFpxSSo2P+zKbp455Co8r1A6tTjzhVSK+W5svwSFCNPzC8MxapA5zU\nr3ngxpEWWM8nczI2P2vGMMEXwTdoinjBTHpgR6D5tsO6Smualmb/9YlFduHJ\nyOKDyDiVRyiGAP86Hpx+enWnLhZHDQbF7wob/to8wV8laCvTMWv3Aoe9Icfp\nhCKK90q99vpPl/lAbpttLPObFuTctBaYTM6X3vb2BS1taH4axdKfJSLXzWLh\n/i5lPGNWOUtcxp0paKaBFetn/cP8MI+iNA0eKyKfy3ca1+jvYM4aiLm/9W9t\nrPK9FQx0MGNE2ony+R8lOKCQRtty6LM28zxe0twibSqjCce9J6DxvGQboyES\nBX1Tvgb33QIw+X6xmSHcB6nX1NCI7JodjlHk9wNvHgJnJpv3lxchlw1p6xM8\nZOXBr/Vx4Ze+7Glj5R3unc0S5+8RTIjsH7leqwaJAqHWeIH9Pt9pG80XBBDb\nIABi\r\n=mi+q\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCU4Om7HEE0s1LnU4oeuDD6jE8q2f4RkXgcuY0vMbsLKgIgS+rsyz/MTBetNe2wGJVTVYKyDjdahiOQIoZjLKyW+9Y="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.405_1638653578496_0.9113571919932606"},"_hasShrinkwrap":false},"0.0.1-nightly.406":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.406","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d6bd530e1f1127843cd437e1470b66e236548db3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.406","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-D4bX7EeMGXa5pgoAxwSvuXVE7FTaY4glhUvAGMc9ed90S+BI0PFR5WE/P6nvLwalKp9y1e0XFupOtQMAeLy9Og==","shasum":"2bc73e32b5485288c5660a7917fb1dbb02748853","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.406.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhrotaCRA9TVsSAnZWagAAPdcQAI2Dar+z9LUOg9YBbfEP\nanSjQRgmq9Oo76pepdRZB6HkQ6p9lchC2oHM6Ufx/eEKuTNxXBx+bXJcX1Jj\n66opdgUMzZUE/nnlkdhTz7V6tPVBMHi8dtlB3Uuy8D0LxCHnRnoB3PEclfO2\nGsRriFglvMJFnTxAxVZ89+s20f0e8y9zWQXl1xgL7qF1H73vhxUeYvG+fzrG\nt6OAtC8OAv803zqq5a1KmPFyY6CDAcX4myJYrKdu1r2V0jQ7/Qi+YMIOhSJH\nN5q8FhTx9YiAjzBrkJc6OCc/SoF8HkarvqjrDbu7ysrNd1J3+p9u7aR+TYfY\njb6qkiqJAARDO74teaSf6xm8O7+NbaU4VuUlYpIrLwZ4BkGTPuFM0FXODiQY\nXGm1jqzIOUJZldZ26YwSV9SBAXYGsOkvD/5rwg33RFbrW5RTuetqy2mNNfdo\nOUJi1v6SRec1+KpI3kCnngC8j/VRvHmj4Hzt4MJrXtAlZjFm3pCpZrPZUD+0\ni7GtwtLUiqNuWSslywwHsRuM3FLNSNjpawqaP+mtB1c+eMEu3qASTatbhdku\n4CVWXW2ZjmanVPKoJ22neYmKiZsRTIXc+gsd+uj7vAb+xUQAcf4d93NIUAnF\nkzEz1/RqN83SHRBKysZF/uJEprRPeLcbFLdMQoLOFnQ+0kiNu1Od7wO7gGUw\n68EN\r\n=UCgH\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFNvgtiNr3qM4NDermh3ME+cNNCLpSj75w0mSpmi30eBAiA82TZ6ZspqBhpBa7Rwmr6TFnvMNeU7P6xqEbwmbWVgDg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.406_1638828890594_0.37989398759022763"},"_hasShrinkwrap":false},"0.0.1-nightly.407":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.407","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"37b5ec59a8ade6ea05a4f33746278cec88bd968d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.407","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-IzKvAL0ATDh1oJcYCQRwOVZ6IHFhjuNyMrYvIBVOvgiUUYPFT/iJvGXLW/5aDqBsrox0M2LXkyB5Vy7r2iJVYA==","shasum":"e972ed335ec36bd9aefb4a58f976bb878800d160","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.407.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsTHxCRA9TVsSAnZWagAAt+gQAKT1CmtOAfZBThVoh6pb\n58gtXm1uji/yFL/8r+JbjVfDEaQFudSG94v28UqX88yns+twfT5kMuDm3B5L\nDqJjO+yda4WE/wAyd5WpfabDIYQIiLg9uv4l3Vx6T5gPxftw9cKpdLc8ne5u\n39t5JG6LjvYNd3dFS+VoCPlyElDH8+Q2zn8Htc+aR13Xhj60qakfX4tZI/6M\n+1LC3MLcDS+j/yrbjvwfMoYHoYeps9LotaL3ADBq4ovwuICim6mYhO6ct1KY\nvOKjNgCCZh8n1j+tdjbY4Yvn9g7LFhxceLsM46jT0kUPDfZK61xfydrMFIDj\nnGVaX7X/3Hr0UVGyEngUPliTPagCyhQ3qQERVFWIpQRqAM1nEyrSL8PJvp8Z\nSOq0iIss7k09E9RP5yzVAYlWxi8dEmhXY+84sfpOxL8Bh4tpyLVo5vB5kGhw\npXWn1x0HyBNqzISFgdpzlr+ucXBmFUYH7iueToNThy6aY3giTfrua7SRHZa/\nmEM5k3eZrPUJO0OTZSQ9bYMUu6gWw1VcozvOvKwoIqcJTqr8JEakaUgxWypm\nLhsido9HRVFHT88dmCT7xbnwJ+xbU3kuDogoKfUemgKtuGDLonEwvo4KG5Gg\nR9vgZEYiW+k+wNnIk0hGWmfS9QzwNbjTlagWNW9nOLgT8eN34H5Ivlnxq2M2\nWqMr\r\n=Lgag\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDVGGLhf4o8OPY0A/9opih3q3dlOXCiHtruZEhTnifFwQIgR0iA4Fu8Y4C8yWNAhXZafeUlQZ9ZBg/LnS+9TgIKwHQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.407_1639002608870_0.6984194179719334"},"_hasShrinkwrap":false},"0.0.1-nightly.408":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.408","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0e453ac9be45169301d71309940f7cad2869be46","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.408","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-yfOJUAUdWDoP17Xq6qvcWCQAw3O4daUEu1yHI334oV1DIDbOyAJ1f9fPy+jMCyB0Wf7UUR5FXLSDOpV626B1Tg==","shasum":"a62ae49615a149f4338f80bd98f8458853f2611c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.408.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhsgvmCRA9TVsSAnZWagAAvq4QAIgbnK2rrsNg81LNxa/k\n2o7ZZVtS1ULN9B15z46IjWY00R2QV/dSu0crn2pcDQRqBnr87ZbgXTCM3I00\n0ndjz7lyX+h5eDhwQz7+8Gs/ZvvENW0FmECo924a6Q3D+2jRZmRH8Pe1tgyc\n3aGMdb8Sb3eZt9wBIswYnJQf4NsOyG9ZiuvQ/5axU04/ztGw7cMN01PRUyno\nrm33uHtj27DEaV3Oyfc2d4dJO92BB2o8AOVtsCVa9kTf8fQHHSApXKiNjdJ0\nZp8xEJ1xkMnfPImUUwNY/0tOutZWD/0ubccAGaGdPtTWV3e5OJoZeW8p6U6p\np6vLnAnLFMQ7BBhuBPWQS6ls7cC7t1naW33G8Q29WezhWZiNuxITqnuh+SDX\nrbwlLx970p+QUX4ZTi3glVOFeiBjTRdbmClnjgScyMEopPIvD0NujVN6+yUp\n2uiOGlMLzK4/dXUZl2ebQjXpsoc8aavIUeKnOmkQFBH02hdfpUs1Nkv3ZCm0\nCA+xxYWiwne9Ahtj9oYDmF96LTLVF4byc2VzJL9W/KqtCsNzxGkNhS7BFS62\n+bb2AZ2vwS2frhYqcWGJdrGIKl/ZakKmZ9+5b68qipO09mD07RhYhK6EUHRB\nHWXM95h6l3iFiXa9cGLSbFdMKVwvdrPKUK92MmD3o3hnA+asUBtjRBdDJFHT\nZGAo\r\n=tuk0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDeQUqzR33JvqCxIMcFTnZG2GHl1BlrRl5iJn4Tcch8fAiB1VaP1wroynTWKNQf9YOKjQMwOfG/DOt10Q3wEbZqIFg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.408_1639058406420_0.8063586930469071"},"_hasShrinkwrap":false},"0.0.1-nightly.409":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.409","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Lanuage Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b38b63949088c8c2c58d6d1250ef71f1634a06bc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.409","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-FokrqV8gSm26tXlbMLRKb6DfCLLypOBN+4uN9YWdVaVlKWxmqpRFSY6Go47BbbHYOzWiOnrykzIwoM27o8uoJQ==","shasum":"6500f53b247cd7b4b09ea264d41cd2be4149c3b1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.409.tgz","fileCount":787,"unpackedSize":3481935,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhtkc2CRA9TVsSAnZWagAAmv4P/jvvIOmd2jUp03dFurFR\nOwMJm15Y1/B3aiQ0fqoStdDsuwHMyD6bdcu8NsiFUDaJbqP/0HsKpqweoFzg\nrcLxC1qslfwUIx/lJzP+0B+jf7al0xKyU6boAMSbLmV9+x2ul4JSY/9jabmF\n1DBvCNKo3BV22LDY25N68EZpy8h6vUGQFJbP4bQeqV+MoJwzA7bjqaYcNNJ4\nhgDzU1aFuvk/ifvdFpEiKYksjuVo2cnHc9JD3E4syvNdiG5IoFKIxwJCbS7/\nV6KIN1yGhruqiXZ3bFkPrD6rp00H8tc7ld4xDoiy5ePrHO98P+ddaCTpGD2r\nnf1OEEA+e0Tmx7eiP0qjLUqwG0a+TsAJPGaa/8vji77TWYJ9BLVW+ukB2HUO\nKpnL0PhYi1m1pffyNVWVJOc+wveuRwcP3Y6xSznVA04fxq2zpgmfXQL4u1YS\nQPckrr48oBCdJ/NpCicGVyC0KpHlkuqxu6GayIYTGn/CJBrpz9c56BlGqmK4\nBhhAuezfZLAWlqW8BXjZYqx8LHRcQGdJNB2UhPJxPd4bSrXRHJfl5A8rliHR\n8q0G3DOXwhawRakoEa0p+MoBn+xzavrDTgbwLGUjbvKZ60aPZVl1Tdl0yoKv\n03Mpq7ZltA0l0bnBgI6uYflplliqlqqiABra8bBV9w2FioLkiXcEskhFUhwG\nJhrJ\r\n=J7J6\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF4IbNgv5amlNBH5VKlxaS8YW6D+oCLQuLo+iRaJWE9bAiANzLKq1xAwTbvTxa9WB77I/d5L/2tjdLH14VTocjhiww=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.409_1639335734656_0.6850819092833105"},"_hasShrinkwrap":false},"0.0.1-nightly.410":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.410","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"08f9366b57a9580ac5d17b9d7a788d2bf1488770","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.410","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-E7vIADKt3E3UPr6wwa8AEaEhISQADLNBfx1bqaNkuwFvtChr13EnBSuRG/+DXpEclSijiktpXIb09VEwILjM6g==","shasum":"920fd22dce8bbb56dd5a7cbd9d109ebe6e43c4af","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.410.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJht0vtCRA9TVsSAnZWagAAidAP/1QWQntDMnNfA177JWwU\nh7tMFokC+40bM+YpNoGajHa0BMfSNeMEiQ55at/xFEjLUL+KQ/upyE9r7Elp\nYEA1gdtX9Nac/OE9vsDsenHy6hle6nMENtpUilEGsDr+O9ZJgt8mX59uMteR\nDg9MsPB3GkENv/Q/BgGy6W23RKm3v8y/7kAz7kj9m5C83n9CTMJNkBZK+tTT\ndz8zmFEmcbFtxC8+WBoygzqgwAMcs8TmGzJYXu/gbpPCPQXHLl90mDlVk56U\nBQf86GNFzClNgV/9tVQWJvq9lXqsKx7oWVJmS72ejap5LLnN7V62aQak9VE/\n6pa92VF5PNc3SIMVAu/oMj4CQu2aXcuL9SdQ3OYJhzBTOUt2GJDKKLFHtNOY\n7Am08/Df3b5Sb7nMflbls3PVFdw9j2E+rUSJprZOWs1ambKBwQGYuazhCsj1\n9nrT65Xr3jWdvulNVBWtdzSS1AmKE5nxavK38SMRPfo/a65c+99V4DuFdwBq\nsk2pRyqdw/6Y7Z+rxPyXMuoSDsghcuuu/NsZxsJrmkiOAEXeVIdzhEsde6y1\nxphu3jwy+9WJmmEuqiS4J0adi1C7RpICUGBlZI+US1VTUSq/qxI1Ihc6Xd3k\n7GMmggWhdGfJcDtoaW3w4Xd2nvr9Rhz/ohQwvBs0i91aqcIV/X48ASDRz0LK\nrdMy\r\n=oqmM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH++dx3oBt+KeSlkjYNBpDb/oMn7eudFoONXVi1M6WmCAiAyD70fYWrFDH1UpDhvO+OyZCu4t9gyVt9aHB8euuhIsA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.410_1639402477219_0.07733520490017987"},"_hasShrinkwrap":false},"0.0.1-nightly.411":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.411","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^16.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"080a3f39c0f42e8848f89b8663375a88c07688a7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.411","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-fj8GdQnKH7Z9w0PI7gMQUbSWo3tDFJ3yfOpfBmBd4bUQFs7LjDf947BmJ39x122PuPskxD8d3/slHEyYhSa0kw==","shasum":"199fff878a280a81c545a634ed5be145349d4691","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.411.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhufhwCRA9TVsSAnZWagAARAIP/RpcyTi26D09OvvdUhgi\nLSZq0KxlzbFQSn7NsdBpy6tFiQRiTxYolxEh/jiNqHOaeBhJAT19iyfIshei\n9ZDmt+1xvzvTSoiOgJlaKEYSK94gBegVUZTn4CjGt27UEVTv84vfk32qntBc\n9xH/FUl0JK8J7uhKGlvwAnv3F5BQECiUm+YKs+3CfoPtlSk8LV9lBmL0GgJh\neKq10+OAyN0/fA3/RQylYU98oc/J64hqIS8pJhOfIjqEqPxKbrJYg1V1uRlJ\nddjOAFshNp1ywhfaxiLsH2bbFeiWrZd2sojRTYFwUIrcgQsbT5NURqgWmFqm\nTqnurhH75vPgMkfgeCF2fPeiUhzMsDeOHPLZNCwqTHTVvvmSZPO6QZV2qWNp\nHfSjyswzhZAsHdpKXzWTIfq23B4fDtqBatzDycy/n1GIM0zzjjz/vIiCGq5a\nATvxbh7CRaMaNfh9uDLGwp+VbFVib4kFLmY1JZbgsFgLmA8aU73Gx4YnqAo9\nlaNbnEO5ySr1ekcSDrLumZD/+1vJIUwvCgq4V2pj6Z2EXxOrDG/U7E6Tcg5N\nwnDQfhS4e8zBM1VhEpCfbgXSR6aSDo/NnpEydvCQstR3sZNJBbAhX7b6LPbM\nEhkv1whkj3EObFdyBM4c2waLKDfRaRgnSF4H4PNmU3RmA8zoBYqQ+XoQJ/jY\no2MX\r\n=5Y2g\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCnvkltaevxY32L63pDkaXmEj+zmorn21++cPA0hI8dHgIhANxi/OErp5JsAM2eFAzEIzEDyZ1jaHlpULE+QuFkbPRB"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.411_1639577711954_0.01555566793836416"},"_hasShrinkwrap":false},"0.0.1-nightly.412":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.412","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8b5a377bfabc28dd999bc7efeb15a1d9c82a71fc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.412","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-8LqvvXEKDN9kFgYh49i8nPFBh0fgoV9WwmwHr3YGc8qzC18rLDPvXbaH7TmHdPa36a1dN8Dfgy/42RhnP8Q8xw==","shasum":"579130c215596c0b64e8ff4121e1401cc57258d5","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.412.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvLSzCRA9TVsSAnZWagAA0uIP/2OUwvE6O9V245TPL3Qz\n1dpP1TC61GRaGMhvATCuby+EmgZM8JcGsPLLaX0nCO+J3W/v4EYCkLGyDIe8\nSOS2/bhuouMsxi1y1dGGxlWid8J8jD3lnMdROM1CjtMkWnOkp6N5Zvn5TepT\nlWtczXkewS7i8mckGRPhL5tnOMCpMc/hbkK/6V45VB6sxfeDsrxbqYq7zysm\n/UVoayaP+S7a+LVdcURJHuOjvf7tDeCLLU2saq2vRSpXbiHdr2nvprlZk081\ndFZ1ydsofs1mtB/IKafJYVLwrvLBxzL62Cf925sVNoez609Exi02AodoIump\nmhmBdzhokAwHDhC0z/b+sTVAwWWk3ZWd532gCU0aFXCx+QL6yp/wn2tjcjyy\n/LR8nUKVyTzzdZon38eVY+c8gPhLAPVbd/Jp2cPUVObfgJihZwoeCDzL8snV\n9kfgQgoBPaM98o3f+ZzxaJWoBze++FjL18rHTksusukz+3uhKRKQGxTicy1N\nTTzOXIcNt8sXVkiBqgC7y7g9ilKyatgOwcK7Vx1sro2t6DDyT3m+KeMYuXdC\n/V7jodW/+xeXL/6Brq4b50bpiwVUruQvI2YnHFY8CFm1ezfADGlODG6nZv2G\nyux5rXe8Z+Y20hjIRvJ/+VWUyOj9pfCiu07O5MwLwxPGPFaDXPpYcqs/ikl5\n1W70\r\n=AJ6/\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEmrztWyMUxJqbniDnmnmZJtVs4hR+cOsuXIf7olcoleAiBv/3Uh43BWoxPWiKMJKUrU0YwxmvGY5oQKR/R6uZw2nQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.412_1639756979495_0.15480933778355865"},"_hasShrinkwrap":false},"0.0.1-nightly.413":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.413","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"ff0b49b76892875772fd1688900f3b86591a15f1","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.413","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-8njnKwVa1BoOpqxKXG1yn0SJ5OnYZaxo8QLZJ3/Oi8gusTWkh5+a+At46AAw1hclcDTcyZ9vyYS2f4g00K3YAQ==","shasum":"b27a5b1a4b8845146a3baddc3a1b151978e517eb","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.413.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvf2OCRA9TVsSAnZWagAAKpwP/jMEVbNNRZxabAWttq4h\n0rs36yNdt8EbAvPWpST5HGh4gvfY5Aiv7Sx/3mzYSJzfLRGcaWuUq6W5MQF1\nbph7uq/8zTv+uM4uNgDd5qep1hBg+VIDsVZm8NeRxcd+mu0SY7KUBG1kJjT7\nvh0Z36DXkxMqC9LdWe/yPA5P3VkrmgDACdZp70Vg1qCThJZqV58pzkORXJM4\nNK6ex41fnvgFlOsK0ySJQSi9Z253iCfwU4Ix2RbzBQwbJ34ibfpKWKe1q4wN\nQdnnJi7rVUOrAew9N0lmb4ylI3kPA9Wj7B9fTyuoeiRBRq8Qtl5AaFhlCuZl\nwojr58dDj6ecVkddPeKdxZWiUqCNlroPlQ7Fh/EQz01dhFp12IQEONmCSl6c\nq6+VL4sR10nZs/TRDlZdNd1sr+zDhAzpN4ZpYm83G9utn7ULrqOJktRYD/SR\n+HQHXTFVZHMBAap6w/613xbNRe1IZXAASC+bcur6a3u5UjC3kQT/ImOeS2rq\neokiX6axxVbpVqMaZevA5x6gisoMedFZW9OrTtwhsYhG14923RcXWSQlYbCk\nCJWiAKFHN2rsHRde966HlINcY6eYuimhHHVcv38EKmFdpnv39qWrj19e7SB8\nupq7hryoXbtuIgsrF3uaL0KulB4B8Z4OQQQQQjIWhm70lt5hzK4oQQByVXSK\nWR3a\r\n=IvKF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCLAx3BTVG9Vl2YQbDczPgRa4TYEJjLum2R29iosKRY4QIhALion7sTtqw3JBKJ+CRumg/g32DlOETV70cv8ATVjM7u"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.413_1639841166508_0.20020823881669925"},"_hasShrinkwrap":false},"0.0.1-nightly.414":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.414","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"492a3ec592941a19ac1e30ea727fa238d045531e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.414","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-to+9jngIrtTMrftziOmg2AJiZtaDhqnS1TxZAMQPGmjvvvcac0uK7mbmnQKL4FNSBPSWP8TANVfYzy8Gvkx8Pw==","shasum":"fd0ec596a6d295e95b6d8f07dfe74c8f74e5169d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.414.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhvzWRCRA9TVsSAnZWagAA8TwQAICZQBJW8N3BekprC7mk\n7irPVAwcUyzXO4sctBzfCxvs5jvgm97fv5/8YWCgb9N6/ou+9xpQwwmJlFZI\nj+AgIJ/Bh7FQRYwemtOBKy1Q4RZhJMDGqSRecjZUVtpa/Cz8VHRzHC087+kp\nTBN2LoyjNTi9pj4sO6d2HCS5Q+6675cC1qkDn3wNSEjQzDKCTL3Sof+HLZ9d\nf/rL8N02WkHgAolcSk/KoZ8zw+3pOSB5AdOdVG3Fod3FaqWpi/doUKM3ALb7\nPpByrNxchQ6ycTEwSzppNgvy+QVcS8gnYaWln22i4OnDEySFYcTGWZ/qg5hP\nvfjoYaHHhxaD99HPOHRDaSw/EajjH/WiYmqQ3wXvmoZJ17yrR75Doa4daTj7\nD2z3SedRxC6YgCTv0Fhy5symAicPVV7No/HMslzlzJq23DAs0EjQmfogcGag\nZ5sa7e18fqPbt7p+1WkVXZ8c2JSBdced0SlC1oCgWAcxPTvH92hikSEJ89jk\ntAT54DXXV2NgHFEEUyUzEcmTuHPMup3gqThOhbof74SJ1qDEGTYCXPpgMZgs\nHgEJguXkC8lXEI5fZVupsQrvLaDuXHbZTwUbRw3BsxaOZ0NQSxeOp0ZsbRWM\n0n4j4hsU7dDwgOFTJhp88x4oKF3HpzjQZU1OU1N3Sd3oJkSp2LmoTNRwSDre\nA0I9\r\n=YUXt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDbYm4KO8JKJqFisIws2i000Gwx7Cyk2tR6G311tfBFpgIhAKf7Rp1GmHhHMIBIzkhlL5GyZcaVZ9Bq9ZwClQE5vxve"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.414_1639921040907_0.553947667061057"},"_hasShrinkwrap":false},"0.0.1-nightly.415":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.415","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"35869cf7db090632c8d55f7f3638a2957dbf79ce","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.415","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-FhC6LPiUAYgi3U37jc9XJFBe+ijusS+plRBTfKhZ1u3TVB8bx6l7VN53YJhTzaCQxh1WCQujetNzrzFPlL9t3g==","shasum":"bf02f4d4011db0e0236f4ddd92e315986d57ed2d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.415.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhw2KVCRA9TVsSAnZWagAAv7cP/1y41zAkAssuSTaQ++5E\nmgUHJngBjGCMCWRz6O+WpAKXECaCAbXhKvtgLaXjt90GIqSIVV4i1LDRgP4h\nGlMg2EFs09hpWJ9lFQvnPZFGBhu0YYPdqGg7J3WPNOZDzjegzloChv5fCrkO\n0Dzf/X0uo7ZShKlQuJPMwDUELvyCGMOdpzOfnZakfR745cZnB1ZugNO9ccAH\nz4BoSRsLm4OsI8lRYefefdvGQhtyUXaozOui961ErUfvphEEDLEOWdC3pH2+\nRFCKjXVs1t4tAFp/rzelatenuo0pJaGoMvetFJQSI1miRgWPJwwZNDBi0cdA\nYCHygRQDbVglqbZtNo95hXjvnk7ibJbOLBb4AUmurEbi0XTcCIHmo4zQk3hw\n2hQlr6fvexqGTvmq9vx77ZuIwLHco8aziIxWZTy+4HpZv3/3mGmRc5ojW9kX\nNpnJHd1HvH4cPrMXxD0lKgyV+z1YpmkibmMmVzI/v0ONKnOnou0ZrLzjyfUO\nMmGbfw6XDX85FH+xWTnCvA+60Z5g4BdGhxal+wKEmC2nc64wHrTMSNXz3FhH\n49Fow0fJR0aaYvZ7uBRqdejiFuyH/uzLNRPDgg4VnGmzJ7S+dsBjdM9REp9Y\n4xztwkUOG1ZVVPfSoyfWF7lOs1svky5+UWog8qjlJf+Fsa47y9PurvB3Q18N\nx8Jb\r\n=RIAw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIAX2rIfACAe8TjHf6nOfyvIFXvZrYIRVloc/ZwbDl3awAiAbCXmUaXyzEfusTBoo3xvYz8emhmQ+HzNqzdrNPPjKxg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.415_1640194708924_0.5590025553013289"},"_hasShrinkwrap":false},"0.0.1-nightly.416":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.416","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8085dc6a72c4bf94a9734209d841746cd8777f6e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.416","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-l0aD++mDHiHway2uy5SokWVZw9QpsDOoYDRhZQ63d80LClBfj7B5pMH6721Rg0ntVgnYMJBZhg++qrzmSLOibA==","shasum":"c765e04e1b3c3c48df74a68857d9f1fc090137c4","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.416.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhxhWPCRA9TVsSAnZWagAA8lYP/i85/aWykWWdrUx9ohA8\nSIeq9N6m0PyZglvhYbI0zdwR1JPZLM3we/VQ4edEcE8sTaMSNvBP7GzCXiCZ\nt6K141c0pL5F1mJgvW2jDhXQzjcRmCpGZXNasjLhtTI/j+df0yUz1sRVOlAI\niz8KUmPqlYIZ83X9W4RFNSXI83DUbN69BrHhl6LSnTDF72CccA97nAQKczEX\nXgWwgU3LIqaDNEYFH23cL/51npX3AZyBt2O8x5S/MwB95uw9jrjQhr4PzKUT\nr7S8llam4kf052DZK73lDaXqhHfUx3pYX9QodO6ON53zEoQZvHzbA18Oexxf\nWq1JbPuIdwEgXlslfwqWxKBKe3jcv1SeVW/bq93NPc9b6qlMr6mftziDSwkd\nUuDoWSiwG5Jm3grZ8rx/rqFMZYiL1CR3ykaLMVagamYHhfrG3vEaOToiMl0O\npdCo/4u2g0rJoTijl5Ib/H54liXwH6fJxaI4Iyh4uGt2m5Zk9Otjp21bQIjH\nhgQSTgu2Pdar+OGqLLZzReoK7inlae2FW88SNDndPdlq0ufpwAEoOp4KsI5e\n3BT/fW6Z85TzaBpteFy6kOKMrw7Kl94mUPP7Wr8pZk/y44Jo9Dr3s1Nd7XwQ\nG54WMUyNXTkRbpd3uKSy1LePg2hpPhhv78i5eR5ownGlP+E4CSNvq4234ULg\ngS/2\r\n=GDYm\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCKFDbOG805k+dD5X9RSNIuJEu9cyktaq+3MOSMBsRj+wIgTTpNOIJ2tgIUfnsSDu/gkzxXsKvcPzQsV+3RB3mgYog="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.416_1640371598878_0.6186469500983363"},"_hasShrinkwrap":false},"0.0.1-nightly.417":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.417","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" bash scripts/jest.bash","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"0adfa7df5b48e5c2dbb669995b528d20a12ac503","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.417","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-qo3qqL1rnGkKF4vljNGHKcwva2bAzDqmf8X8GZHaqJgVjrt+p+zJKX2CLa9VOPcYZUUU4F8lEch4Z6jVT/k2uQ==","shasum":"d96ef083823d238da7267e4c3d4d8d8a0156cb0f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.417.tgz","fileCount":787,"unpackedSize":3481942,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhyhA2CRA9TVsSAnZWagAAeYIQAIe/cGaGkOU5KxnkKoLA\nYk1CtSFUOkvs0KLl1xIJEHYadQPLHsygw7jjoQRM1qW+JlRJJtMf1UPUyDaZ\nap1OkSr8Q2YCIPH1wenOa9bEpgMNEIz8FD3eERSDABfO8oPHW4hPZfItW2yE\ndu7SeH2oknCtwPBh6v0dDhblmDtjKjjf7xZSY0c202pkovh4VlaViIMEDyhb\nlhsZGF4oSPJtO529WtWgJkTwW/gy0HRqddo0NMbMbJdM04rbSYA2j6J4cR4j\nMuIIdtZvK+i5uRspmQL0O7N9Vv0f6Uu3DyaQFsycU8bRzQGI8q1ZoqQLtlEI\nzzjfWmd/5TU4BrB6gJ9QnKFN3KuvNhaQAozFfk+fZgALwvBk087OwByV+itd\nxhWqzflqj1JRXiR0R9tEtmtudJN+dunbPxWdPjDwIY36qnnXEjsiZd3VW1aa\nJ83Ei6q2J+FY3Z+v9cQ0n1PjG/F4+ALp8BZyf45uHsC7MT6N8SLUllK8yIdY\n8Sg1lrsx/ROzwraIWmgAVoo+NPl5/5HP/rXGJlZYjVFL4EXMMdXer0WgGTw9\npd2pHyZDlWVVZbaRNbKNTHS7G6pdk4K0p/XRIreawSzNuXLI/UKmiY7aqbX/\nfpf0Hj9dSpWYTDjyNWUQIm+YqNOJLTIVSYc0fPRjFMxQdI4FbcMzkY5vHYWt\n1yQd\r\n=mgdA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFCzCqVLoeP1TzO69d0c5O5xsZogKjeOw0phZoxcX/o8AiEAp/WfuYy4hcAW3HUB9aWugirsFUsg1LMtVRKG8gSokYA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.417_1640632374277_0.9320239255473703"},"_hasShrinkwrap":false},"0.0.1-nightly.418":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.418","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"aec76fdcd50b406d090332fe98076dc7ec7dabde","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.418","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-JPrk7kgiUAqkY8tmUuEoYWmYVQeah/ElI1fZac2qfnoHHGHX8RM5YJZ6oswfAoy5rb5M4160KOI4jQafU1j3HA==","shasum":"eedf0d5a95f8290f89fb042f7db26bce38be8919","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.418.tgz","fileCount":787,"unpackedSize":3500590,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzOZECRA9TVsSAnZWagAAnIUQAIpRz872kJpJUivlXMs2\nvjTcc/6HnUhGHt53wyZUegnAvLdzb2n7i65V+aOKcTNobtlmfzBAU16wVMRr\n5kGN6QQ0+Pstq2/VnkA00AoWrSCE3MCEuFoSJAc9OkjXkJRkwQE4Lhf2tln6\nZ6FZZC93owDkIZdsVIlyaORG+Xr3Y+l4Ig9iY9Vjovzs+7+HnJ5NtqmhAnx9\n49pKVPK8CGI41spCQlFD2ELPBv3blDzGIRLnNXlDFWZgQr9tYuKsz1FPM6Iw\nYTzMe3HfTV3Vaqv8mgbMAXD6OiKXMIS+lgnX6nnFReUbSsnZDxxdGuAQ5avt\nxkUBmxvD/H5Nde32bbqamvkwSntDBmlo6/nXygIFWebRVbDhZZ9Q3J5vXpDl\nGmaNOi41bnufMuYB3ae5MybJj37YYcM3pMnMwBnbmGNvTlbJf6wQcunbBOrn\nehRVDGGsGBxm6pBmdSy/nnlX3QOuAammSOclJ0MkfUKW80SpcgWFKW9MVKxb\nrdxEUsgpg7xLjxKCT8QznhZBhdzlYThv7dcbAShz4EKw5GbM2k6Uz1epyjcn\n+ZThCbnoMdpuo4NKekIX0yw49MgprPFDqQSC3N3M9Uj1Nfq6ZnuGf32rohqp\nSBiQLENzHLTXLTmJElNjC5VmPNQeGFGeEBw/dlHd2dpDYFdwZOh+X1AMg/S7\nDWt3\r\n=xIEj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDhxTsr/DpmWIfGbTwDtAYBC6iaM74ojGtHmKTnBBnmWQIhAM72hllUs0VoHSiH2dNt256cVmmWs2CWwAPIaxQ0bPfI"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.418_1640818243958_0.4066423096812801"},"_hasShrinkwrap":false},"0.0.1-nightly.419":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.419","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a0426fb91e639221709112ff5ed0c08999d2a2a8","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.419","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-EWo8mAzL1E3GDIP+FwCbxD0BmBw35OqDHTrco0TDV1sh/O4Y0M2FobZKvETPBL5pH+xHSixKHIfejtT/C8gooA==","shasum":"f6ae65672b04227e80b3743b9199b0151b63c3e2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.419.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzocyCRA9TVsSAnZWagAA8GMP/1PjBJyvqJFnheaITWK4\n6XR09Pc5PytB/FjU3GW2zmrZlg8yv4Vu/kWC5mf2kaDa+v0oUzqoCfU2iNZ7\nl4ICc5xzJLmbEbhQamkKA9qb9FFPwQFpO8Pxmfr4zvPE3asdGeLM0cLroaRZ\nbLNPmcrJdJ3qjQDeT6zQH6u0OgIh5tgdhgKH/QeY0q4y7Qg3/3rN0sXc0pm1\nacDkGsDcmyzpAiHFK/YHQijwrfVcF9O3+LA00azrnxXWRDxvWxpU6qW/HLHp\nnFWNq1jtmFVp0AnF8OjVJvDswF/nyq5cZGzQtFNR4xwo3uqo1u76TsBToZVo\nb+RmJBOs0X5qYtLsa5tQZ5QeZmLVe9JI1hUozlWwo+uzLQLTLuU3nqpugV63\nKptjS4zqreg00tWrjzjCOt5tKQ5qlM98sd/Ht7vIh/Y6w5liVxy6eWoPn5fE\no2WDL7KSVcf4RKxJlhPrbY4OgRBVw6jdUL6fJgL2gJJeVlCMISPU1oDEDx8l\nf4TuInIAIY4VbYnT9+aM5OdxUsT0usU6L/gW0ZKV5BznMkHEJh507FikU4df\nSp+7S8MxKY6fTsCdQzFF3AV5urIHE4vXq9M+Vc1NBBivRmwDl+IkjGL4fEw9\nd7Tv6cnUr2JLGf+grK6tcu372U2XXm795Bo714oBwi+tnX0TkAgiULoq556l\nzz3b\r\n=eK7N\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAoY4Q1udsavTB2TrIO1ud4n5j8nO0FholiLZzF6z37zAiEAwvHbF7Vh49uk+v2B86PChuKrRTcFatvj36f8DATPugQ="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.419_1640924978682_0.8969929103699785"},"_hasShrinkwrap":false},"0.0.1-nightly.420":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.420","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e143d54379d081c6544033a2a48fbe3f5cf4d8cc","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.420","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-OQRk01jlBuxsFiIJJ+mGBW8k9Ye4F937JqVgkqzra9guAenc9W7ztm1CzGgq904E3sqsF99sM358Q7lRoJuleA==","shasum":"1c40990a335d1116f40dcd6d60967c984dfec0c1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.420.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzxDZCRA9TVsSAnZWagAAYZoP/RWN17Im1DKoBPoPcRiI\n1OpMz9Wxv07cShcQb2e5DxQGRMxVDiY10iK0yOGb3EyjLgqq+q7pmvxswrvQ\n7n0rPXZF/bHtpONRq9v1Us4dq0OBGakYxwE8xEXFuSV8M/nuAZ7K8FBuhkJ7\nrdEgeDRTQ4TDhfOKgjmZHH1373D+a1dVsqa2q2t7uA94OeZ/AvkxHmnd7lwF\nS8ENb0D6mD/ipWKdiaPC0JF0yMiS0fr5dQSXDrk83P2jQeCwpHp/JrNE8SZC\nvemaJ2QMPABJQ3ihP0VLVqiCM1nIC+btSCj1SlW9GMAFswI51YSqe9jyKFEK\nnOiHGiEODLQVVk1pNZMOcogLIIwEIy0bEJmKocW2mKusynq7njlLxft1AdF6\nAlITBUcl/vvDt2IFSbjcDFoYPKisFuOocvRDDvMBSBv7rKkWqEEoQ0CMipJI\nZzA22Zu7qTR3Pw/ghuoOai2em9JTaGN8V1DhxTQcZyU1cLqG33K2Rn+kPGnR\nlC9RjVOyhUHbI6OCITspP9W8oXxRI3q0sG6gPqBVuOCpN5zEBE9K/S81xVLM\nz6OGiwxzgGuHCn3fpUJ7OabZmKzjg5Dg8nTM2zG5JQ2p/5hGO3/dQcKGegpz\nHeaC2QVH9dbhBnnuXFz6KxzPClCNvOtIsal15fd34FF2gN3QDxM3v5Lq/rYm\nlAdw\r\n=CHzl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEu5bTCwEv2GrbjIjmGO509eA+LGe4GWCwS/n31KnwruAiAjdujuptCbFOYw4NIlKRqfp5vxczdttLsVtaPfioNb8A=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.420_1640960217118_0.17354455979354189"},"_hasShrinkwrap":false},"0.0.1-nightly.421":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.421","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"38a0641711ab95b02e8326f56a09a10545760fc3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.421","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-mV/T1z0s87/AaPAatpXmpXgfw7TWBhiDY1O8HZI5eDbE393QW2P/DWiG7B6MZ+atjZTDqmsW+aJrG4NNSZrLWA==","shasum":"2e8ccb08f80a171ab91544f676d5de7aedd7e5ea","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.421.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0I2vCRA9TVsSAnZWagAAWVMP+wV3A70YD4mWQHjIsG+S\nRE6DAC6W212SwJQXqdAI2zfPmBa88lwDWVOPlym52s47lIodAfRcNqqTlAin\nkRLTeygqSFSmLvreh45S7cJk/eukYMbeQwzlA1a2SJYwhBtkW314jmPoPFVA\nRcL/ZzSFIugkbBwkRJp5kQdyiyZ8FfKRMaSCYLyED7deChvRcOteTZHCDq/m\nAvucjUSgwUtOrI8h4OQRqu/2dFBN6VJ5wVVskW/8sGZVi2XtLKFUaev1qkHU\nz4QUghLHycS4+qvuGtvfJOfebnistqaLwMbPKfS44YN9n8s7gCSQ7PJvjVD1\no6fDdFYRoqNmtTzOYbVd9jvbOp0hkxujnAZCqZgEMymA08q/LM+k6xbx0YH9\nJv4Sliwo+PxBKUQm9gOm2IzsDBhdMOALSIq0TZ25BkHbY4O8edhqPajJH/D/\nzMSi/r1Ku/F+6AakuHcXoi954cEDsnkYtTeDDrjXZeAmzQdFJFPJ5pCEkyec\nIGlPSKBRon7UnEuAPjxsDza6f7yiWO9eGc9DHHLFUBeNbID8/drlU9T/2g5b\n3T10mWxFG76lJMP8nXLavgSP5qGyldW3ihX/7j8Bz5AHGF8amdDVlQpJeVP9\n6XEfEmR7xCYvgEVXcDm2rYfd/CCiz+qBgMvjahV05M3lTUlLT9jFJT6sQLlk\n5ubk\r\n=FEEM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG7851eamxtAt7aHEhY8Dcn+X3QTVLjmMFce/sYwjMOPAiAKZM1Ywy4NvLqhWcjYWeifHecXXYtxFOfaWc+6h6xfFw=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.421_1641057711008_0.3383632446306355"},"_hasShrinkwrap":false},"0.0.1-nightly.422":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.422","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"5362be8fc8f14f3c8e7fa6ea3661169b6ed1e0fa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.422","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-f8GmQepRu51dFRZZ1/9y9rLkpwnbYXElw6LlGhJ9KRxDAZ8H30lzVij1O3MAFbbmbQhJeW/jz5fQomW8/VyLLQ==","shasum":"1ac97a68bd6094f3ac4ac3dcc369967a23123a9c","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.422.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0cZXCRA9TVsSAnZWagAAhokP/3QzSMH4b96c6kIzsZ5R\nqNevgSvyNyxdMK6gO4a8UIYSjoV0RdG3SBw5YErMVRTE3+g81KVuZzDclryr\n2qyZMZZLImIcTcgf2c3uydWSpWwjlc7XKpBOokQ5+QynZXWZeGKFplid57UC\nR0bowJhauivbGECsX44Rk53whjJH5GiMh3Qv9t3q7DdF5pYx3o52vxauBHeS\nBuok3xEMBwNp25rnrcquyFe8uBGgjCnWqbOTyPmI+tbOB93XtX73CGtQAPne\niuOr+y+4HOEyU3yPDAQaEN2E3YSgW+sOUQD5w2bPj1bljZwuAzGDdGkdJywi\njj4XdDPJDE1cJWVAju24GH0FSDWm+yfrsSA50T+Il+5IWjKrneqt1bo7bOSA\na4mT8OzOoJneg5+qJueUVdVmiGisyOBnC1aM/F0RbvsGzNDeCOPxTh+G4BGM\nM1YoZM5HkooLVn+eihBU/7pTqf6dhU/xt7feDOF/MAWibx9QjWUCZ0pf5QON\n9gWqrLkj47DZ4HTfsD7j4ev0LYNL9oIlKSAfQXMQEWlusFr6vFUDn0DzhwMP\nqu1uCKxrzsYVVWodFcc0FRI0UcTdx/A9RQSAWVy1W4SZ3Zgh09dIgu7798sH\nOUKTDbhvBdDtUBaIqo2DbnBPx0sCoIKmEhbiPKr+rsBCYmeusd8SxncH3kK7\n91bd\r\n=5Aiv\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHe+MYKc3x/9PdRKFmROQ7KrMezO7BHxdeXs0XYkjKyoAiAR0N8WbItI+18P4ec6drIWUjweLQ70UnR5oqz+b33+ww=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.422_1641137750911_0.5436024313283723"},"_hasShrinkwrap":false},"0.0.1-nightly.423":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.423","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"a9c40e0798ad8df79adc41f799b06cb59288a698","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.423","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Kh8SHseVnL435VZlHk8bHGvGCuBjxrmzSxdvIs1+fnrnG+GvMloVJ2tx/f6U2WytNkgc2/BZG3ISCk68oUL3LA==","shasum":"edb70c203918d7d9427b9408c5ff597c9a22398b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.423.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh0s9oCRA9TVsSAnZWagAA8DMP/A13REbqbFGWR4xdQf2H\niDVmV6gy+ag/GpGlmMQy83iqf8ro6W5HiaP+NObP2IiNH/c6Nj3yvYOZyLfC\nUTSiI5JGqOAXtb3Q4p3uMEyQxbrARDc8CuK2LVVRCtmGMSjjhmYasCXVPBQw\njFJMoOACjbDrhtDnqmNtM69Ph1OZ1VoYfeX3kFBPRuKzxqsMUXSK8P+yeGpI\ndXE2YNVATY1hM0i88/kM4aARfCCzl6tovGnx/N4Ppv5aobeevJISNJgDwmnv\nPqwFvKapCL9vNGo0FLCLNM8mjTQ3Ovx+6XWqQdKJQrhU1HWxiGQGHEWjBN4H\nwxd4biWJAVuI8RJhsA2vuHFM30Dk7yf/A/iJTn+GHbe6dWAl4EjAlPgUdmHO\nasXEoIsUVcRK7xxk9EGQ9BuLHYRsOzNlSpkMODP9ueyj2HxsaXC4ZtPathuU\neOLKzJQh/O3LIWhVs2GsyXmyT2z0nv0VDhBUirKmpbqpsrqSjMM1tIruOhjq\nPq6cjiOEymv4yqyKajbIOChFfG7qvfSoy9RZYNvQtkWV3N9MvRsIfHdv0rje\ntQHRkCCkmg6ZAGKr9Olk4PJrVWR0YsOQhn3vysRn8fhM7wnCIb+Kn0xsbdnP\n/F4sLCfxPYCt9UmGUhGo3z2KrCwjGZmLkiI0Z2ruU4gftVDXtHw6BC5pze3X\nP1E3\r\n=xsIx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDfOik7seY2sD8rBUPPmfTQyNIcDyGWVgOoS5C0Tu2h2gIgD/FdZJ5CJ0Ugm4pFG0gAD15Q9NzxLUY90LL5q5V21ek="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.423_1641205607935_0.10128344907461373"},"_hasShrinkwrap":false},"0.0.1-nightly.424":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.424","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b01fda17cd1a7a8c1e2e7bb19a5987089658f4f9","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.424","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-Cd3gV7RiGGeCrzaMtb/fWW7S9dg/WOMwnU8hFjO28KBrMeonHRjkyJeyAxttzN0ydUhga2zk6qG7fAvndNJTtg==","shasum":"620fa24b09cfa161a0c9688e84616214426faa87","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.424.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh027xCRA9TVsSAnZWagAATBIP/2n2CYZ3DjibMsTWn2Jq\n/NPkGllkXjZRRSoBy6gANO9xCGlEZZkmVm0LUqgO9UrdCGXXnaBEDwVKmjec\nNkdCXDN1UqcSouWd6hriYBsZbCdxEz47brp+GDvAKKUOuLdySn8By+mGhGQI\n0cOT07f3z8eFLFktdEuWpZ5AxVGwyQhMc45kiBg9oIl3qkfbvTlK4BNGf/8t\nDmHVF1w009evujzQWeINmgu9lHKw+TXGqysQkGK/kM/zjGrQav6tGGbiDQNc\nXWT984e0QeDwZO3CNYiiNOu3eCawxTe/33QVYJ20uS/6sfdnZ6TRz5HulXoy\ncRaCsmJuQhKSrRcdR71t3jb9BAtKJ0IuwBUMF8BGRYJBrEoygAwdT/jOBqSz\n1qOYimmQrmDXeJ6oWzq4tTBiG5GLjzQRzfPwf+3IHpjGHz9svAnro76O3EAX\nhMOFPCVTvQIcJ1fls2Co3mCAchiWlJCqaECNOsoXIsagWPUWuAYM09Rpxc/A\ncaBPpzIk/qQqVxLC3k13NYyvrOvYyiERKhCgDWAdWzUejm6xYvRR3824iTcc\nJuGr8I1XugbIPTgfRDxEDqATS3XW+Heb7tS1joB7nGB3DHPAoilugMeORg0H\nAf4/FGPFdFM/ju8KTHOO7JG1aF7AKQNMyWYMvPYEM5SzgjUggJijFSz3yqP3\nm+eH\r\n=fK8R\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFkV4SqQk7g9T1Q0IeN5fIwFHnm3BCgCa/LAZ5ojuIc+AiBuSfizYNazWTgjKWYnq2gTJdZNm2gRe+TY5NwNKw5vZg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.424_1641246448886_0.2816499075751542"},"_hasShrinkwrap":false},"0.0.1-nightly.425":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.425","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c98b4e347c0633a0b3f9b438e5af0ae04f1ec109","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.425","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-BRQVxCw62MNPWdaPocGqgRblYxJfRfTFo41S8wWNzNwfSCIVOly/xEc3jYkjytS3tGWd/PtdtN18pv7uXBl+Rw==","shasum":"69e162f14a722243fdd2aca97e790e646a9c24b0","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.425.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1SQgCRA9TVsSAnZWagAA5UoQAKRw4yLWElorrjVQCukL\nOXbxaWy37CusbAI7fgBq4jVezRn370GYD4iCXc/8rqRikx+PgDyggay+uGjy\nyll2CtOgIpw5LDlJwesmT33DVbWzs6Xg5yqLrpwOGhwUKRJMQlBsZNqwRtTT\n2X+u9z7ppZqVtNhDUx88MMG93pOEmgJTZfs81T3gppse3cugd3CHtHIq61cL\nzUNLhIaGfeu9swPxHwJwMaTg6cxGQIemDpwARpHpLSXGZPGzUNM/d3jLdkY2\najROkGsm0Tljbo2e/yVJ3jHwz2rxUXXvcDrhrf3XgZc/ISYBLk4vaxUBTFIK\nF7BQz6ghu/TuEQ8Cr/mjbwzjdp/hxY+IXp++1BWvCJS9WkSsGDGCYETHlbIL\nVEYHDqd9ehpBD/m//VF1tWjJKio4j7bNH6vUcv4AJbDrACnkHv0y9Xm4a1X+\nbIEC1ZXhaiz25IU0WrB5hlzX7rHKiegX+6QCFo8L3hFPrxQkN3EFb8XWg5w6\nD6YGLLQaQWmBoiHR84MNXyaSLQVzCuvyK70yYYyRngr1aHKmuWaDXj0JupM9\nJJx2ZFTSbEn7GS7y1+MBSdemrFmjLHaUrpr7T0pqTHDg1GldQ9gNOocYafm8\n+93jb5RkHO5NcQnvMPDUwZb7/uvkcQ/bSQVodsNg6Jz881TsnykQYblvvTn6\nGiuL\r\n=yAJR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAVK8E2l08m38vYXkbAkdGfjJ1g99+YbnMFHMLJ5GkWAIhAMj8/0QPQLcNQzsKfx0mCij87z2AXly2aomobW1DTeho"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.425_1641358368318_0.01746280794095112"},"_hasShrinkwrap":false},"0.0.1-nightly.426":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.426","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"046de6b2a4fc906f3a17c31e5a1f5ccad27d1186","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.426","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-HnhbI9aEdfRRIF7LWwXwKGkGAPlup9C8C3cUvfO4ilzo3f75Zg0l0JAG8IRfwR88Xf0FGojdHJoRu5E37WubfA==","shasum":"016b0abb3f3d3959c0d87e5c2d6cb3c710bbb4c6","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.426.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1ZFxCRA9TVsSAnZWagAA/FUQAJljPmuEHvu8vJAZeQBr\n0IUyqHNnvr2FPejXSssmS+T0a1oYImhgGxdS2LB8QTsN9hkg7EAjdy0SrOB3\ndUsRo2zUkpTGQIukzXfIpPZwZber5qEiPI/VMSTbsPjTHnstWbaw3wupgzwR\nR8FQ/53iUBgMkDYb7+ESEvTYcFs0QKBFrrhKmE9tcTtgpW6Vq9Xdc5FKAiD/\np8XLhN+BTToOf61iLa0NuA916dFll2E7kJh3lcp83bZEvhj8kMrQ1bjxiwoQ\nHNQG3MMlgjYn613op9UwM3k7jZLdPOsRV5nbxzSbE8Vns8ZGhLh/LvC7V/RK\nMJ4trnrimciOYC64bRyaPEk4fLCW8Vedss9ZB+4fDWEOSTfG4naFTjPBNPzM\nO9u3UWuOwhgXjhjfGr2nS2RbgCx8umZAU77QfL680PBcZH6SRrDZwYWK7t1p\nnptvLTaqCas2k7C8WGLPK/vcQgX2OrO/J0RA/rlVdPaJGF0b02B2q6j3LF4K\nYAjlX6Akm3z5xb5jz9rubQbitvKMKp5xwy6L7ExiuDVv1tQ5fDxkkagz4JfS\nOhKoiEYsBUbEZadAhJYcISGNfcokixHAVjBtLRM12IfunDhuv/cZx7W3GLrq\nIZVPscAFTkywN+Uybt6ThO7JL27xqmiNHtv2pEZu1PTTAIJ1gMUQfXI0UKr1\n6jBA\r\n=AQ9V\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHuMef4827MdbjtBieCRsyzj2trqWzU4LHJm7UgsmreWAiEAnellFK3uza8Zmh4YB0FHS0wbPv5P3y1Exn7gUu+ziqs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.426_1641386353361_0.9485276296814449"},"_hasShrinkwrap":false},"0.0.1-nightly.427":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.427","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e50942e752e10412f6092ba07af1e739dd54c8d3","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.427","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-/lOX4C1adChMjBCNOCtuXknfGNwMJNMaOS8LLjPSWTRBfFoW+J9FTb43f2/V2YhSv5cQZU3qyulnRRU/3GOulA==","shasum":"94145afd4cd60f3749322f81b087f6046d1bbb8f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.427.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh1h5oCRA9TVsSAnZWagAAcecP/iNGlzMKHfk8PCqiNlSc\ntMfMSkTf+TeLe4zKKW8GUTi8dqFwop910yDY50FvGjfYWwAb7sR3GkqEVS5j\ne43BAV38tQbwO+HcmtlIpa3keo9NFdhbWTMi62pJpkHa0MX5K8NX9I4vp7k6\n6C9AjnkzFxQD1ntwpK84aGi52KreHvwuRHcpoqLKvbvp1uZcmG4sSyb5MGPH\nIo6OUGnNHNlXsLyzmIBqRLU3lQ2hLU7U2Qv9fzYb+KERE83JuK+i/7VBdqlu\nK8p0Ulp+BEW4tORnuA216Tr9vf0/mrObemwxu+rUKF+GF5ENe/ck4TQnCPal\nxxY10Si3tSILFQ56HiaGLjahNVs5TjkyuJVHcQSd4D9F9M5wup87DcxxUVPM\n7nESKor75pwXY6PiT3SbSLS9ptMDuGSzYm2UVaCrkWc/VtwZ2SXz0MMKZ1lb\ntp7Tb8dBuv276qG9CvPTJfxQVGspdmsTcRuvcfoOn3f1bsImA7IvGKp7VePS\nLa+nez4QEB0angn15tVvgOqq6hkGCXY1dU6JJo96X243M3/wFu6mSfgqWhkO\ni7rinaP3kA6jF5dzVJ++f4xLLlK1Y0B9DzdFXzyw/F+dttk50MtefO4Rk75J\nihImnd++pfqjiCvpzFJV1tN0mi9ejn+EHxPCEViEWJdtB8Az5vjf+0hueqm3\nWY1V\r\n=6xM5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHrsuewNoT4f7j8xcMndkutVjZuoaHBlIGxi1Pitpj52AiBF5xL+mnptahVM9fArscloYrW8DFDX9ypIRQ7aMjZhwQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.427_1641422440524_0.4034740018023515"},"_hasShrinkwrap":false},"0.0.1-nightly.428":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.428","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2bc8fc30c82d78096b3604e9759428bba9d73479","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.428","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-aZM4V9EAjSCZECU3uFQk9BLYh0xPlps/ip7bTP32eMBtwayNJv3iKqfGYJ2OQcjvPMVmaYavN9Gx/UpkM04gsQ==","shasum":"8afc5e40045a79200bd79319977b4dd8572ae386","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.428.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh2bfrCRA9TVsSAnZWagAAZCwQAJqJVEZLvJ2m318HnZIi\nyOE7rdIxr+401d/HM5WsuT401bIMdELMkgL4xXw0c9ZPoJyjbjgqB+k3qF+b\n0thV89KsTzTc76N5QSlWMZiQyLykwtfcjX0whMVeIvATSftQPchGAItwSkrF\niOKab23nj4IbGPzdKmbsoZ8sAB0KdIYC6HV6/g4Ui2MaRtW3K+oMf9hsrFDA\nwtqPJ3MMhgodfTTcBEwXU7sr7iO4FngJA5y6LvcUTmHx99qxs0nUtTrH0r/w\njFNIJTEtINs3aZj+1OpBQnp09mZtsUbizATth7FLR3uBp4HlYowQIdmcjVWf\nqh0PEDsVjOksCoC4afElpnue09TB/kkBoygqwbHSGI1+XfsYkrLa543ZqSNs\npvrFXFDS0CDeG79m7i/7jXPGHBaVBA6zVcO95HxgG4LpYs+DINpqOgCOLujX\nLpuzylOxXprY++jkyx6/jRP/GGrCblvpm7nLP3Cd0P4XSfV/WCJvxPhMFABu\nHq34DnCgXYrEwFb+NssGZoDAe5nXQxAbNlTfREylIWGcoamycLRHnIlMLAzq\nEXfLAlLJPFMlTYP+I+Jy33ObaUQXfv6liSqzokeT8VgODBfJT+8iEd6Fy00Z\n+AF8nAgWiyITomAqn1xz4pGKdHnLWfAxzO1dCYDfnh5DiIkXM978KWUMGlG+\nqAVS\r\n=FLPW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFX6Xf9gm9n1F5PP/EVccm66ZhOpxKkw+RMZgDloPFTUAiEAhQr57U2Zju4uJSp6YS9jKWczGFE8qTlWrfAj1iDSPbs="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.428_1641658346851_0.638890563317905"},"_hasShrinkwrap":false},"0.0.1-nightly.429":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.429","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2d08805bf441b2b7fc7d1baa4184e1e88e21aaf7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.429","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-yBNmgNM5HJKMDw1ThEcTZGReryhJbkav//gPzPrJj3cog2nImFuu8wNzESUfQnFh2Z70wSYGhm4IinE0JI/dtw==","shasum":"80172d9d655b0f834777577143b82accd6eea663","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.429.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3LadCRA9TVsSAnZWagAAKcgP/2RcdV/GuJ7HN4IO9Znn\nlFh2GZEhF4RePX3siYRnIjz++Fyy1dGr/FCY1qUnOEYVqMsVHm3cySNGnuQe\nGH8jqWd0yRq4tCoBIxcR4HwdhYqeoe49PjffkhMHfmNIIEYKY3lGeL6Eoz1K\ncF5XXJTvIe44JRiWNqZof4nEdtcaYZ7sdNaMpJwX37dTlSg//4rjqCWvJDFt\nlfvfVKfU6a2yjKluZEpQx3KNAT3GyapMmpIaGpGRwAF0cnr1NFIVigmsWpq3\nJQRvjQjec+F21KhgqadyD6Nu8ho3Z7vOftIbUX7fBgVwL1Qp6kpXMab8toTs\nWDMLiN6fcvc7+Act95K8kSIlZ5CdXVFu4+NhDNHkQT0axY2SoXcXVin7t5Y9\neitDKjwuiKPsCYWCFUujHmv33+Cp/EYqmHR6eKGqapC3cy+wJ+dJlGVX+5iB\nVyidyGfmKW6WACWTNZ0iQzQeteara8b9UvFwvrQmKAvPU6Nyy955yA4eP/2b\npdVBTw1PdTyk31dpXG8pA7M1DI+xQqxjkDLJkGXFnUVX0ckbbu0JtTjabGk2\nvAzdmGHSPOIUzFgKaw1D9NdkXgHzXWBCKPKA0zcOgkauYplWabKNeq66ywnr\nIZHbYN538etk+3qJ1vpEW12Rx9Uk3o9eTwQdGvYeFpyN/eouFHRLuYX1amES\nEF20\r\n=emHb\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBGFZdx27alyaAsdn+JcBC4T9V7oNpDa2RXhOpLecQgdAiEAz6eJbL7gJs7jgivEm1VVl5elF+xerJ3YEMLcpWztbRg="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.429_1641854621032_0.4800142590563372"},"_hasShrinkwrap":false},"0.0.1-nightly.430":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.430","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8a2283b1bc21279c8d4d0c5b5d656e335aa5a5e6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.430","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-gNsEYPswgIef7bDrm0eA20Un+VosO+v37ss/qJGLpi3QcmdxOMjNMa9dX1ZbuApKQ6LoIT6YaRUbZK3+y+I9nw==","shasum":"25eeb6c566ceff75c53d7237756d42b64a83abcc","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.430.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3YL2CRA9TVsSAnZWagAAC2cQAJSp10JBcMzlLqntreYe\nR1mcQcQacL5+fJmgx931UAOKWd5cdOsMiYzpQ0qRNXrBsP5js+pGYpeokQen\nvXQdeyD6YubXYM7KV7HdcVejbop4Sr7lwzb+EvboIA7mAhKi2JxJMXTdTDAo\nrfxuq7rZbo6TINOVOTgLG3HzYgZ2brUM3F3QTd6x4T2gVBSzeqBZW/07hdD6\nVdlR6c2wgh6jgrVD4H1e4wN2y9XNeIuB9O0j/OUZ6U9dZi+u8TQZrjnPFxi2\njQQ+bqMEhrSrtB0YBuw34CVEUG1qEjShOxNWqfyw76nyJU2tlcpLToJRTGZV\nGCx2D26bRx98hzh9jMeEw1nVaRJ42XTCDGAwZQ0AitrcT7nXUFWKQ8IHHSfe\nkjMM36+kZ+CgA8JNz1csnr/1kk+tLomcnT9OBxErDEkc6ix6gCWuOfbevQ64\nOLm/XLeA4h3uVaaKJ6Q6DU5Ia94KqwiEE4xe2p6mBPKukB6ayuwxVCvxEG74\nUh80AbKtbFWJRX+jMfQ3UXQ4z8yCpDrf9Q2qrsQQI0xHqAz7HA2rEIZPivv1\nU7sq0usjGOTF8boZxJ/y0Zcd+9OzMxIvF11x33mntRySdazcY7iV9cHSNo4F\nFPpkIvKL0pwQ/a+yoCUCm51u8KUfMMwb4cAy0ESUTcxv9R4R3nN9ZUEru/vN\nq+mm\r\n=TMtu\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCBWxyWpnzlqQmqufnKBYI2SWq/gbU0l6DmtmwEVagWPgIgayRWivrdQXIh2GeBFlOQSj2ytb42HeRf2R9B73P2sFA="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.430_1641906933815_0.89447239973015"},"_hasShrinkwrap":false},"0.0.1-nightly.431":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.431","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"8fc7abbe7ea5656089b95e8696dcbf242cc0886e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.431","_nodeVersion":"16.13.1","_npmVersion":"8.1.2","dist":{"integrity":"sha512-llm2qKRIu/KqXV5IVY1/v9JppG5c4oBAnjbbXRgTFNKAgS/Et2t8Hw9QZq9BkW7aC0Lr9w2Bj7XG693VVJc2HA==","shasum":"35ebde480d27e9f7357d081faccc067a92fc87c3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.431.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh3sAoCRA9TVsSAnZWagAAEjoP+gPF+jpEoA5GWuc/SH/h\n71ioXEoUoEMMt67dk7jjbV3a3PTjbns7PGFYSSKF/Hf7xAczdQSrR7lvfudL\nOC0vEMdL0mTT1Sk2+/5rfbcEfOJd0p6a5ycESH4pwMtFpTMGh+UoB1XnO3Hb\nill34gOVtxokdtWpj0opgWbjwV2VBQB+iax9Yf9NXy4lCc+PZT07z1T6pX5o\n1WjXmdHLk2Igim5nEcOTD18xGrlsGKtN6L+GkeYM9ieZ/8JZlmIDllCK5h2Y\nSAxqs1/8Hs3DffvGMaWWFX+MyrN2PIIiJEKC0e37OmH6nisdduqf8YAMybDb\nVJGUzWnc+CPpw6Gy2Y7wRSIDKmQOEqpCNLJ2btTlJ2utf/gyP90RmLskREsR\n/l9bchpbi1YB/A0w4vZmKMGl0eKwHlVqOhVHrqqIfQ7fG3s3RW0AcWap2VUh\nheLdxDgNTiZZEOevGkKpxobIzY9gkExVHx+y5PcrPSJLkQNNSq+eqyt1BYxo\nmCURYer1iWZIrn8wgNgl9jLGIW+GDjUtJNYM2DoQCSNlXyvEZCXNUgNKAjEf\nc0aWvmtgVtwM3oFN848NToi5KiIJX8bPieDKRtMktM/0IXLXCvo8fycCTXjA\nAL4OWTQYnMuY70bcC/mcUxqTSHguxshi9UK4NLycfM9Cz2rUxQn45t6GVBvO\njVGT\r\n=86rs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDdY2ybkmQ+ZLBA+G9spG68ZBATwilDOt8/o64kBzYa+QIgfZzsueTmhv7+AsKOxUFVOi8RMlqlu5jMq8jBo5Kp0gY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.431_1641988136298_0.09012140293854998"},"_hasShrinkwrap":false},"0.0.1-nightly.432":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.432","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"dbcb0c0ba2cd41a2240ee012daa18d2f296f10b2","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.432","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-SvAjfevKQ9scaJtX8GSGAwtnVU9bv2lOeDurLRc94AZkD63ODkBF1S9xHX49ucJmGAxOL6RbXL4XGwK0ss2rfA==","shasum":"630f2b3edd44b6233c767f407dbf308516d7a327","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.432.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4WTSCRA9TVsSAnZWagAAtCsQAJikcQ0lUwW05zkQA1SZ\nOv1XViOBIMw06QBn0Hrjdu4gJv1ia5hm44ktuRRxzoZJlkWXHqTmKCTc8EOn\nWhSV56l07YbiIY4H/hqlJOBYeFp/IGokCAANWv+6t7AQQDjOzcTtwCAcQvH5\nJTjOdiPwkytG/coyTRgped1ptfX9O9VdI4J1u/JKZzfoKrpDhp04gac7j3tj\nhNCq9bMgSR3zcPlvUyfm3wLuFjly3RIrTbEaVx+PjWJOwgOrjeNqywcnX+0a\nZ9mm9U6iP/1rkGOtgT91OginiABRwki5UeUJ8h0PIPmVifpSr+UroAPLEKVE\nu2mFDDRt0VtdZMblyOzr24/hkjCvyRIgwYIPSMyoYnzzRWEwnTKt3Nk9DuXT\nRhOwk5327WMgiwvToJ7jMm4y+q+dj9CjR23eZi32G+W8UDVOl70j3TD+oX8n\nhDNY9I5LMQfJ0gj+quIBNxVawJOXOlH4RhO8ACinrIQZHbHlUYMmVAgdRSRF\nQHnl4iCDz+P8GZ87zb2yTFem/VwBg9KA/RCxonSpKtPbPiYpTxdA9lg23CRJ\nHEYvs/pOBFlg1ZjSp9g9+rnlZq19qTtcZ6AcL7L92O4VyCVKuFL51xVYhqdm\nAv/wpEXJQsRevfG9vBOG2ZELW8y9+Z06hPkzyOLradqjyKPTxleQPYsOJDDi\ngR8X\r\n=55F7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCCMi6ISp+DFe1qPC1GlLzE2cOkLrtJuCtWY7tzgXDUjgIgd0rexeFpt5grdx1POQTAHH+ztohJONX1dT2OSW7MiGw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.432_1642161361991_0.41219748485204666"},"_hasShrinkwrap":false},"0.0.1-nightly.433":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.433","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1b313655b76f871373713c830dcce303c4074c16","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.433","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-RVmxbQRoGd5mx0B51G3aIazIYCPyqx32ekXQxk9wroULO2KLyOEsk9pSp/3SCGPIWjDcgfl0QvS7NK8+FTLXNg==","shasum":"1b3a752c3407668cd6975379d3952cceda45783e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.433.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4gN/CRA9TVsSAnZWagAAVzEQAIj6oU+bfIVz5bnMDXlA\nnqt8Xcrn6QyCT9h2IiQTK2U/p0x807EMKcCDRBcHhRDtgdXYtN3RpkZxfIjN\nf91et1cQSf1tC+su/aVTX+MNRH34bG82RByNjQpd6GKutx5SsSTj1M05mcp/\nyP2r9HrI7of9xppfE4JG8XzZpnrYHDhFiwBao1ErRS1u0VOfpuWSlXrhehbG\nAi4TmuJflO72xDRXg8v3hsEpLyBhQKW3gM1No7W1SUQ7bZeL/wb5feD39ETZ\nAuGpgt4DZQwdXOAxPWG7pZPcmS9/2ZBH6wscAQRFvdhRHFFc2WaJa8ScnsxP\nVMtvn+Dy3uVYgLBo/Lpo9wYJugsUbcH3/qcMxCNExl+Bbu3TsoDq1Q+MhG2m\nq+IP4ymE/4qaxjkUzdvV1M56BXFHfTVeFy5jhTROnR35igKoEEj0Vms+8w+X\nAiZYwpIicqjOoWAZllxwt9ovpBRpoN1iwLtqrQY/aXoZHAZ6ZmUpulte9/GW\nyzsdIaleo7xWPpSgGSnL1Fswurg7qrgazaf+Q1nrVztudMWJBVW3gwefIhDE\nE0b0O8IQO8d7OV0IfPN4c74eFXYG5eZNDp1goZSSrkgGzjc2+dAeG9qABt2Q\n3b8gP+ppjw5zefQTEsVJ716S5qP8BRogNDLk1hR6KT1df+NinH3wceL+8Oo9\nBbyt\r\n=h5L5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDndPJ24XaYEWIJQUUaF1oVfnQc/WsFsK/uY/yD2LYMUQIgPEnzMGXtzl7gAK0BApFZWbCHDCz5mYv5+XhfH1vau1Q="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.433_1642201983156_0.9940280599190361"},"_hasShrinkwrap":false},"0.0.1-nightly.434":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.434","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"58aaa77872d03a05f77c0093f766e81a6050dfd7","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.434","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-7KM5a61A938Yv7eOhouNv8Y8QmPdwP+NgyCus6uztb6lmrkdxd0O5LUWc5kOlcBIu7b5u21lw1n7w8TCVsz3lA==","shasum":"10ea446fcf402124fcc220de664aeb7395b74d1b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.434.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh4r49CRA9TVsSAnZWagAAWzEP/itS3QjUaJIMbXMvlna2\nBSEj8zEeOhdcUN91x9XhgO0Fn/RfWK7xRxINRnfrzYk2/ejDJUSIFxQsD2Lq\nU5OBnRDNtv0lB4EYI68EhdJHqckMmNW6D11Tm3CjrsH/nYZURFAenvFcN72w\n8i/qrL4A+Xi/hynVdaWUcdTtxpLybNzXBt5B/y8lQmZbwcsaMS7LLGLmLmDO\nRs/4jGI9LWGh7Ix/XTwGHzq5SHg+V7YbNwqwougCEGX60U0Jg5BPRDrBTA0X\n5/+ynvSIP/NrkW4mT34MUzuFL2a15TMkMivYj6O15rNkCNDcSkYg9e02bKaw\ntosCIQroOIQB+nVnadP3HPIdYdof95Da3hd+rc5VxHrcRrnypi2wVAgczdjl\n2ZDNJi9gA90z0zurqZoNtTlO5+X5mypkVLAvGpThu+npBalz2zsBASGArxm0\n1jMqoyknBAJYG01AOQfWrK+WELFH5zvRMqT7Re9xvhOzbQi2+q7RmZsLaAs0\naLuJvF7CQkLIxhvvw8b5BYGj11RaDq1yVkeg0t4EPDSYNG9jCFKDmUl9TugI\nVsVZKXQEZ9dhGQ3G/kwJda+2d/7PgXwZxy8crTp8auSr/I4WCI7ODm27+yJA\nc5CZ8sWrBYXHj0tqYL6Musdfr5w9SKWU7r0ev8+J4u/tj4cX84Mfos3pa4Lw\nKNJ/\r\n=LuGw\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDolMFR82FqPgd5KzdYJA/LWH/r0pNn54N1HR8Lxa423wIgaJPPmqwY7/VlctFzfNqELCIZx+8lxOdbjsZZMT4z6vY="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.434_1642249789292_0.10092444169994397"},"_hasShrinkwrap":false},"0.0.1-nightly.435":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.435","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"9480f6a9739426290985d05c01f5d232f1216e56","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.435","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-nPKz2VTqUUCo+kDSJEGbBD3U7fA6Z6eiCsJCGaVpxXxrIozyv9olQ3R7tMU2J5hlzMOALOxVVb45HcrFXLaC/A==","shasum":"2cbb3671d43f78c83b3b3587b46cf1dd6b7dce44","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.435.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5DNgCRA9TVsSAnZWagAAnhcP/j5ch46oeFediaQvX04g\ncyWzPzidaZf10+ZSBppX62vhNBtrxYSclF3dfmBKbjl8N7sWI18DRY7oTaxn\nRfF/RypGHVDwRbOw/cB0z77jBQ85fuVsboPTEHLItcBcp1SN1oPtolz0ltSf\nRhE5Qy3jap6pOjA2AS8knlW8PpynrbEZMhKMSGSZmvFIeSG1/lccS9FSzRCX\n+Ho7Br+mFyS7EABbumTEM1lh0mb7A4m7k+tfka48kW8qbGHcjRCEUALCZjLA\nhf0+BiJTGCPOxukK9+/1wZN41mjAuPZeBB/W1gNU++RWJhk82btS7j0dJTEZ\nTjPqzoyalXTNzyxKEAp2IoJrzQPGV+uvTTIxwup4/c44V/aaRsYpfCPPDITp\nMrgBm664xiQvY8yjlcS8815dO+dy91bPds9BYKhDFp8w0fxQ/FMbF79KwNkQ\n8pgUn6fqwXBB3XozfSI+G72t3YMKPuxTo98MCo/rUCc3HnoFB0fZ8A4eYCBn\nXjWX9XbRzy/uhXc0oO/2+Z6UdYVafxCPlSM5BkZWGAcwm+4yGiDDbaLlY2xJ\n2aLWAJfEspDV0NpHVBVhapcWHKo4eIewTzAz2WCcN0PtIayUHe33hkEgqkYw\nZizBOlDP/xXhVnn2bW0iuPXmnMZnFfJkCXlfMWS6nRYwo9KYSzDaq6uW48uK\neoG9\r\n=95zZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBkERpOylh4DrAs5cIHR3HSlHtNmfIkU6OaRIt2/zW9PAiA7B5pX0fbp6Jp9dgZWmMMy0Cyw52jW8xlLerxGDpZGYA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.435_1642345312733_0.5621685599267285"},"_hasShrinkwrap":false},"0.0.1-nightly.436":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.436","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2439b5085722acd503bd587fb23cf1c7d89e2c0e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.436","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-7jsWsZeZnmpkEzgWlRbjo1eq18rwhag3M60JAe1w/s8MIrRs9MwzV/6f6XqbyKrkgoUyTbRHR/GJ8weDL44Zbg==","shasum":"4a8ede012db65c2dbc7cf2ef60d05222ecb93130","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.436.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh5qsdCRA9TVsSAnZWagAANB0QAI6ALqTrGPpVfVSYXM++\n4icLt/fgSrZPXhqiugWoLE7uveRiCCLtxf5I5JgVGaS8YT5W8hxri0x7qqiR\nQjfFJPESTJClKUV+sK7fiTXSD83uzSOxhGnADRObw6RbnLkKIrRH4cLYtM2E\n/sm750QMa9omWecQvVij1811ZqiWH9zWr7u/jbdf5fnVk2VRkqU9kqQXTFQ7\ns/kvU8WBVY8Q/RBa4l+0th55WtaGLuneVwa/oB/fbBxP5B9lK2WQIvzjhDRd\n31bUDK2kD/P0mfLd1tlAzIlKPtrgyX2PGp3CPUfDAUvIkbOkDGL3rVj0hcQK\nwaRiYUJpOBTgDJV4cL+CpIkvpcPkzdgeOYUNNw/RIZf56nyRAHxD9Kc1bKoh\nX9RCEeQD6BQJebUo2RvWVAL5813tnPiKjYar5S69t6wmyBwNM/gF5/F6Po7+\noU2QGkYmFPx/IvIk7fGpYwv4a1VVlAE/lZYWsGa9SPGivsH1EJTyt7tmagnt\nP6UE0L1vizUWTwmkNJiMfmyKawo6va0wNKUY0DudeHGqCVbYvxKOURPQv56G\nyu8Wa+Ckk8FFzLhN8AePlvLfe3EV+ar7d858aYfdGZKz9hZZTgm7OwmJr8aT\n35lRKwMKWoezF51oXvSG9dDu2AsAtYmu68I0y+xWPv7bIeTGqrlkl6fRcbxo\nRW/l\r\n=p9Wl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCpS86471oMPwAqbllKzmx6xTmDEG8ca1SE2nKS6z7edAIgXThoJR/M0D1E1BV6VR3hr5JTd2RJhqSAbU9qIUIjGR0="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.436_1642507037743_0.5556996513173922"},"_hasShrinkwrap":false},"0.0.1-nightly.437":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.437","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.10","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f50c5189ec21298f0ceb61df2180db0f02d13a51","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.437","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-5q/knqkm7CR1BJnVCntwNWAhvfb0uHVRaVTF9D0EFeRw6g0EuBdDom/5xf7W/5lyDKz7IFGJg2SK6hpwhGRCJg==","shasum":"806cc100db591068211b06af6c535e40a212d5e7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.437.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6Ar+CRA9TVsSAnZWagAAPBIQAJ238e7xhDIj9I1dDMTv\nP72vD/S11RVXuX4ooceplVTzf4lhhew+8Bp8DWstB16/I+Ufk07M8a6RKnAc\nrAXvucML3JmoTeRX5bsPWtVji4YsTIovDfvx18XwMi6s6YO0z1D65atobhxH\naxlal4PR99X29sB4BFZuZkqOU08ug7CaNBhuXg6L6GH1ZTn7ITQsvRtVppVB\nsyAzR6VTdVZHzUQGm3zxfN2XBoqkkTN7Dnn2EnssjblQseEVzUjmvbbmEaZA\nBKAZcpv8FGVGBpahpa+HhlhYodA2JdUj6jbocX5r76fK8Ztu4HLrXCXXuihT\n4geFz3ooPuApyXDH2ikTpAvzOTGZKIM8EzyxnVZEX9qutAZPMcTS/kKNIA4n\nuHKEoycmt62uVFURE0pmbLIQ4lWWvrAL+LREEIQ6YgY3KkfGzAB/VKQtgfz8\n4qOQ2VReI8rWN5prUoJmOTMPmnMpl9CUvwG3662tmSjNW8Oh0jQUsw6hhhFr\nxQMXulqIM7y3QAz2tT5WtckNHoBZWDx0/54Fl7wLqt8y2M+rWxwhpcbSnAYl\n5M2wagGCq2R5/74hZAW+4RM3tn4pLeeMTkm6nUyZl+FgYIYtNEapl6bCf+VG\nPy80i8c/qNQMxROI3+mnuglVKVv2WyPmRib6Nk+N6am2KVhhzyxd3o1i7mj3\neeJb\r\n=tsjX\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBD5CeS8JxmzjQnU8R31uujxuJKSDbF2Ic3HuxHpsNRiAiAg6hDtAKwt0kLrb/3HPY6QwG9SnCHO48RL+EXDkRYZwQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.437_1642597118137_0.6509725755034816"},"_hasShrinkwrap":false},"0.0.1-nightly.438":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.438","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e7e9e61d24df3ff54798c0c8185672fe7008d44d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.438","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-1oAQu+Wp38L4uZltMtS+whGBJrIVCTuLhBds3oMsjpc6cBei30QC98hIx+hWb2qSiuFZeZAvN5v4PpGjEEXllw==","shasum":"4c5fb21bfdb0ef6f9fdd325f31678867b445d662","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.438.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6JtVCRA9TVsSAnZWagAALs0P/3TIT6fumAer9dIHg25c\n38/cVNTGKZGbRF+2kLWy5cJaq3sYD/tZvXPZ1Cm8YfO1hgabjvpsFBzCMinH\nAgjwPuYfhH7jQHtmJHAafchmRupRno6AVHBAzqdIx5DHxumHAfBHR9WqwgWj\nwQ3m2OdhuLQfYT676QjoyvRrBTeysO3QT1qINjbmL+xAJcagpHo39lcyTA9s\nunSJcuQsulr9rPatRxplB0P6++fGUBVQ1YkICITmXuRrCr0v4q3dkUdqO8mL\nRxXwS5OQbkn3nxuWApN4JRfA7pDaboC1zgAcdbRbtfqKJ8WDPAfbu8s7uTwG\nNfCSPrspBq2BxyIhRJrbEeeV7pNRss8taT6yYesbvEY6FdgKrT/FsM8r+TqE\nl+5xfNO740eT954Y4I7d3mNtPG5EVmNjjlcVp+q6qS3DIdnQ+xib6IvkYjh6\nfcb+SwgGRJ0bcPDUwfIaCjbQrM5OGQeDgOSMQeG0rpvrhTXJZ1NyoUZhkVZ8\nK39mjMHGOxhUYJZwbADkZZbC2O9PvYOYphWz/I2k9ALnyGMY3o1R3wlfrKXw\nkAQINuQPElCHwS3vKDveQZ+WwCbOuPXaFkMKBOncflQvTm3UxL/2DAasvNDE\nwYoKIQv5E4hnKXlvuldjMDkpp42YHOKHFge0vG/U07Ho2YIyxaj3wVGM0oXa\nCrTG\r\n=y44c\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCNyBh8wLSBnY8M3EH9RaGRHu2P1u3ivzPqXF3T3ERxTQIgAO26DX/9Yn9VACW99sFg9a4oMegrEZLAPAgEeNqVJPc="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.438_1642634069486_0.300774797799531"},"_hasShrinkwrap":false},"0.0.1-nightly.439":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.439","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"f69678be5cfb6eec83761bd56ea1242d58289a5e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.439","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-C/fdyJCbo8d+z93glaOYvL7Z9pC9A4mw6OiTqYm25jLNEFKzz/DjMPny9XcQh696kXNPE4Q3Ls8hyKY6KAH7wA==","shasum":"2a2a6017c6cb7ffce702b1ceb81107db4f5259b1","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.439.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6VSLCRA9TVsSAnZWagAAXcQP/0a2o88PGBXt0t0IBWgK\ni+80yoeAf18q1mUjrUfXcX+Ch4Y4wbnOnZUo3JTi6yOxxBSN+gnbDetuo5i4\nILp9/iJDHx3hKTctac7VhjapORQdWOPo1nVCLUsb+zsIH/9uGxuKaHItZliw\njLMLjslEvKakMBmwMrOuYtF2fztYTUuq8lFr7M1Hv/8mju0mdUk8w8MDV1gt\nxWl7mMs4p4fz57vIhjPAS19pJ9Wj2BbxUTF1HMbXkiBRKZ06juvwOocyqm9V\nFyNtQcn4JKeopSccywTfLRSxDOFDnOSDIAkDo+bNttUuRS3knEsRzBEMpgDp\no12otIIwWmS5TLrQbds7vD2ADoIzryiHILNUvVWa+ZhcvAjGI9YeBNlH2HLV\nbSENV2tz0cGVMZBdtiy98I3D+m0KzsC7qUtHRHKqcjomTRu3AtVunDn9Gofe\notRNeU/U8IjlCnTWNa55WQOBKj/E9hqAugr0kUTa7NEv9Cxkq9wY7ziFK67i\njMuUZSqq1dv0JzuttoXZhRiY6/jF06pLKs/qstmNN3oeD35ML3IiVbAaxUBj\nqPqhzevIbsJb6ssAPQ3YB3b2eBRFagayEAb1gFF7JgxV/NADT+6qWu9CMqHY\nvKj/DzlcqBjQL89Iqf4UKuTNohqHeNGXh/zEmhOthAdDOt1qAeEGUjqazHaY\nFqul\r\n=dCiZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBBwP6EbYdlg3ov3NYYLlrk8h3CzolglpuUEVowEvxXyAiEA1nTjx5eHS/S0NnANnc/wSFMiwgTxkFhPnCrOeh7zQtM="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.439_1642681483073_0.37253292192754994"},"_hasShrinkwrap":false},"0.0.1-nightly.440":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.440","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"072f2284589be81928bbbb50096ce5e3a870a838","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.440","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-FrErydNVgK+M+PmXpu6fRZqjklZLiYd3ct9qUSUTzJ3ZOXX2CFWmnspD12NRs/jzpvVDi8UdXtWIsj6DJYvW3w==","shasum":"18abd1bb4cbc71b8cbebb0ec527f08e3a355b3a7","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.440.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh6scnCRA9TVsSAnZWagAAN1oP/j88HCDuKqHoKaFrPv6V\n6jGRl3aEQdEvnJMGN4qUyiWFBF3R8JyNZBiz4gSi9ANQhARw7/D9X+HRWitC\nPV6jNZvl0g7WrKYn+lsuYl4Ows/Nma01jc8KlQCJSWZDIwsuD1ku6GgRJkNX\n/vuIESPYYYELcWIr9v8ekUEmY3mVbf6IsSa0TIvXjaTZrNfUfMuGDL6e7CF3\nuNhWhrJBXG4yNvG6nuv4T3PaZy704JKeXoB+bYLQPYIZB4EfwNILvP2WmmvR\nHGeNP+kBd3Thxwtkn10YMp26XoOXyT0xY3AU4jg9Zzoo+huP8dSewnV4fgIy\nWVfczvmWRzzhCxiPIvtc9QLfAWXmtmTRSFHwZxC7fZz/AiYDIBi/rkE18Zlq\nUnPxuoCGFAuvstQabgEi2adfCP0k1g10xbs/7BrYaRguCfQ6kNycPlDRzazx\n579ZKBuYgE27nGB6wVWAlVw9J7167fkjjjeBJgdTY1RF0cJluCG9DTZrfWqe\nTiu2iGQU/5emH10X8jJrVyJpbVwC8Ln6pbtw3qwl8lxZnVQI2xsmoyvgEbkl\niX5/UUqgR26qi883mfv83ffD10DtNvaqh0vgAfao/x8REzBWB3iy3aY9q7E8\nP36hlHv3hLWewWec58b5j1u5q1Y10wuXbtGuFI/6XpJcPrOeZgw9c4s4wN/4\nkvui\r\n=BY69\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHTqULJ9I8q4+tOHQUOSC9jl16Ojsi+2XDcI4KjNYecwAiA8rQwWBHixo2elobTCm9cFlL6EShRDjy9OO1c04ht+OQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.440_1642776359123_0.3531497857274992"},"_hasShrinkwrap":false},"0.0.1-nightly.441":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.441","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"55278c18a0dee1fac894b840aaeca8e8653cfb63","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.441","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-77rCYvRgCOV9JIq8yLq8MfKxvFzasFBQThAjp9cP+qk/5BeBDtDjjkhOcBNkypF3nbumqL2eCbvgItA1pKJ7IA==","shasum":"9403c6c9d21df6de72b25580f428f4a6a4533985","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.441.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh7Z1oCRA9TVsSAnZWagAA1l0P/1SQuUu37BitgAjLF1ku\nIQV1DIZlNNVSb0AdGfOtXCqOwU8FIXYmdi44xE2lTA/ITxE6Jat4SqIYdhAf\nltoDt3N4V/wk/wnGo99uKrOhvuIyzVKPinG6WpiGj6k0EnVRpn4VgjMOuCCh\n67cJMCGn8OaXD+T7ZchNIwwt+QFG1NQal1K77J5KwZ3PGX14BsiUJjF4rMu0\nOFRvHYmblictImwdBNIj9wnvye4++Iqvn6N6Rj+L54iDGkcNX7QA7i43x6T6\nuhnxF19Mjrq1AzqA3X5vpcf4NXUCtjKbtRPiGAKbGdt39IyiIpJgnbwMcYFA\nNf2DM3fpIV67L/zSPoE4ZZnfT8Mg2u8UAjrEVs3N9ZFT8BjFr9QZRP+KNEav\n4C6/f5Iq25X+iSh4KtO12xQ8RdIFE4kyBtyjnbF25ZViIm/7336PQqpErcKX\n/ILJhlNL8uUlq1GVD+KaJPGt6Y4IYp6H4MOmW3UXcTV3fQLcGT2iDQF4u8LL\nhdpnHClXjcTVRRmiTqXcKa/fGwfwM4RiwvnxEj3TRqOkn8yM9qpi+pvkiAlG\n419vLJISno8BKRdxbEnEppA8iOZ3kNUCko03MCnLONSGSdujFue84vIEeb7/\nKbFAGE41WmTWMCQsfn5eNqywRwjKW1AHraWRdAfMcRH0avy25BL2LTtbL4kb\nGzPo\r\n=G4/S\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDTccMV9/zLLQb8Y5Uf7ty17QUsXgMcdZneObI1H3S7DQIgQxZsNH89bVUdw1yCZSv6JVUpYv40c4/hVikb3Q6yoPw="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.441_1642962280658_0.8883036026462134"},"_hasShrinkwrap":false},"0.0.1-nightly.442":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.442","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d5789eec6d36fee10a15bf779e235d568cd4819a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.442","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-eHYmru8D2jkh9jPU2OvJJgjEL6RgaoF1jAbOS+l6UtwZLR0TDxnmIV5IMSKx+JDBJj7cv4qir4Kuo1raYJqAEg==","shasum":"0eb023d92f273c3aae9c6c681d3e7d689ac5d394","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.442.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8TmrCRA9TVsSAnZWagAABSAQAJxbUVbxnFyYVRaQYwy5\nkRJqL/zkIai+zMjsVD+7zrJAuScqqrdiDGRtFkURsQoQ/87MwjSRh2I1z4/P\nEEcUx4qCgszqRqjOJtlF6b7ioEBGpRN1LxgFfQjZtPOdsmzW5qtFCPOn/wEg\nLoXgcc90xx4I4q8QwPbZp9SJ8uBW/b1jICUX33TJmK1Eg4ZYmTuBDmw+kwZz\nbiUVciVZFeSJA7xMss3Nm06vrum03oB5FvErkDVR17Fqd/oags+pB4ctihFz\nPgQ0uxeI21a1wCC6Sqd8pDHAEqUV7J+PgQdIl7HwOy6uOuue5F3wi9T67y9A\nqrSLeGeMUhGFQTT/jZVCnkCISAB/cE7g4akZMgNQ3ls2tcapRjqhEkKDC2pA\nBZYpPM5g9dbYklbBIBXqS8J1unjsS7ohWMb8XMBq5C9mmde54gxzlio46iP4\n2RT81o/H+u4I4r0HrHibA4oRGA73zwMrox90wUMn0PCsaMQAvIohd+a2Q4Ya\ntvP6/hPj0An5DKrIIhUN2tFG6L/sD5sAsuvbuJvK9owT/COqn7EZPk/+fM2f\n/N4Qp22//mBftExYZGp96/u2rjzc0AxpqqTd+aTrVx0bsin18QvpzHKVm+U0\nOjtluOlwO+1awaNTR0O/L4hfl7s/ZioOdEl25lhwFHVx4na/Wmp/FF97vrBa\n+8OE\r\n=oaJt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC3aA9OQwH0qtiTqKF2B/pgYBG1n8OSQfNXcrJNM9ZvIwIhAOECQaK3ZqOboqxBhv3PhkMiXmoFJ1iQDbRkTM85kwgT"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.442_1643198891059_0.3009760567790585"},"_hasShrinkwrap":false},"0.0.1-nightly.443":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.443","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"1458ea7151d41f5f11d4df0ff0db2fd6ad3d0e48","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.443","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-jxkPIlnWWiy56RiykmbYGqMGRbHwkQpS4+OD0+BlEDgcvRJftjcRXVR+dhYwP7o2HP+23HbQInYBopdajP7Tcw==","shasum":"506796fa5143f9ba73a3f7528c91bc0167e2b33d","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.443.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh8on/CRA9TVsSAnZWagAAcu0QAIg0KTvqwqvR0wRFxtSv\nhk3v0Lbu9ETvYzu7cFpiB60sbzdaKdF/kdDQfauOw/BZKZCnLy3Z2jZ4CTAc\nzthYWTkWI7hcNNJGZ8K6fe+UBDx57eJFWDK3J2zGpg6PvZpgU2lR+gl2BIZx\nMGjfeTMnI8ICFw5ejyYN7BMTsIXOK6Js3JV6UWf+pcaZwnuO05Bl2RPBoiX9\n3C1G6mzOOzpBLqXAuKjbAnPHiak95FHgEl5V/ixf0UQ14UwO0aeeDbi1DOUs\nr6xo7q95A2iUFFMedqUksLkKZCbaa6X6ixL70OJyETCP+tB8kesPkLsdmW+n\neJrmZcJXbIhoMgDTiqFqQ9yOJMM/F+aSMOA1H9zrXg4Vgl4CAQrQvDoE6t4G\n83WzVMLgzljLCeO4peiMcLUruw5lMhVmkVroKm6ZVrngcbdfZd721cnzfJyr\nTNN9Cx3bnF2bei7Oep0Ic9utk4I515QbQaL3VZYCGPKmr6shPIFinrCygriM\nzflQ20krQheKNg1+Rdb+RwOMxTxTFaJSWYVCtr0H6GSO8GvXVraG34scRHJQ\nWlBgFoZQiO8qiGan6gQujLb5kzb1azx0kp7ikOVGyqPV7hu61JYwlPqbj6wc\naOWzDRTm4qkJnc+fazmho4Pli8bKOLcOBp8bLzkXiRFCFI7O/W1Y2J8ttPQr\n7aUD\r\n=oc3W\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG3756LWWNPEYCIN2DSi9AZ3BVlvJ/p6gsBW9KkQd4JuAiEAu33TurrOmJ9hcD2URKOwoF+JpC2+3RBtymbwfV+jayo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.443_1643284990908_0.643729718756443"},"_hasShrinkwrap":false},"0.0.1-nightly.444":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.444","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"fc615e79178c69489d2074b3ce34e1ce8b3a90fa","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.444","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-G5dRPu5VpUlJKGwR74gxyDfXDzrvRkPguEQ4E3ziEgT0fmfR4zvqxYnrwL2OYutKLZDZJZ5DtaSl57Un74SIXw==","shasum":"e6b549b6e2e2bdc8dfa5537a7e7316ac7058b858","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.444.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh89u2CRA9TVsSAnZWagAA1HYP/ihZTZctfCTy0/PIPqPh\nUEibPYBwBtBhkPH2KCkOq12vsAeE/8Fo+vsN56RalxrjGLvYw0kj4ve2mr7g\n2Js2wvj1skMjapYwX3LkiA5Sho1JBZDMzlJVWFqJz4Cgz/xkX+QRlnTCw6KP\nA4n7WWYSO7htMrtM89dxsEowGCx8dOuPECN5/BTDKx6ZPtOrG9X1r7wLSEUA\ndQHjYuDdORV0q0OZFASwodi9JuYEYHmdziKGshXWBg8ByuFh2NQ6nSQn3WGj\nlgkT+bJBnTr5TDwgJbnu8ZeGubIP15Zmt6sDknpHT2D+7X65RBon5fXrFfSm\neUHdZYEi10NXH+zRFKa4Py0/wBYnYAauxW4mNumuaWTjbPWWVNm+50+PewdF\nupqffEZcpvVpKaZKkbTL1zOcqQBzmhl+yHZdI7AyFLxYVXbYPNIrRziHyLGA\njgEYQtRvyqGvP+Vf9YDBpz0K9+is2KqbnK+x5cfA93FKxUY3WkObhfFLsvTQ\noI9CttV8pLF7BEmbRNqYYUWJ28J70+Gl1ko4CcN73T/Vs2vl2Tlh41WLKNbs\nIHEcbpEmn+mDZUEUojBb5n1zrewZ1QjPVgLKJf+1EkSwp5MTM0slz8LlyqZ0\njJpoLsEtTICzE0ZrlZ8NPby7COTrzApXSzDeVXqMhSUxHXdi+fYtY186mXXK\nlSv0\r\n=dIyc\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDe4S3EhAS+tcTPLHnhGjL7O4OWw8I5Pff3zRFHq3lYLgIgTmST6kun6L6aYUAbarSeeFbyR9yV4f2uRDvvijqSS6c="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.444_1643371446398_0.15839222091979144"},"_hasShrinkwrap":false},"0.0.1-nightly.445":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.445","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"50f3e924f681ab4d63e2130abe30b51c55358769","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.445","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-cZKyMsIoZhwedO23b0Dy/VUEx/SHa0Yb+RGJuGg7W2p8YaaWUajuUlp7u6PF90sMR/XVS2ep8LXsC3Ta8MOJsQ==","shasum":"43b4d854472f7b68cdaf00c17cbb2114e591415a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.445.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh9WV6CRA9TVsSAnZWagAAUUUP/Rg19ABINcZ4vnYfyDW4\nZOl9ltVMAbF0ULmbtj9BSdrYZNDF3xUoHZRzMWmzFRNw2tJdIhK7y4nRnM0g\nmWglyRPsoAIwqKvT2f/ofvjtzMkCqLbXIdPHkt3WJ9VMaYbn/iJQPSXgvWlG\ngB5DRegnoR+TBmIWQ+CHkOCynhfUvfGdt1IdHRAHo854TEc9YRRRuN69nWgv\nU69muRqUgC1BEwPW1CuN0ynQoB0xO622lMjogd0oRcQ90QIVNYlBqsE2slD1\nYIjouhvo8zo4x6+oGFJLe6PxNwyHAB8YlzU5IK18IqoShmk4pzjaLHONVrHB\ngG7mhEyxh4BdMP6xV4zXNIjdOsklaZ+/D82azZ/cOdXmgS630yFKjFQTSZhY\nl1hKV2gV/tpShdiVaGUzgqXjMqk/R2uEI5uScwvtzgyGuLevaiTWaNPVG0SI\n8szggHfYNxtM1V1lhgFRpYiZYA0FBkXZSYbMv589k+OsEAkwrk8/dAu4h/No\nBscFAq2bKFUka+r0zTQGth/XSUPCAL1o7kg5XVR8sQ4KdxKZGgfgaQiL31WG\ny3CNDvnSAElJNqHrvk2bjHZg+gl/Fo//t4V3VG4/NTKGWhX9IEYw7/0bpWLb\nAOpSrIFf+4nmWOMc1jsfaq1me1o8ZWSEyvMH6HMXNNAXQXhNx4hA5gBrjTBq\nCEso\r\n=AWl5\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDQkzwN5DMQStufb8fyfWrKNcSIoOc3QjHnrCLJRzq8rQIgNSM+K6mlA075unjrrZqDYzYzBi+RhcnmOlxBpH2P190="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.445_1643472250743_0.5501643439918504"},"_hasShrinkwrap":false},"0.0.1-nightly.446":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.446","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^8.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"22e54481c886896f0c61d5427dd24beb2dfe5877","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.446","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-AjRbFCz0gED8hjI/bh0aR+gphjYM8cQOpwz1h/CobDZKhLf2DDWOekXu1bRcGytvoO7m+WFuJqHv91AGsOQheQ==","shasum":"5907cb9eaa6d3e8321ccb9493878a2d6f000aa5a","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.446.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+oG/CRA9TVsSAnZWagAAoCcP/jsJDPkh9LLJ7qrU+YEc\njclFMpqMJqC9stYzkQpbHUtbgN+vl8LBzgZyhU1XulH6at0Ok0UcmLBd9NPe\ni9c/4jzviR9MRcAjNNpE3lfysuKwuMeaxL8P9Z3VB1iHcL7R2Rr/Dz4ItGph\nrZSNKiC22Zwx7vPqsx6sLJ9V035y59TnwvvWjHjtNGD/w+MQasLZ2r0OvvBC\nJScQdH6gRyUmqiHfmL3uj8gqerDth/EGk9PTfV1fDb4FHDwxtwJ/dd+hXsK4\nUG/2GeGDrcEUEKcpM+jpS8fn1xFA9a5cxU6zvynWEcEpxspd/7sjDmDIKK0Q\nM3YPZXCArKkOmQw3OAFMZI/7o7VdI4waQoCwqeJP3ACVmOQrlak6AuoE8Nnb\ngofLDtmQyg0NL0l9TiT+5LT3nd3p/fx6NTY1voAjGOOmbhKKmC+4bXAm4vL6\n1KV6KTiMCfME8oMbwPZDkc2Ou0+yYbEGNHDmeEGJWDbrQ6p3/5TuEwB89fIq\nhK9einqamiZt9GUfoZv0JmpyNvmd+YadeRv92IVjPrqn4nn0g6cO3UdhfBqW\nJqbswE+9Zz8qHrVuhaEa02Y1anSx4DNSwvyaUoUTk2UKLxM0KZoafV7oOFHA\ng9gF4kj07ohCfG9/NFJnjlJcKlQ+qNoumULcmevD7Zxbvtfz59LaAbOaQBIp\nj5v0\r\n=sZfR\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGWN0owEA4tNNa88SDFhWF2GHybn6/stYmkR81Wa5ctPAiAmhDgK4u3q+UU9yuAiEpVuf9aEzWSjAZxCnfdsnw3G5Q=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.446_1643807166842_0.26868963665793477"},"_hasShrinkwrap":false},"0.0.1-nightly.447":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.447","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.24.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"6e7315a154c4f6afbc3af99edecf243993fc7257","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.447","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-EAAdDSvF9GUG3xU1UA0KcyNjW5m/bZkVw0ctmAPE5gwR8FmToDertUc2QdHorcggJHLnTnyEnwf37U8J8bkmYQ==","shasum":"3e511dff0c4812832227fd0a7ae1c0ddf2ff9e22","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.447.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh+xseCRA9TVsSAnZWagAAFuEP/3FUwon8Yb36RYPqj6W2\nUGx/4rKn2Px4R9DaZiIx1myXZKOVUDbqxXFmZ/YspFznDF6LGyBF2N1ls3sX\nY8H00Ds2DzxZzKyBmBuKcz3MP5K+OGEWJ+ptQQX2TqFPPYyuwU1sNQ2y5kYz\ndeFLENmLaFFtsK7LLng2fEub4SKc/UDMcrREVaOVJUuFwke/HNdTySzWp86E\nq99wyLfw7Ee2AaN4uAj+sp3c56avC+cYnDhm+PRT+6ACQhtE/C/rW6ldyBu+\n7dh85LTEbrVCRiEx/QYr8kQ4k3FUmlxs53eWB7szCthlq27EWg9WgvqR3Jnj\nXV6V/k2JXBzuKDyeXXR1VKoKWIaFZ2l3jHMXLspI31ddXnhNxIGhwdFTRZLM\nxBlyuu74V+APF3j4V4BeE/sWnOeMS8KtNJYZOnGk3S3OCOYacpRdbdL0xsHC\nOXjun3LBp08lwRIWaNbCshKCTzAOt2p5GJ1PkL2msqmvO8QkT2H0YcRgsS3j\nEB4G/Nt7hT9xcaVuY12BPXU2xZjir+Ld25SiQk5JU7Qjq/RCykhud0sQNsFF\n1r+WkaQm+bmhPkm6Mej1gFmkf08cZiyC2qCD0JRTj2aovmhe7+/BB8+Q0Mrt\n2ZefUM5M8nA948MNYjR3oGAO5vOBwkfDtq6oQXmK2LbRzz4JCaShD3v33Zm/\nGU9f\r\n=mMnU\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDx8LWfzHVpuKO8HPafGDzTR5cW0cMiQCSACoGPupt17gIhAJLhgl6Saun2EQVAykDFmY42o0yMlc6l93cVAIhDzU9Z"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.447_1643846429803_0.3091720078593081"},"_hasShrinkwrap":false},"0.0.1-nightly.448":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.448","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7361d378b3df7e6f32b33101b70ee0ebd03104e0","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.448","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-ls0XKy4IlMmiENqyP4Mxm4KGZXMVIhsiB3kxrIxXWnSnAseHGnAbw6kp1cALZviUC0FJVKGO1enu+9c6Jg+j3A==","shasum":"79198c8efa02a73fd62a2b91a2a2226c0860293b","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.448.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJh/AFMCRA9TVsSAnZWagAAOSEP/RbaXmUzjfP6bwmpKW3s\nOnOnv14vDNTkGznFKnRp9tYJJrm3TI1LVxav9mwwbaGp7TV1e+7d/zM35YrA\nMkEuxMHQYy8wf+xPylARMkYVBDcYNgHtomHHjWGMmMKR5h84zVjJWXyXuCAQ\nSxlC7SE9RwMtp4RGOM7IJECAm7CQat4w4idHHD08O8WXWQIJ4xvZNn8CnQ9k\nyKn1exECeeEPE2EMtOQf3GwCnqwVudSHdQQVe+GLTGv2dwLTJKuDX9yniYfO\ndTGX33QTaj9gYGlxmPilvcm3JzyMFQIaCHsV81YRIqJelZivkuSSm9a7sM67\nyByl/I0TdJyFedsv8wnFds48tcxtTRad/etIJCh8N+evUFfMI+m41GlSr7SS\n/Co3LXCSMXkSOm49SEkGqDpKslB8L8e37pSkeLZjJ7VSkvLyV1GbS+2ylA5z\n2jnyc/Qksmlpphuz0NDPL1CFtT/l5+vem8wZocL1XiDz2gW0w/+p0/XfjVqg\nKeEM3GNKhlRiKLv+WFbLZtNA/VnuSLAjGOszr+Do5HF3GwL8Re5yQypbIwLy\nW+Tw4drK/rn/NqDSNKnCXSbUYlVG6OFcKHGrakF/yfqVIEuHaGGbwrNvfP/O\nGbwSpUK9DdJ+y0WlZSBznZgZoeqHlJffN/3XTdJgPuDbgcZbZWJmPpM3KHcS\ntVgr\r\n=0ncS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDDrNAGGnY3owxEwbNl8E2wHlVeek+VRY96WU5sbfWcSgIgMOa6ZRCrD35w1TdVkr2koRZFDhORyK4gFQFEzOODobU="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.448_1643905355848_0.8516289052012749"},"_hasShrinkwrap":false},"0.0.1-nightly.449":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.449","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"07d3c552040b199cfdc10378bcb37a022aba109e","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.449","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-OyZH6YTL3myOdv2e6C5fMPagPcWuc7sOw/KmXGG+W8g5DGyHmOb715AVjImQlESN9skfHbM1CyK8aDjGeiuA7A==","shasum":"4cadb20a0a75c55f783d0ad6751ab380a623aa86","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.449.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiAm1PCRA9TVsSAnZWagAAgTUP/3v3/Zw8okye8Q2lPdN6\ne0BW4C416inKVdPtlDirVJ9gBS4JMmBTlyYg+aXrFDy5i34i9aXEQtY61YKj\n0Q9h+vI/zlFn2Dfs/MabC5bjJ7Wo0EW/Mv1eOUul5FanjMqGCBjClb+Sa6G7\nyPSqkYM8PrzUqClF9slq3MbGSNDsajzHqeKdEW5hTMdYB5qyzXAhNE/yMMnB\nWQoSd1QjZx3+32nS7VHigiB9f81ILFPPSZOQdDTwYbQxCUV/0ILCSJVqj/qm\nfyjo+WvgZdZNc7h5q0+lyRueHM4Ub6oad8vPsvwT/ih2T1NrFVnfl3ThB7wP\n7IKlFIOzFgGwz/WpOKN4kv23yWKsUgjWmLD6lGU2HKyNLVdNj027Ny3YVZ7m\nlj0vOuIgCgaDAC27p7rGH+kWF0tEG+zTeGsb0l3JJzhwolUSDWHkBuXHNNjt\nZnN8hIWr7SKO6INadL1Jp81b0mXsAN/tZr+aioFjwuI/TRlzAj9FxiGjToux\n1mVFB+bVoyGxPChon2uMNXCo+EbGd2UnL1DCYGmzSmP4TW812BH+cZ00hc5U\nJM1lVPJrU8WNvMiN2c0PpktLkm3vPRMNsLDvvV9Q7c6LTqu48CvKedYMaePU\nRTAgjacDwP9gIx9oS4KV/6l5qBHfCXRzfIMchMPUJJT6zcL69becuRK6g4ej\nxKoc\r\n=Nfhz\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDFZuh1Mjog+n8k5Oecos19WIGHV06UTF/zlH21mGpRTAIgUBkiIq5CBJ+MwjQahjm5az3qJF5wIMMIcvjLB70hC5o="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.449_1644326222821_0.531245970952867"},"_hasShrinkwrap":false},"0.0.1-nightly.450":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.450","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"045dff22a8b05fa02afdef663d12aab69ad233b6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.450","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-w9pjtYNp5ooBE9KxMoaq/TPVXTb/R7NQWo6+b08bua1I/WD0nz48PpZKcZpWHf43bcgjvyoAKd5X/W/Os+AWWA==","shasum":"9ecf79a0d98e726a9491634ba20269316a449dfa","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.450.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA5uhCRA9TVsSAnZWagAApgMP/2S4qTKETZj2JdJQZxXR\nVdLeXSqFrwPnBc7Yg7ji2LHOg1vAYtyCdiz2QxLe+xALZjdeGDD89r/+kjC7\ntIkNalb2s7Wv6hsh+Xxpk5RdOCNjgAERm+MYPLVQqZrpk3Z8HQTr7E8ySY+X\nnvEnYPozY/VYLyqY6jOHb2Vb1Bw+I0PmXVd+mOJ4vndFG+mG9PC8y1hK9AhE\n1bEIDPjqmuuFwibYmUSJQR1tASo8oQXvFp0O9G6DmDjc3tUp+PDG940rRFns\noaYQinxqmFn1OiN02ft8WMVL+UqkMV8PFsaE2QjlRqTjJvJVdT2hnugLbPLZ\n0R/6VkwPKNHwcCNErM9g3dqUV0I+h33mYAzqLg3cnvePXfw6Nd7JnUHEadQ6\nlCwVU1TBKw2bn9bdldifbMKwGWN1GhjifyhIuRpe+fK/VQ1cPklugsRYDKoV\n6PRFa7wD/3jJ/3X/b42+R2pGDQI4zXQMEgYSD+MUBphNlKEKbGVQx0e2yRy4\nHWTAA0b7Pdsp+Nc83MgJkFBLSyC2L8tZF2XuKtqGK+fEBLXxaeVOgR+oD4Tl\n0ibDKJDdYFPTV/a2Fjm/WWn1EYIvLDCBhdHBjqADDbw/9ZX2ax1kBoaHWCvC\neBhW6i6osPt8Kmaf/1Extx1/dpoMeS1Be7ybgwNy0YjFPU7Y3Jn9oJfBzPr5\n1fXt\r\n=Qmrj\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDHzlVZglUdc/dA4R5AghqSh++DtpzJowrmmWPtcJqkLwIgGrKH6aaUF7BsRI7rHtW1oHjiHrF6UlCFGT8C16YCtDI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.450_1644403617741_0.5395229544107183"},"_hasShrinkwrap":false},"0.0.1-nightly.451":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.451","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by:\n<a href=\"https://github.com/publicdomaincompany\">\n    <img align=\"center\" style=\"height:40px;width:40px\" src=\"https://avatars.githubusercontent.com/u/79655805?s=200&v=4\">\n</a>    \n\n# Documentation and Tutorials: https://hydro-sdk.io/\n\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term Projects\n### API Support\nContinue expanding available Dart APIs with automatic language projection (ALP) in the Structured Wrapper and Interface generator for Dart (SWID) sub-project https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid This project is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\n## Long Term Projects\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"e045523979ee26fc16c5fe520994ac6945f4986a","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.451","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-XO3FWTHJG+UQn3wz310lLiIqb1SfJ3VASKPevYVUj5xEgtOKS33PDmMQtU8NF1KO5H/8Xj15FCrtpNmfQOtJmQ==","shasum":"c02b6497d22bf7a5e4bcc787141fa1c88e623d09","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.451.tgz","fileCount":787,"unpackedSize":3500671,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBkkDCRA9TVsSAnZWagAAMFUP/j+e9Ov6wwtzhIKfsF8b\nmNJnm5RPse4rOqeajL7oJqakvA+VoCV0XO0bRaqKTDdOLRGTQLQ6LPV0CnzM\nghilPYm9KrS4kLt/QpZPgoMK5++5OsAfw3SKZefpKF8c8dDDAtPv6b71LWAc\noo4dmllTDeYrPbtJHXoqD8t/AZEP14fc29VWck3lTKL/QThOnQ8d9VouPg4K\n4YxFVF3SQvtvRm/LJ/L1JVEDu6h1GYP1gbRD0tSWORa1NzbMdjinUgPQOolJ\nnfPXSRnrzUOBOERaYx7X1eBr4OyAMl4E9NGWgMbshsQc4GgI5WbQZz/88i7g\nWpr2i7a3q63W5Qx5KnreF2yIdmJf9Ipu7qvRIojy0jesSeppp29dj3gt3mG0\nZ0lELjtN6uf0V2nOC1L8ctk66IB1HxUJLNKC2GRxCdKidVEIMQO6bW6DLAhC\n+71BFesQVZ9Bpa9AetCqCigO5KEXD0FP5mJ2as4RXAQGVcagypQ51HTxH/l/\n0bhtxHfNTTR9u1L0en0DznuPwArr2GCXOdwavYXBK6JLIgcRZhA9kTl/wZhm\n/HDbayVdB102PikgwMk2ZLIWvlxOUWTKeKhyFCbHVjf/x1+g4EZWKwrgAKzJ\nkLLQSS+QCZ53kJmxA5pV6hHpM49QkRKcVbyKf8LhsW8L6Vp1W6mhfU/mF02N\nlV84\r\n=B4kK\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAileYZNITj/kqSSSmFYPNCZ4gQbFRfSRAf55A0+hNP1AiEAmMTpANTySy+ZQOSwj0ZZrpoPUiIfgNX8rw654t0UBsI="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.451_1644579075695_0.11212146687448343"},"_hasShrinkwrap":false},"0.0.1-nightly.452":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.452","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"702a039143612d305199003fee40ee8447a7a345","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.452","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-NGSlaDId54qGruhHD952cajyEfB+MRYrhuARt12DmN8mOle/WluSBZhlbRxtXu1vAkq/ehK6gE/6nHUddI2WvA==","shasum":"7667af5dc1d3e5e6ac5320037630e4d51c55ba3f","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.452.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiBpSSCRA9TVsSAnZWagAADBkP/R7xyKksoWYVeFrWuzi0\nwrP7KoEbMrzOLATKpDXS8M2l/9XW+8t/v5aZpx47FY5XzvKk1/SqJHE3Y//M\nKMQV2oZ9sx3+NL3ycXCdf6J4Z3TnDrsp8e64ftAN+z2t9VeeRvF7GFZdanvn\nehizwu+ZkmzbD2EmktkncxSlKDVqcizVNFiMhEZbqNryEyIUAfPcmK93fGJM\nIhFV0mdY/o5aHzqNkCvjMbrdsZzGcNy9VGQ8gkhiY8aHi9RHsfLC6a/Yvids\nV4rMO1btaAjPZkQBrF8tLKH6gjjqifk2vCCbBZA3A+ScMt0GRoJfeW208RxU\nqqthhm/xI0xOOuz/BYSnDrJukxQJ7fjgyuAy4xkmNrMa66xqmmw3onFSgymY\n6Zpt1XQYzPZLZJ4h7eLlHKoW+g+fxyn6uulntBTWxIzNmmTDrLZjUgdBISoe\nXBpDfgJMaTahOSvrQc51Gy8SJLgYUAPZzdJNV0gBRjlpIYXIupYjtxkuZVVZ\nAzImFefDLBgVUJDiRtW58FDvzdzGeL/WwQCZyfu0Q1pdwxN4Gxak4XMnGHbr\nZYZFKiu6cWRqX12jk2ZnQR1cSaJdv7zcemkpe/PUHyDXNbGO0ni1ZtuxaQBe\nNzOVEAqsiKRxjIvkD9BQSPYzmhp9ADopoPZmc9Cg79lIjZVWPOtC1ONg2RQi\nROhN\r\n=1fKT\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAE6KlBod7+EBYOSWQ5hnvBcDuri8vNRkGAoaw+2UAy4AiEAq77nurRmhuY4Ln654sSQhVbrhss86wNimnbUrxjY83A="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.452_1644598418330_0.9163822957338028"},"_hasShrinkwrap":false},"0.0.1-nightly.453":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.453","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c8a37d76943b642d89ecd6877e47fe1a1a260419","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.453","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-POwubsVJCb2bvXQU5keJNhXfB2ud2p8tV6oN4KJSoLBL6dh0uvBmQ/61sNu+OvAKb3eNwc/VU06515wl+FjegQ==","shasum":"945de2b4f8f7c517d4b2cdac3f2fb4cc9f0663cf","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.453.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiClZuCRA9TVsSAnZWagAAu84P/3BqtKPd2C3P6QJaRlqr\norXjggtMJCJ4023sikaqF2uBszSJf4FuJP3fbrJxiHSUBfvQfRKX/U4s7ndw\niVb8KUZzFkrDvoEMIX2im46s7jCWYWF7gT6eSzvXJTTfMW7+eWOK+lkcLWh5\nocZtimRdxBEzBpT9enIhL7MMOaTFC2ib8rkF+/3Jb3dD+l3J5wuJxNyLn6d2\nEKVwCDF2VYcaRtr1kgtqfrLjmvcJ9G0/nJKSIdwmve8uTFzSkec703nHPY1s\n1qErNWRCAy/FU41DBdrm8w1QWc4nurHkN3p9xdtbYqyUg9pDHHPRYyDlr2Rv\n8kF/pvpAuOS3DdJzx0s2rUtLnJiyMU27TXwsYfyzN5VbzbQNCMoFjwZYxBGU\n65Act4ATAm34GhlaqCkcmNMc+r/czetEwdRqHAraTrLLATLd81oDLwnldC5G\ne0p5EwnXTIgmj8Bhj9GjcLXbxXbhQbgiM9WmBLCkJYELN5wURKFKTBH7ne0C\nOogFr+rwFYh5yTBJsZw+IrPu3ZiXyWyoXQWSf4AvdUposfQuqVPQI3rWdtkj\npistrI1glRkKPUSSbHW7nEZn2tNwRetvcsme+shbChkGiMFEe349Vtyb/WoP\ns7oPpf/Yf8LvaDWduKdCoaJQf7YNZvmJZ2sXBpV1XWehWDUVJHr+1+QsnzhX\nbkX7\r\n=+X/K\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC8cFWxnWGafyJ9DkkfNfeoVqqok3J6ZahRJiJGkCQlCAiBiqbyJ/k0NugUs2C9cpIFxWZ/nikOei08o2fieZ5rovg=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.453_1644844653895_0.49763718413996316"},"_hasShrinkwrap":false},"0.0.1-nightly.454":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.454","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.25.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7d41d5d058215563f38846d4cfd80e09eca4fbef","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.454","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-EQR3fjDhF64GZdYOA7zJ4FuJhpMggS7dnev8bxoIOquhreKBEeVysXeMDqISga08jYkd6YzEV9iVf7KlVaGbkA==","shasum":"7d336d17d1910258aec373309a1250a818aeab34","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.454.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC6tTCRA9TVsSAnZWagAA5FEP/j1vgbbFBK0jsePszCZ4\ncX9o6r6HhjNu5HzNgJWogwcqE5RINd316ZEJq9NT4aNqRMsj0++LRQpyXzz8\nFKmCIb1RqR8xwXDvE7B6F2PEZqVLoAEGjaesJYW1a3GI3q9AtIJOCBjoJaWH\nWwcux7N9b+6hLM0A6xQ97JdpT73g/ZOTPtCsXKdg899OsqxRLPRZFmR7cSdF\nUIaKFuDY+xuOctchg5TJU4G50LtWpZ80AFH5BlrWqsxvy9qbqajeKTO0lZ0r\n6URlTTgwGZkNg9SQjkb/JSAOAOWzvKPOFS3B2ukAemDzwjG7dZO0tnJTyyJX\nbN5oL1/rKGoysjtldXxJvYOAA7rGVO6jh6dSfniGPUSTaxZ4lUNz42SvApk4\nKCxw+gVTOPPfd//BocuwBbPu1fwCBwIeyoVasF6D63FCugtt1/1c4jIGeN3T\nm7gMNCg3ZFd2kV+6EfSQ2tTFQjG0sZtUJnT6Xju/fGZkfK9FajB4+VP4TCP/\nW5LT03P2BcBzAWYX8UsrOcCb2BnQObW1CwJebUQgHx4iYt63hVcmU4ZCaUD6\n0+7X+rfaSDQ3W0cXZaGmhMaU7+uwfJ28n+NQkyE/oEdW35s9igMMOExe24WZ\nI66FoKrl0qyNN1LOONMNKhieYMXtyn0cmr/lqk8MuQleiFSf4usodUmuJ4Ad\nbBLy\r\n=u6rx\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGD3jexc7Z/XF7mHAPt9bYLp0XHTwaGjhF17pt742MZMAiA22m2YjqMtOgAmSNl2fQHCRQK+tokKzTXPICHaUQuO5w=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.454_1644931923355_0.17226177016614352"},"_hasShrinkwrap":false},"0.0.1-nightly.455":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.455","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.11","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"d57d5b06f719771793c51746417b62ae369c5970","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.455","_nodeVersion":"16.13.2","_npmVersion":"8.1.2","dist":{"integrity":"sha512-JVpUnrraT/iM2qnR7wKHh29d5DhJzhv7rMhDRyQjDRqfwboDEVz013kWaY5wilplEO9sjUds54cEUEBZVOoRPw==","shasum":"da3e0216f063461e867eb9a4354ebcb7d1900f47","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.455.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiDSldCRA9TVsSAnZWagAAcmIQAJjuFPS31/ZU0IMqu8CE\nP2pXU1NS6VA6f2f4b26GhHBQIi5Ff5sZsxFo8MVzOH++QEjbCAOQ2A696ePS\ncHP2XrycKjukHn8pzp4m367iPabtX/nl3dLicO5FffesAcyNtXVKBJqO4fhC\n7T77Akb7S+PetXEfuCFt2PtURVGtgzNXhJ513EgjXH7YbgP3hZdkZheT5MI2\nJfIIlNUjXV1DGX0KznFo51gSiKR1CKqgFkQ6OvQ9IgbUK9Jw/nC90NGHHhiy\nTw5DjuTDL+ReRR4tD/ysMU4IAsCgJ0ZmgewMVKtUhLA3mYfUDBC1N3zzqMke\nbdpzNVMRdVQf9htt6CLtN4FgarCpmpbSVLRmspzG3eHmYFTsSFuWdjXgwkCd\njo2ddFft++Mv3qHR/DptdEy5A3CownizAVoaFFI4KSXgBO3bm+NY4Q2hz1dG\ncmIrPqSCooN8Al7r1qVbVz1GKR+CFS7lm5/rKw3SAPG7euooGiOaryOx2FlH\ni59N3WMYhTKOg1rwcqe8Kp4ItXi4gIo1ywHgVEghc0TkW5yGpvIA6SYhimBL\nc1urc3R8NFR4HEddJqiWQJJ87W13mSjV+I5XJLAbUKhCuTQjU79RAIPpiOBD\ndy5uvCm57NHessr5KlHmsGJA1h0wRltf0TQ0iVP7hgwkUV/jWHWNOz6DbhEY\nFmzg\r\n=6hA0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIH9Yp18Nk+7XfupfmapD9ejRDWw1o6Jz6mVyUZnwpIDcAiAB2gFz9zFNzC8PEIChdRPp9iyUQaGcOjDFf5BXmlQzsA=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.455_1645029724810_0.8303461235584799"},"_hasShrinkwrap":false},"0.0.1-nightly.456":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.456","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"2924504c1526e9432f516649a4a3bab23e0d821f","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.456","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-aGgorPgmEIPs4aAHuzlsHvK9EPzVHPQh5MtnLm6S8asBUWPtcLvaeX7uFasVHslOv3rCR9a3kgghaaoodI5oPQ==","shasum":"245b8c018549f67b3040f0a4029d57f2e75abbff","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.456.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiE995ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp0gA//S8SvxtB+ZrDBIaoGXQYrkHHp8m9NViaxdFy+82BY1mHEjgOe\r\nOFw3JWVjGSY7PV5nxfrslrTDAJOQwnCKLgJoOzdgoN8IWp1wkqRXm3dFSzZX\r\nh9bp1O+EzA0JHtAZHIIhFNq6VVrJSf4kYaFU1wekA0PvBHXwuMghXEDuDTE2\r\n7asP5x4qWeZ5/k8R7VOdUWD+yXvB5V0SsA79Nz9eWVWW3rnfwHNWl3uKVxQ5\r\nBziL0eNVcJOMPdxkvx8cQLfHaaj/WjagKhtzHq70CX4HfJXKb1omgDCHLsCa\r\nkhmxwypR+k6Q8Bgwfw6HguZHH9dSffb5Sc/THSTX45QfGAEJX9o877jlPFl8\r\nY4YRvq9KNFp6E0P37itCsXBVbP6V1bfplAxUiND7pV//Ve0l/8/b2Aq3PNkK\r\n3L74ipxx6HLwlcsJRMDeLAhNPMm+y/0XcNljCNMj8Xe9yDEQH/QW/o8p7aVZ\r\nJBuJIrfT+vRQxKSwc1uwvfV7J+7m0c6CzI1xykq6HV+9+XAHLMrB4NK0LzZC\r\nSdvXvCwy33zko1m9SLGhsmqXfd8cyGEtQdMpHbib5+6fIER8WC9jwCUVRkWx\r\nmaU4KmrHvxJp+WymZWIQIjYQLqIEsGlLX3yab9OdrVsAeYHFWZzo6cetp7Tb\r\n1/kOqnZXv7PApmvtgHVNwnh/Mk8Jq+OVcw0=\r\n=XGF1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBWivTNk+M9FCpMMIjXvLjS4VAQQ0isaz4D8Vml6P6XPAiEAqmdLw2HSt8hDThVzpJ3MUscJXY8vA1ovIgDsuvqcBEo="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.456_1645469561039_0.5659183550432882"},"_hasShrinkwrap":false},"0.0.1-nightly.457":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.457","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"11577cef0e49b2a93861009ee9c384060ceed444","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.457","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-4altkzF00ZWwUVDt3L5o4ESmpSUUfm7v2Sb5EWWORVuzd7ghvKgtnFj3yROmBaxqv7AwO7d38KW0dyA8PyqlKQ==","shasum":"47cb1d892ebefcbf152ea52f3ef4ca726f88a131","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.457.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFjP3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqiAQ//Y4XFDJEdj2ZZcdjZSItZfvwUR4NPh3eoTPpb/1OYZsWdCWpl\r\nQvMXdN5hznp+mB9jIibanv+Mj0LBCGSrleW1LnFsChth2SCNiSxylTG1+xZq\r\ndO16J1mOYPl8rn28EYMqnjc9Hr31xZOdqIz85o3vQYwOvDrd3Oflkl8t1ZZw\r\nlY9hiswMP8ZIJqBqYkNYNhNJDrPjLpm0Oi4z7UHT8tA9ViW6dKoq+vPfWVXU\r\npbiyQN3tQqOcoF2AaXh4rl0Df87d+gn+VXbd+lbxjxd38yEnB/ODC6aajvgO\r\naY3qGOAfvJulZ3aPDy8ZiW+AryhLEDBVMPMlPRWIjr5uf2z0awsWQ2FogDpr\r\njzooCymhr5/HRxs/7eXLFXXDGANDc46rozJH9X4bcKuFPqB5Yt7tzFBLAVIW\r\nM5goZ9W01wUG5t9bn/eWkJ2chRBYyu2oZNy9lOlMdR2nhfY+DfMkxdzMSZze\r\n9sMh4T2sRRo98nfjkcr+ynwygrRWRKmMISy02nzfCtHd+T/Qi4cDoZ7nTO4K\r\najhsyjL6eE1HJ4Jsq0weOElURrN4k7uE6wLOOGnI9e+IXLJWflD9g+Upqc5f\r\ntJzW9zFy4vE9Nx1oXtO96vOnOhK6gVTZZe9AaMXsV9tvjBKAf0B8lwTkXWAg\r\n78/fupqUNvCOdi98yXllBrF2xiHxsr3AfxM=\r\n=+hOC\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIASwBwOpVejZlE5sMYjuADcL2odfmMptOpTze4e1gvHDAiBbR0y7xed4hmSyPPPrZZjB3Lm/ZCpwG+YALJNMY2ZcpQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.457_1645622263511_0.0865547043864614"},"_hasShrinkwrap":false},"0.0.1-nightly.458":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.458","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"b24f5243c0bf3880a10c6d3070e2b5668a19c265","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.458","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-1RueAkUEQ+RlOpBjZNz+02PMQU0yVpkP5BTVlRQMI5kuQwGcKYA52rY8m2gA3lCaSeWEvJAOX+M94ddSkeisKg==","shasum":"efc0bdc47be8bf6807aba330db5ff71707672112","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.458.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiF4yiACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHrQ/+MKXOPab2csqBd+tZG2fOM0N7Kzb6zFwItwNdRIBENooXyAvZ\r\nCrX3c6L6wDx/bM+GSvDw6GRDJFHWUm+9Wj/4I5s95ndNWFfwlAAJ9qCvTW3s\r\nY+80OJIE4povzaoOFCVSn4VGH+xQd+oMEgdrsLtdINYvKqFD1SODYIwb6DzW\r\n5PNsFA0SFmIHBG4ManyXsEUs/j96FE4D9kZ0o82RFjP9sry/C6dKylSQALej\r\n8f5KkDqa64qQqlHvnnnkOYyDJgFDO8pcDh7ARj0ARDImJ1Xtia7b7b6N6YpE\r\nqyVrw4V+q7liHK2w8bnjSZWBvQTAGGJqD5q3TQqPMxK4+wVxl8t/XkLp8Rjr\r\nsy4N8XDbd1TI+uGVOVQN1QSbLW0wv8EXGbp1LQhBZyEO1LaX92IMmHvWDDls\r\n5UEgV96L9JEwurt28kldqBpb2nFt+RLYbDPE9x5bAOJp/imMVAF3AClfvZT1\r\nSLUrGjevRXFUS0PP/ApnTIoscb5DKHE91zJTflQ0wYul42w2XzEjnXse+OFI\r\ne+2VCyEd6Y38tX+KBMs70tsNDyiPpM3TE2ehmAT94PGsuwzM6mhLfyNOPCP5\r\nnxOyjjpopQX5wQl4KTOvk2FltKvJZaKUhW7iTbjs5FIfqLQk56jOqfIz1cvi\r\nxCgZq205vkm90hzuzXztEiYieBU7OIp11dk=\r\n=IxmF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC/0Mr24Wkt75yBMBR2jjChxU/vNl531ta6DjavxC753QIhAOc+Er7wfDnUbxSjbC0Ep+obp7IaIBgS4OYuSrtcK8ZW"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.458_1645710498322_0.797343223823803"},"_hasShrinkwrap":false},"0.0.1-nightly.459":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.459","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"eee21a07d6098e04745b1e20c212fcff089d7be4","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.459","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-y/ySN+r091UR6twSBMRvU+CDg6Rn+dUP/bV6L39uVzqpx4DEPerpm3WL7DDPTrx95hYakkwC3+8j11O1bijLIw==","shasum":"e1e79c32eb152fb99816b816a202ddc48b94c650","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.459.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiGNh3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr8tg/+MSUar8CO3mZqy9xWZSC8QmT7fPoWD1V02LpAD1D2IujDfPY8\r\nvu/UAubfDv2QSWbeWqze2ggA9Eu6LU2RK/3XR5VkkU3PJyr1dddl/FXNIgv0\r\nir9lMovcTsyEGf7NkBu3lDf0xi6FujvZzq4ZzbB3slIv2dNWqdWgMJ2dPTSS\r\nz6XAcbTaH9TNVQZj4sYxt0MEkBp0XM28TDmFCRrIEN3a+VMbVrDenRo8hqef\r\nKuchX9YsluWfpb33/RZNO07hi44x6NX3/bljsbd8UAwpmpLzyN1oPmhcptgx\r\n4kx8gkhf+BoikmULEZYYLBGiMRRCWiiPu72ircVDGY7Fr5HHrlIy5xMalJE7\r\nC8JAnzqu8Rp5KiT6gwWQY1Tmg76YVUMpghrd05iKHXQsf6nnXb7X44RF4FcD\r\nf4xtsQeFfTTVgvXx0NGJhhuCwDc7CoYldGSqK774jMy5QDrlDTr0rOtvozji\r\nc2sgBGP71Qy0mXhIDomMaVOlvdsunOiqXOTZSCOCOgRpRu6GS7Wbk3rX5ERN\r\nxKAlipZxWmO/RoTJdi8Y3YDCAWA80GndhKUBzwsRbwqcZQc88iHySpn20XlS\r\n6W/tlmBbSmJOVOKKVDnV9EPH1zj5MV8KcjcKnaYgrbluWUGfJ/JNn8QF3qFE\r\n43WEJJG/26Ix8ovwF3md2m49QyH0vJhE5Ao=\r\n=awDa\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDKumd7+XPiK0DMsgKmxVUkSA9m8Ut42vn62TJPjIjjfQIhAIJM59xFP/IMRyMvAHhe+rj91BWj37Qn04jpAR7IRU6N"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.459_1645795447041_0.8040722117490056"},"_hasShrinkwrap":false},"0.0.1-nightly.460":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.460","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"32be70d06ceb528b9e0ce1fc9ecf3fd3b4a2ae87","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.460","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-WurS01oLUjgAB2inu/59kS4LHUvJa46zbsFY40qTxIHlR+K+/+1xbZb8oiAcysFj1osXORz5AGc88S+KRVmYuA==","shasum":"57f9dfdf64b8066f86652dfa4206cd09b3ebf6c2","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.460.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiK0g5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoNvw/8Dy6AsZFSasSjw0TvtxSUl1ERTh+4yHEM9206J4znEpUBrK4P\r\nOJbKV3wGOPxkJkdUM7RHFnh/GOIt47ymfvTUrD9O8NJvjmH96YYmz3M7g/Ty\r\nNw9teTlT5eP/PL0zdLG+sv6BF4s8KSChN7wGobRKNU05H6TSEZsjF2M2y2jd\r\nSLn4HnCyxWgo4YFvXPlD7mp24cKdYKzkOLWUoOD79+Gl0K9MGNk1bBf1Iebj\r\nadG0IEfJoTPe8w++g14mWtotzIu6wrxx9Rk5mJmfRfZSffdd549FGmDOqX2h\r\nazxmVKAnjlhSFEgPkI4eBDCdSUuuDWnzJrQQsPrZiZCj3W7jrh8gu3aPZdB8\r\nJF5aDZzORUi0wQj1ZHiKPbeI9BlS0Ce90ysH+hx2tkA+9MWeOhKYzpgjTv4l\r\ngJUuvjHOOI+VW16eIpe+ABT4EhwTeWR4FVVmKpN4Xv6d5ADvHqZW/wNCPoLq\r\nqhb88e2hVPoPn/+9gAkIZy9vUwsjPvbQLxYQkcwvW7M+ryzctvQrBYepqUP/\r\nd6ed5z0a6rJfnMYzUi41+oc/Fx36RWi/C4s6M3O5Ub1jMOQdKLqss5/YZfii\r\nM0bQ2SzsewOYOGWUx0sZivHjxxCwu2xgGps1NMSr/LSTMOs9p/nuvtyt2TOe\r\n2iRGYE1nWBJAafU4siv6CTr7NWyQQK6TqF4=\r\n=I576\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCHwtt5g0A4DdaUufZSfAQ02KEk/CeKGQVCpWIS0md1FUCIQCRdQBaS7k2tvNcrLWlcXh3FEc6hVtkPrkQb9ILtTnkgQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.460_1647003704915_0.9519141655491348"},"_hasShrinkwrap":false},"0.0.1-nightly.461":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.461","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"c10256a1b3b687f783087f93f084e7960c5154f6","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.461","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-igKYU4KOSuqH3miL40i6nr2vYmXbtu6A0emCTI8vv/e/7llIxRHlUz+1muucP3U7mFOiGnTFy/daURHZWvoLOQ==","shasum":"de5423380895b78b6e2cf15a9ebf74267b98923e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.461.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiMymGACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq/6w/+PkcCSBelKcRqJS+ECCg1/qdzacfGxJXGWkWYvkRy3I9iZKWf\r\n/+w838YFRgGPiRJA/aOBXiJGJwLhm9qnWKdUGkLS3i8O5oOTseWHY+AK3/Vs\r\n0eBqZx+4V22qTaFVHWDUDLIJ2zxh+fVgOBy8ANRbDwceoIINdnM1fjb44x7N\r\nGjkjyFhmLHIh4TjaxOGidchpUfoWK6VNu2J/Wi7EjrdNHWLsDYcb5EznlKj8\r\nb+GOC99/a+QDMsFfYEkBlIVPdF0Vqb1yemWW24a/OZh1TMJ0MqwyNs7Auohf\r\nGEV9ytxyOPhPN0VmfxZZ0Rj4dQLw2X/XI4TDgnkmsggX5C9mD7xU+3kmYRPc\r\ndErATyQxsoczl4TaOOVOm6ZstrsZkGil71DYZ3tm9AWSw2td0O7cFoMh3pgQ\r\nvLSGtDZweWmNE+frbEug9oA8DKQH0YXroaUHZLClXeMobP/0ONmDk7xOmVot\r\niaiViNRsY+y9BnJ+LT0EKRckgSc/FiwCrK4eUqYhO4Mzjm0PBgSnGWrzHEQC\r\naAyDC6Znc3gGNdYxPgBhnsIeeunrdNznl9QgZRs6iKdelxYj6620LP06mjPJ\r\nuoTdkk0WIUdQ9vVrLX0+vMpYkQGfbr0F6NL4lcx7xODwEsktjsKT6hRRXEPV\r\n/sTT5lC4jzkcDBNpgHWeZ2DmWxz+1RBJ84c=\r\n=6zWN\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDfdz6aA7NzAjwIYWZbLHtbl6ebtIcphGFYMbNEB26omQIhAPevGSgVMeKbFM7IYMfw6YNLFX+6ELE6nesa80+GYTcg"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.461_1647520134301_0.8872611725165556"},"_hasShrinkwrap":false},"0.0.1-nightly.462":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.462","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.3","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"7a984b2d3946432af4ccf7d7cc39db1d659f884d","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.462","_nodeVersion":"16.14.1","_npmVersion":"8.5.0","dist":{"integrity":"sha512-4Cs64RkYLHfk7iyWbk3WOQKR4hEO2UeaTCqEcITwrMbs4BjDYCl897579xxDvS3jrwi3ARagb19u17zg3tpjhQ==","shasum":"4db058e76bdc52bc940827528b3f6e622f8ecce9","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.462.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOhcmACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr52xAAjlCo/yIeeMUNbsI2szimCkL4y60L1pARq06+tnqxy1J2pmHZ\r\nkWgx/g7VjHdFyHbRU5tPbW07gdAK3XutqQkdj5+uqhAYkmu1MnlSAdBMyRQe\r\nOMegDt2Cr3G6ukldv3QZl60zph4s7t0f2xV7RPZ64aN6shM2wMrvn4d6qhIF\r\nXLMXoBqosiOn9KnQTRkKmInvRvAKDAoJZ3XYEUzy3WV7Yq72LK+POnHXBW/6\r\nbkOrWAZpJ0LZ+nooE419sP70IQDhXI4O5Zw8FxTUZDOEsbQj2hnMWaQ1lsLr\r\n/EBhDaFaVJk3/YM0bMELZE/0FsDXOAFcIIQukqpwjiHMLSYbWSfHKZaqj/62\r\nA+AvdnmzhGDH2RTokI7qqglcJuThk1kxgW5iHjqLhZ/jY7kpPZE+O0DVWLvN\r\nNJqcMIGOQgO3Gg3WHwKP43/JOWCzRt6AjWZWDX/WoeuXTJHWe8A95hmjHC4m\r\nt1E1EHdzgcu09tXJtynQX8COsspHYFo2sk0VZvgGfi5J8w6/9aJcHUiohg5i\r\nGvYkWxy8ze3S93Qw2CI4CSRcMkG1vi0pQgFaG8llOuaYZZQM8z45ASQ8L//k\r\nxkt2s9wpr2cZaRjaoN3Jfr/paKKGFeCge5kl0h1fttkmaTmxF18ZOkMvw4ZI\r\nPwUlnk/HXLsYmspGxMkoSZzxWqt9kqSpgTY=\r\n=dRTt\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIANvqkVBHjGzAl5CvqB54azNxDrrefm0DQTZ3fgptAEFAiA4Bk/EQjz6WJ0VvZCfG+kUv3J4qC/i9F58905lvzWuEQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.462_1647974182770_0.9447476341596923"},"_hasShrinkwrap":false},"0.0.1-nightly.463":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.463","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.6","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"886cedf7f1cef07fab5ed33d0a772335b38edf64","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.463","_nodeVersion":"16.14.1","_npmVersion":"8.5.0","dist":{"integrity":"sha512-UlkCEW9IyC15VE+RNGxK5wKxtFiB897HwHnpmIualcsKrdjm385xd6F/QYTK+q7rPxbWYSHbLqZ3VSyaA8M2aA==","shasum":"b44d01c3092f06b105d3deea04a0582c9228171e","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.463.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiOxZ/ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpSvg/9EEBEGsG4jP1IHDqTmJSRtJTsQz1iQ7CbajTfPcjPmvIqnxNE\r\nFyyWKd2cwUJKWHtgfJccOfDmxJW443y/UZ8yUeSNNkc5LqDL1FvPxSMxXdUb\r\nX6XkVVjbe+1HLJDugyxKHMsKT/iGSGWwuEjMckefkTG6ZGkqtNzy+cy1f0TX\r\nsKj6ValwYUSm0rERPlpfdiRaRsuu5Ba01HVPJVKoNDb0ZRTSwlTFHZM+Z5Sc\r\nxUbUbiVB+30QC6oUS4UMgstGwPCi0XAXhZtT3pzuvv4a5T08wx+dCHu74Z1r\r\nXK5jHQQcrxQRsVpd7DPLGqfcXy6PTIMUxF3npvhPkW1Dz3mhYMOd1GctxxDh\r\nyocI64IoSLEbIaoWWQJzWA9ezT1L5ypXQgUABhcLImDTCfNLRS9SnTn/YTeI\r\n+NS8kxq8JWG4Si60O7uota7ilTumaXaBdRHqGqET5jLhV6Hs/9ZOpJ/t1h25\r\nEEbIIG3OwenRMnjfPIvEGjgQzSyuq9sC7gfpImY8zQa6INrtqogO+SkGbkxY\r\njQUMMvBeOuGjSDG/X4ZA2WVmsWweLeAyxbqjhoZjrEGAnQwyzSVN/wNWvjiw\r\nZ9dvmMzNQnuxz9MOPvDKvgvHyyb6NDfMBxfWSOyH9EdnXEzmLqTO85u1cNr9\r\n7wb+cphYlvl61b+1i3cfM8VR/4MufoRJ4zI=\r\n=wFr0\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD4wJY4r0eOQdec/7T/TCIZebyLhObU8ytyGB3uOtBsewIhAO09VQhqQXm+gsXpKtc1/x1RXJQFVyPkHowXq4mpBJin"}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.463_1648039551615_0.8118957374726588"},"_hasShrinkwrap":false},"0.0.1-nightly.464":{"name":"@hydro-sdk/hydro-sdk","version":"0.0.1-nightly.464","description":"A new Flutter project.","main":"index.js","scripts":{"tstl":"tstl","luac":"./../luac.lua -o assets/examples/hw.hc assets/examples/hw.lua","build:debug":"bash scripts/buildAllTs.bash debug","build:release":"bash scripts/buildAllTs.bash release","build:docs":"bash scripts/buildDocs.bash && cp _config.yml docs","build:examplesForDist":"npm run build:release && cp assets/**/*.hc dist && cp assets/**/*.hc.sha256 dist","test":"echo \"Error: no test specified\" && exit 1","test:ts2hc":" jest --testPathPattern=test/ts2hc","test:hydroc":" jest --testPathPattern=test/hydroc","dist":"npm run build:docs && npm run build:compiler && npm run build:examplesForDist"},"bin":{"hydroc":"hydroc.js"},"author":"","license":"ISC","devDependencies":{},"dependencies":{"@hydro-sdk/waveform":"0.0.1-nightly.48","@types/clear":"^0.1.0","@types/cli-progress":"^3.7.0","@types/colors":"^1.2.1","@types/jest":"^27.0.0","@types/luaparse":"^0.2.6","@types/minimist":"^1.2.1","@types/node":"^17.0.0","@types/progress":"^2.0.3","@types/rimraf":"^3.0.0","@types/source-map":"^0.5.7","axios":"^0.26.0","browserify":"^17.0.0","chalk":"^4.1.1","chokidar":"^3.4.3","clear":"^0.1.0","cli-progress":"^3.8.2","colors":"^1.4.0","commander":"^9.0.0","escape-regex-string":"^1.0.6","humanhash":"^1.0.4","import-sort-style-module":"^6.0.0","jest":"^26.1.0","luacodegen":"^1.0.2","luamin":"^1.0.4","luaparse":"^0.3.0","minimist":"^1.2.6","nexe":"^4.0.0-beta.18","pkg":"^5.0.0","prettier":"^2.2.0","prettier-plugin-import-sort":"0.0.7","progress":"^2.0.3","rimraf":"^3.0.2","serve-handler":"^6.1.3","source-map":"^0.7.3","ts-jest":"^26.2.0","typedoc":"0.22.12","typedoc-neo-theme":"1.1.1","typescript":"3.9.9","typescript-to-lua":"0.34.0"},"importSort":{".js, .jsx, .ts, .tsx":{"style":"module","parser":"typescript"}},"prettier":{"tabWidth":4},"readme":"# Hydro-SDK\n![Logo](https://github.com/chgibb/hydro-sdk/blob/master/img/socialImage.png)\n\nAuthor Flutter experiences in Typescript. No native bridge, no V8. Just Dart. From runtime to virtual machine.\n\n# Sponsored by\nPossibly you! See [sponsoring Hydro-SDK](https://github.com/sponsors/hydro-sdk)\n# Documentation and Tutorials \nhttps://hydro-sdk.io/\n# Features\n## Hot Reload, Incremental Compilation\n![Action Gif](https://github.com/hydro-sdk/counter-app/blob/master/media/action-gif.gif)\n\n## Function Maps\n![Function maps screenshot](https://github.com/chgibb/hydro-sdk/blob/master/img/sourceMapScreenShot.png)\n\n# Roadmap\nHydro-SDK is a software development kit (SDK) enabling Flutter developers to write portions of their app (or their entire app) using Typescript. It is a project with one large, ambitious goal. \"Become React Native for Flutter\".\nIt aims to do that by:\n\n1. Decoupling the API surface of Flutter from the Dart programming language.\n2. Decoupling the development time experience of Flutter from the Dart programming language.\n3. Providing first-class support for over-the-air distribution of code.\n4. Providing an ecosystem of packages from pub.dev, automatically projected to supported languages and published to other package systems.\n\nHydro-SDK is currently only suitable for simple content. A few dozen Flutter widgets are supported. Content built with Hydro-SDK can be updated over the air using Hydro-SDK's built-in [codepush](https://hydro-sdk.io/blog/fluttering-over-the-air). Content can be authored in a similar manner as in Dart with hot-reload and limited IDE debugging support.\n\n## Near Term\n### API Support\nContinue expanding available Dart and Flutter APIs with automatic language projection (ALP) using [Structured Wrapper and Interface generator for Dart (SWID)](https://github.com/hydro-sdk/hydro-sdk/tree/master/lib/swid).  This effort is where the overwhelming amount of focus currently is. Having a stable and high quality ALP will allow for the re-use of existing packages from `pub.dev` in Typescript. This will also allow for expanding support for authoring Hydro-SDK content to other programming languages.\n\nThis work is tracked at a high-level in the [Binding Generator project](https://github.com/hydro-sdk/hydro-sdk/projects/5) and in other sub-projects.\nThis work is required to expand support for Flutter 2.8 (and 2.10) and is directly related to the following umbrella issues.\n- [☂️ Support Flutter 2.8](https://github.com/hydro-sdk/hydro-sdk/issues/773)\n- [☂️ Cables](https://github.com/hydro-sdk/hydro-sdk/issues/684)\n\n## Medium Term\n### Developer Ergonomics  \nImproving developer ergonomics with more affective testing workflows and support for Typescript language features like `async` / `await` interop with Dart.\nThis is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Improved Test Ergonomics](https://github.com/hydro-sdk/hydro-sdk/issues/843)\n- [☂️ Typescript 4](https://github.com/hydro-sdk/hydro-sdk/issues/844)\n### Performance\nEstablishing performance baselines through benchmarking. Some efforts to improve performance. This is being scoped and tracked at a high level in umbrella issues.\n- [☂️ Optimizing Lua Compiler](https://github.com/hydro-sdk/hydro-sdk/issues/797)\n- [☂️ Size Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/846)\n- [☂️ CPU and Memory Benchmarks](https://github.com/hydro-sdk/hydro-sdk/issues/845)\n\n## Long Term Projects\n## Developer Ergonomics\nLower the barrier to entry for developers with non-mobile backgrounds that are interested in trying out Flutter and Hydro-SDK.\n- [☂️ Component Preview](https://github.com/hydro-sdk/hydro-sdk/issues/763)\n## Services\n### Registry\nA closed-source component registry for first-class support for hosting and running over-the-air (OTA) update packages built using the open-source Hydro-SDK. This service is already live as a basic [MVP](https://registry.hydro-sdk.io/#/).\n\n### Registry Value Adds\nIn the future, building paid features such as targeted distribution, analytics, feature flagging and logging directly into Registry are expected to be a viable path to monetization.\n\n### Language Support\nHydro-SDK is language agnostic. In the future, it should be possible to support authoring content in other programming languages to attract users from other ecosystems (Flixel, .NET, Xamarin).\n### Tier 1 (hot-reload, programmatic debugging, function maps)\n- [&check;] Typescript  \n    https://github.com/TypeScriptToLua/TypeScriptToLua\n### Tier 2 (hot-reload, programmatic debugging)\n- [ ] Haxe  \n    https://github.com/HaxeFoundation/haxe    \n- [ ] C#  \n    https://github.com/yanghuan/CSharp.lua \n\n# Prior Art for Common Flutter Runtime\n- Dartlua, Andre Lipke https://github.com/PixelToast/dartlua\n- React Native, Facebook https://reactnative.dev/\n- LuaViewSdk, Alibaba https://github.com/alibaba/LuaViewSDK\n- ILRuntime, Ourpalm https://github.com/Ourpalm/ILRuntime\n- Flutterscript, Charles Lowell https://github.com/cowboyd/flutterscript\n- Lisp in Dart, Suzuki Hisao https://github.com/nukata/lisp-in-dart\n- widget_extensions https://github.com/canewsin/widget_extensions\n- xamarin.flutter https://github.com/adamped/xamarin.flutter\n\n# Prior Art for Structured Wrapper and Interface generator for Dart\n- Dartle, https://docs.google.com/document/d/1Ei0ZIqdqNjxTHoGB3Ay6SWQg3DMSsKKWl70XoBUCFTA/edit\n- Pigeon, https://github.com/flutter/packages/tree/master/packages/pigeon\n- Djinni, https://github.com/dropbox/djinni\n- Uniffi-rs, https://github.com/mozilla/uniffi-rs\n- TS to CSharp, https://github.com/mono/TsToCSharp\n\n\n# Interesting Links and Resources\n- John C. Reynolds, Definitional Interpreters for Higher-Order Programming Languages https://surface.syr.edu/cgi/viewcontent.cgi?article=1012&context=lcsmith_other\n- Andrey Mokhov, Neil Mitchell, Simon Peyton Jones, Build Systems a la carte: Theory and Practice https://www.cambridge.org/core/journals/journal-of-functional-programming/article/build-systems-a-la-carte-theory-and-practice/097CE52C750E69BD16B78C318754C7A4\n- Fabio Mascarenhas de Queiroz, Optimized Compilation of a Dynamic Language to a Managed Runtime Environment http://www.lua.inf.puc-rio.br/publications/mascarenhas09optimized.pdf\n- Michael Schroder, Optimizing Lua Using Run-time Type Specialization https://www.complang.tuwien.ac.at/anton/praktika-fertig/schroeder/thesis.pdf\n- Satoru Kawahara, Optimizing Lua VM Bytecode Using Global Dataflow Analysis https://nymphium.github.io/pdf/opeth_report.pdf\n- Haichuan Wang, Compiler and Runtime Techniques for Optimizing Dynamic Scripting Languages https://www.ideals.illinois.edu/bitstream/handle/2142/78638/WANG-DISSERTATION-2015.pdf?sequence=1&isAllowed=y\n- Kevin Williams, Jason McCandless, David Gregg, Dynamic Interpretation for Dynamic Scripting Languages https://sites.cs.ucsb.edu/~ckrintz/papers/TCD-CS-2009-37.pdf\n- Dibyendu Majumdar, Ravi Lua 5.3 bytecode reference https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html\n- Kein-Hong Man, A No-Frills Introduction to Lua 5.1 VM Instructions http://luaforge.net/docman/83/98/ANoFrillsIntroToLua51VMInstructions.pdf\n- Rust Programming Language Request for Comments 2603, Symbol Name Mangling https://github.com/rust-lang/rfcs/blob/master/text/2603-rust-symbol-name-mangling-v0.md\n- Itanium C++ Application Binary Interface Specification https://itanium-cxx-abi.github.io/cxx-abi/abi.html\n- Yan Dong Zonz, Wen Hui-chao, Exploration and practice of Flutter packet size management https://tech.meituan.com/2020/09/18/flutter-in-meituan.html\n- Shangxian, Meituan takeaway Flutter dynamic practice https://tech.meituan.com/2020/06/23/meituan-flutter-flap.html\n- Vyacheslav Egorov, 10 Years of Dart (Slides)\n    https://mrale.ph/talks/vmil2020/\n","readmeFilename":"README.md","gitHead":"00430ce9f58d97452a2876bfc7757c129f352b94","_id":"@hydro-sdk/hydro-sdk@0.0.1-nightly.464","_nodeVersion":"16.14.1","_npmVersion":"8.5.0","dist":{"integrity":"sha512-R78Waf5zc711M/4gJBLeN3olkDW0nXeX9yzfoPOo6QAqblM+hRPb4xOi5ylP5EZn7+OvRfMLG5/7GuUEAShjBw==","shasum":"372ee40e2f2f2794f5e6d942643520c9c2f8cda3","tarball":"https://registry.npmjs.org/@hydro-sdk/hydro-sdk/-/hydro-sdk-0.0.1-nightly.464.tgz","fileCount":787,"unpackedSize":3502081,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiPF1qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqp2A//arWejNO62BaYuTM2zHIFJzBWTlDoSLzxETYbZQNPJCN8Lkwb\r\n8Ubk5rNk/+JNTUWCshHIDSOmSHUuFlKmlCtrpHGTentsHw9+b6pGQ6lwIGac\r\ntxlWqUhDlwi8gn02Gwrgjql2JliJ1nQUSnzDTvpr4DNnDzxuI5vto4nDxxtZ\r\nHIpZcQPE6412lAXVjopkryxzIloSYzY4Lli2O/psnc4SsRxejiDJY9ibNHEj\r\nkRsod7ZFFRQUge4oxI+ds/pfwJ0B2f8Zwyg1xcddNUNX82PKuF/AWIpJ8DDf\r\n8u7OAzsY7GQ6fY6VfzOVT0LMGzt2LlGoC1YCTGEae4yirDKG+DOQ4PJh09Ua\r\nRC6ExtvaYH4tekL+TiwNIyaprjNmY8Zmxjy1xVdC08xaecfgWbEUKlx8EexS\r\nDehmP+7IhffWTQi6rc4inb9ZOQtnXKs67P9W55VrsR6DbMoGucuSYq+IoxBx\r\nXhEfGpinWspVImeTqtdgHtcTtqIt0hV/PR0OINz5UJfKqTHekO3Rjz5EUDMI\r\nIuCM+xtZP7ClZQVi1cbu13nSqxot8BeKXppv9Q6PADOUoI5R3Eff/hCHOOyy\r\nkk5v61rN/QGUeqzU2IN5Oh5/GsVgVgH58kw928NbKVvo8u1bo7YX8DYl+NMX\r\n5niqrBVmeUo0Q5+et5rgMYYd+oxAhV+S2PA=\r\n=qsav\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICl1eqEYLWUIMHfuKXC7NAfu5dOxXF3hc+EpaEhVUbodAiAPp3r1kkwxWTgUeQliqi0qQooUpzRKa9MMDN7NV3jnvQ=="}]},"_npmUser":{"name":"chgibb","email":"chris.gibb@outlook.com"},"directories":{},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/hydro-sdk_0.0.1-nightly.464_1648123241956_0.4338323069154413"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-27T01:58:47.205Z","0.0.1-nightly.1":"2020-11-27T01:58:47.932Z","modified":"2022-04-05T18:52:09.935Z","0.0.1-nightly.2":"2020-11-27T02:11:27.303Z","0.0.1-nightly.3":"2020-11-29T18:04:29.721Z","0.0.1-nightly.4":"2020-11-30T22:04:04.338Z","0.0.1-nightly.5":"2020-12-01T01:25:15.879Z","0.0.1-nightly.6":"2020-12-03T22:20:49.090Z","0.0.1-nightly.7":"2020-12-03T23:03:21.630Z","0.0.1-nightly.8":"2020-12-05T00:26:44.077Z","0.0.1-nightly.9":"2020-12-05T00:38:07.595Z","0.0.1-nightly.10":"2020-12-05T00:41:38.970Z","0.0.1-nightly.11":"2020-12-05T00:53:21.550Z","0.0.1-nightly.12":"2020-12-05T00:58:49.058Z","0.0.1-nightly.13":"2020-12-05T01:03:23.540Z","0.0.1-nightly.14":"2020-12-05T01:09:18.216Z","0.0.1-nightly.15":"2020-12-05T01:13:34.574Z","0.0.1-nightly.16":"2020-12-05T16:40:29.253Z","0.0.1-nightly.17":"2020-12-06T02:56:43.183Z","0.0.1-nightly.18":"2020-12-06T03:31:48.892Z","0.0.1-nightly.19":"2020-12-06T03:42:31.699Z","0.0.1-nightly.20":"2020-12-06T06:41:17.855Z","0.0.1-nightly.21":"2020-12-06T07:25:46.034Z","0.0.1-nightly.22":"2020-12-06T17:45:45.273Z","0.0.1-nightly.23":"2020-12-07T11:14:27.125Z","0.0.1-nightly.24":"2020-12-08T00:42:32.640Z","0.0.1-nightly.25":"2020-12-08T14:02:12.338Z","0.0.1-nightly.26":"2020-12-08T22:14:11.281Z","0.0.1-nightly.27":"2020-12-09T01:55:49.513Z","0.0.1-nightly.28":"2020-12-10T22:21:35.412Z","0.0.1-nightly.29":"2020-12-12T16:26:34.347Z","0.0.1-nightly.30":"2020-12-12T18:33:17.411Z","0.0.1-nightly.31":"2020-12-12T18:57:01.756Z","0.0.1-nightly.32":"2020-12-13T02:16:20.501Z","0.0.1-nightly.33":"2020-12-13T04:04:23.744Z","0.0.1-nightly.34":"2020-12-13T19:17:01.616Z","0.0.1-nightly.35":"2020-12-13T19:20:50.153Z","0.0.1-nightly.36":"2020-12-13T19:26:00.838Z","0.0.1-nightly.37":"2020-12-16T00:35:47.012Z","0.0.1-nightly.38":"2020-12-16T01:30:08.997Z","0.0.1-nightly.39":"2020-12-18T04:58:35.271Z","0.0.1-nightly.40":"2020-12-18T23:01:01.649Z","0.0.1-nightly.41":"2020-12-22T01:17:53.808Z","0.0.1-nightly.42":"2020-12-22T15:17:38.031Z","0.0.1-nightly.43":"2020-12-22T15:24:53.912Z","0.0.1-nightly.44":"2020-12-22T21:36:02.835Z","0.0.1-nightly.45":"2020-12-22T21:53:20.640Z","0.0.1-nightly.46":"2020-12-22T22:41:45.740Z","0.0.1-nightly.47":"2020-12-24T20:06:24.980Z","0.0.1-nightly.48":"2020-12-27T02:27:21.159Z","0.0.1-nightly.49":"2020-12-27T02:32:40.277Z","0.0.1-nightly.50":"2020-12-27T04:23:45.434Z","0.0.1-nightly.51":"2020-12-31T15:59:44.345Z","0.0.1-nightly.52":"2021-01-01T20:02:06.353Z","0.0.1-nightly.53":"2021-01-04T23:39:43.665Z","0.0.1-nightly.54":"2021-01-05T03:33:02.048Z","0.0.1-nightly.55":"2021-01-05T03:38:40.037Z","0.0.1-nightly.56":"2021-01-05T03:45:46.185Z","0.0.1-nightly.57":"2021-01-05T03:50:01.155Z","0.0.1-nightly.58":"2021-01-05T03:51:56.291Z","0.0.1-nightly.59":"2021-01-08T04:24:45.684Z","0.0.1-nightly.60":"2021-01-09T04:20:39.400Z","0.0.1-nightly.61":"2021-01-09T04:22:37.802Z","0.0.1-nightly.62":"2021-01-09T04:44:09.778Z","0.0.1-nightly.63":"2021-01-10T14:44:51.944Z","0.0.1-nightly.64":"2021-01-10T15:55:52.324Z","0.0.1-nightly.65":"2021-01-10T19:44:47.537Z","0.0.1-nightly.66":"2021-01-11T22:31:09.764Z","0.0.1-nightly.67":"2021-01-12T01:16:10.623Z","0.0.1-nightly.68":"2021-01-12T05:35:05.344Z","0.0.1-nightly.69":"2021-01-13T00:04:31.099Z","0.0.1-nightly.70":"2021-01-13T00:36:23.996Z","0.0.1-nightly.71":"2021-01-13T02:15:12.226Z","0.0.1-nightly.72":"2021-01-13T04:38:55.386Z","0.0.1-nightly.73":"2021-01-14T02:20:49.069Z","0.0.1-nightly.74":"2021-01-14T03:24:19.651Z","0.0.1-nightly.75":"2021-01-14T22:36:13.147Z","0.0.1-nightly.76":"2021-01-15T00:37:59.205Z","0.0.1-nightly.77":"2021-01-15T03:56:30.525Z","0.0.1-nightly.78":"2021-01-16T04:16:57.005Z","0.0.1-nightly.79":"2021-01-16T15:07:25.779Z","0.0.1-nightly.80":"2021-01-16T18:03:43.096Z","0.0.1-nightly.81":"2021-01-16T20:29:57.354Z","0.0.1-nightly.82":"2021-01-17T14:30:05.342Z","0.0.1-nightly.83":"2021-01-17T18:03:29.157Z","0.0.1-nightly.84":"2021-01-18T13:01:07.709Z","0.0.1-nightly.85":"2021-01-18T22:45:13.483Z","0.0.1-nightly.86":"2021-01-19T01:06:55.205Z","0.0.1-nightly.87":"2021-01-19T04:15:57.125Z","0.0.1-nightly.88":"2021-01-20T00:52:27.276Z","0.0.1-nightly.89":"2021-01-20T02:37:35.816Z","0.0.1-nightly.90":"2021-01-20T04:11:58.257Z","0.0.1-nightly.91":"2021-01-20T04:17:00.140Z","0.0.1-nightly.92":"2021-01-20T04:21:10.880Z","0.0.1-nightly.93":"2021-01-21T02:25:16.272Z","0.0.1-nightly.94":"2021-01-28T13:47:55.644Z","0.0.1-nightly.95":"2021-01-30T03:08:05.249Z","0.0.1-nightly.96":"2021-01-31T17:55:49.078Z","0.0.1-nightly.97":"2021-02-01T13:44:29.176Z","0.0.1-nightly.98":"2021-02-04T00:32:34.288Z","0.0.1-nightly.99":"2021-02-06T04:08:56.975Z","0.0.1-nightly.100":"2021-02-08T03:08:49.603Z","0.0.1-nightly.101":"2021-02-09T13:46:42.819Z","0.0.1-nightly.102":"2021-02-12T13:02:09.234Z","0.0.1-nightly.103":"2021-02-14T21:32:06.371Z","0.0.1-nightly.104":"2021-02-17T13:35:30.979Z","0.0.1-nightly.105":"2021-02-17T22:36:06.329Z","0.0.1-nightly.106":"2021-02-18T03:45:35.011Z","0.0.1-nightly.107":"2021-02-19T01:48:46.464Z","0.0.1-nightly.108":"2021-02-20T01:08:44.340Z","0.0.1-nightly.109":"2021-02-20T04:32:42.279Z","0.0.1-nightly.110":"2021-02-22T04:10:55.433Z","0.0.1-nightly.111":"2021-02-22T23:34:11.098Z","0.0.1-nightly.112":"2021-02-23T01:15:18.009Z","0.0.1-nightly.113":"2021-02-23T01:21:02.675Z","0.0.1-nightly.114":"2021-02-23T01:21:24.743Z","0.0.1-nightly.115":"2021-02-23T03:33:45.707Z","0.0.1-nightly.116":"2021-02-23T03:40:17.638Z","0.0.1-nightly.117":"2021-02-24T22:02:44.022Z","0.0.1-nightly.118":"2021-02-25T03:32:45.837Z","0.0.1-nightly.119":"2021-03-01T22:16:27.229Z","0.0.1-nightly.120":"2021-03-03T00:54:35.995Z","0.0.1-nightly.121":"2021-03-03T22:17:02.974Z","0.0.1-nightly.122":"2021-03-04T01:32:09.432Z","0.0.1-nightly.123":"2021-03-05T04:18:38.168Z","0.0.1-nightly.124":"2021-03-07T15:24:42.214Z","0.0.1-nightly.125":"2021-03-08T22:48:31.632Z","0.0.1-nightly.126":"2021-03-08T22:58:51.311Z","0.0.1-nightly.127":"2021-03-08T23:07:24.257Z","0.0.1-nightly.128":"2021-03-10T00:57:05.666Z","0.0.1-nightly.129":"2021-03-13T03:16:32.521Z","0.0.1-nightly.130":"2021-03-14T01:14:54.361Z","0.0.1-nightly.131":"2021-03-14T03:40:54.538Z","0.0.1-nightly.132":"2021-03-14T12:59:32.060Z","0.0.1-nightly.133":"2021-03-14T15:07:31.823Z","0.0.1-nightly.134":"2021-03-14T16:37:09.402Z","0.0.1-nightly.135":"2021-03-15T19:44:13.858Z","0.0.1-nightly.136":"2021-03-16T00:16:39.719Z","0.0.1-nightly.137":"2021-03-16T01:38:33.855Z","0.0.1-nightly.138":"2021-03-16T02:54:47.214Z","0.0.1-nightly.139":"2021-03-16T03:11:03.272Z","0.0.1-nightly.140":"2021-03-16T03:33:52.424Z","0.0.1-nightly.141":"2021-03-16T03:46:04.206Z","0.0.1-nightly.142":"2021-03-16T14:05:08.875Z","0.0.1-nightly.143":"2021-03-16T14:22:42.220Z","0.0.1-nightly.144":"2021-03-16T14:50:46.304Z","0.0.1-nightly.145":"2021-03-16T16:12:31.833Z","0.0.1-nightly.146":"2021-03-16T18:08:47.441Z","0.0.1-nightly.147":"2021-03-16T18:42:28.686Z","0.0.1-nightly.148":"2021-03-16T20:14:33.408Z","0.0.1-nightly.149":"2021-03-17T14:42:46.870Z","0.0.1-nightly.150":"2021-03-17T17:49:34.546Z","0.0.1-nightly.151":"2021-03-17T22:04:58.487Z","0.0.1-nightly.152":"2021-03-18T02:24:16.090Z","0.0.1-nightly.153":"2021-03-18T21:20:03.772Z","0.0.1-nightly.154":"2021-03-18T21:34:45.939Z","0.0.1-nightly.155":"2021-03-18T23:05:42.400Z","0.0.1-nightly.156":"2021-03-19T02:59:10.056Z","0.0.1-nightly.157":"2021-03-20T00:15:37.980Z","0.0.1-nightly.158":"2021-03-20T17:49:46.191Z","0.0.1-nightly.159":"2021-03-21T05:08:04.817Z","0.0.1-nightly.160":"2021-03-21T14:15:18.512Z","0.0.1-nightly.161":"2021-03-21T15:05:22.012Z","0.0.1-nightly.162":"2021-03-21T22:41:46.674Z","0.0.1-nightly.163":"2021-03-22T03:36:15.619Z","0.0.1-nightly.164":"2021-03-22T21:22:38.436Z","0.0.1-nightly.165":"2021-03-22T22:31:51.806Z","0.0.1-nightly.166":"2021-03-23T01:24:48.214Z","0.0.1-nightly.167":"2021-03-23T03:02:56.309Z","0.0.1-nightly.168":"2021-03-23T13:28:44.238Z","0.0.1-nightly.169":"2021-03-23T21:45:09.039Z","0.0.1-nightly.170":"2021-03-23T23:32:57.681Z","0.0.1-nightly.171":"2021-03-24T03:23:01.198Z","0.0.1-nightly.172":"2021-03-24T05:10:02.940Z","0.0.1-nightly.173":"2021-03-24T12:17:05.256Z","0.0.1-nightly.174":"2021-03-24T21:30:35.161Z","0.0.1-nightly.175":"2021-03-24T23:42:18.551Z","0.0.1-nightly.176":"2021-03-25T08:01:25.190Z","0.0.1-nightly.177":"2021-03-25T12:19:34.180Z","0.0.1-nightly.178":"2021-03-25T14:56:26.314Z","0.0.1-nightly.179":"2021-03-26T00:39:50.490Z","0.0.1-nightly.180":"2021-03-26T11:37:49.545Z","0.0.1-nightly.181":"2021-03-26T14:36:21.241Z","0.0.1-nightly.182":"2021-03-26T22:24:14.473Z","0.0.1-nightly.183":"2021-03-27T01:15:31.071Z","0.0.1-nightly.184":"2021-03-27T03:54:58.051Z","0.0.1-nightly.185":"2021-03-28T01:38:39.809Z","0.0.1-nightly.186":"2021-03-28T04:16:59.718Z","0.0.1-nightly.187":"2021-03-28T16:22:17.815Z","0.0.1-nightly.188":"2021-03-28T20:28:30.448Z","0.0.1-nightly.189":"2021-03-29T03:50:48.411Z","0.0.1-nightly.190":"2021-03-29T12:16:59.626Z","0.0.1-nightly.191":"2021-04-01T21:18:54.850Z","0.0.1-nightly.192":"2021-04-03T16:51:02.100Z","0.0.1-nightly.193":"2021-04-03T21:13:32.654Z","0.0.1-nightly.194":"2021-04-04T00:15:39.156Z","0.0.1-nightly.195":"2021-04-04T22:49:17.047Z","0.0.1-nightly.196":"2021-04-06T02:26:39.438Z","0.0.1-nightly.197":"2021-04-09T11:18:26.221Z","0.0.1-nightly.198":"2021-04-10T00:23:36.830Z","0.0.1-nightly.199":"2021-04-12T11:13:23.468Z","0.0.1-nightly.200":"2021-04-13T11:16:08.276Z","0.0.1-nightly.201":"2021-04-15T11:13:51.486Z","0.0.1-nightly.202":"2021-04-23T03:28:38.750Z","0.0.1-nightly.203":"2021-04-23T11:42:48.706Z","0.0.1-nightly.204":"2021-04-23T22:20:01.078Z","0.0.1-nightly.205":"2021-04-24T00:34:48.294Z","0.0.1-nightly.206":"2021-04-24T11:16:11.315Z","0.0.1-nightly.207":"2021-04-25T19:58:37.661Z","0.0.1-nightly.208":"2021-04-27T21:13:49.543Z","0.0.1-nightly.209":"2021-04-29T01:53:57.115Z","0.0.1-nightly.210":"2021-04-29T11:59:06.244Z","0.0.1-nightly.211":"2021-04-29T16:03:41.080Z","0.0.1-nightly.212":"2021-04-29T18:29:06.172Z","0.0.1-nightly.213":"2021-05-04T11:53:29.883Z","0.0.1-nightly.214":"2021-05-04T22:43:00.822Z","0.0.1-nightly.215":"2021-05-05T00:58:45.373Z","0.0.1-nightly.216":"2021-05-05T02:17:54.975Z","0.0.1-nightly.217":"2021-05-05T03:13:12.297Z","0.0.1-nightly.218":"2021-05-05T22:17:29.169Z","0.0.1-nightly.219":"2021-05-06T00:09:02.089Z","0.0.1-nightly.220":"2021-05-07T01:50:56.066Z","0.0.1-nightly.221":"2021-05-07T02:50:27.082Z","0.0.1-nightly.222":"2021-05-07T05:46:09.608Z","0.0.1-nightly.223":"2021-05-08T14:33:56.575Z","0.0.1-nightly.224":"2021-05-08T17:59:34.279Z","0.0.1-nightly.225":"2021-05-08T21:01:17.222Z","0.0.1-nightly.226":"2021-05-10T01:23:41.674Z","0.0.1-nightly.227":"2021-05-10T11:55:49.470Z","0.0.1-nightly.228":"2021-05-10T21:18:29.896Z","0.0.1-nightly.229":"2021-05-11T21:13:46.913Z","0.0.1-nightly.230":"2021-05-14T00:02:59.816Z","0.0.1-nightly.231":"2021-05-16T18:43:53.233Z","0.0.1-nightly.232":"2021-05-19T00:56:26.803Z","0.0.1-nightly.233":"2021-05-20T03:39:16.648Z","0.0.1-nightly.234":"2021-05-21T02:00:39.109Z","0.0.1-nightly.235":"2021-05-22T17:56:21.746Z","0.0.1-nightly.236":"2021-05-25T03:10:44.039Z","0.0.1-nightly.237":"2021-05-28T01:40:34.680Z","0.0.1-nightly.238":"2021-05-28T21:47:43.785Z","0.0.1-nightly.239":"2021-05-29T14:35:03.363Z","0.0.1-nightly.240":"2021-05-30T00:29:27.110Z","0.0.1-nightly.241":"2021-06-04T03:05:33.377Z","0.0.1-nightly.242":"2021-06-05T11:32:59.215Z","0.0.1-nightly.243":"2021-06-05T17:42:58.182Z","0.0.1-nightly.244":"2021-06-08T12:28:00.099Z","0.0.1-nightly.245":"2021-06-08T23:05:33.852Z","0.0.1-nightly.246":"2021-06-10T11:55:40.084Z","0.0.1-nightly.247":"2021-06-16T11:48:45.472Z","0.0.1-nightly.248":"2021-06-17T12:25:15.994Z","0.0.1-nightly.249":"2021-06-23T01:06:05.942Z","0.0.1-nightly.250":"2021-06-23T13:12:10.120Z","0.0.1-nightly.251":"2021-06-24T22:14:54.852Z","0.0.1-nightly.252":"2021-06-25T01:17:24.275Z","0.0.1-nightly.253":"2021-06-25T13:00:49.855Z","0.0.1-nightly.254":"2021-06-25T22:08:56.992Z","0.0.1-nightly.255":"2021-06-26T00:22:41.819Z","0.0.1-nightly.256":"2021-06-26T22:05:14.496Z","0.0.1-nightly.257":"2021-06-27T10:45:26.210Z","0.0.1-nightly.258":"2021-06-27T13:49:02.072Z","0.0.1-nightly.259":"2021-06-27T21:37:58.360Z","0.0.1-nightly.260":"2021-06-28T00:57:59.815Z","0.0.1-nightly.261":"2021-06-28T03:28:15.444Z","0.0.1-nightly.262":"2021-06-28T09:32:44.063Z","0.0.1-nightly.263":"2021-06-28T22:22:16.572Z","0.0.1-nightly.264":"2021-06-29T01:05:26.722Z","0.0.1-nightly.265":"2021-06-29T03:16:33.194Z","0.0.1-nightly.266":"2021-07-02T12:22:24.740Z","0.0.1-nightly.267":"2021-07-05T11:09:50.116Z","0.0.1-nightly.268":"2021-07-07T16:13:56.059Z","0.0.1-nightly.269":"2021-07-08T01:17:12.249Z","0.0.1-nightly.270":"2021-07-08T13:20:06.393Z","0.0.1-nightly.271":"2021-07-08T18:48:52.460Z","0.0.1-nightly.272":"2021-07-09T01:43:14.242Z","0.0.1-nightly.273":"2021-07-09T14:34:34.875Z","0.0.1-nightly.274":"2021-07-10T01:40:41.548Z","0.0.1-nightly.275":"2021-07-10T17:51:22.804Z","0.0.1-nightly.276":"2021-07-11T01:29:27.245Z","0.0.1-nightly.277":"2021-07-11T12:09:25.470Z","0.0.1-nightly.278":"2021-07-11T18:50:20.628Z","0.0.1-nightly.279":"2021-07-11T23:59:01.232Z","0.0.1-nightly.280":"2021-07-12T04:35:45.133Z","0.0.1-nightly.281":"2021-07-12T12:07:26.634Z","0.0.1-nightly.282":"2021-07-12T15:49:10.981Z","0.0.1-nightly.283":"2021-07-13T14:35:11.423Z","0.0.1-nightly.284":"2021-07-13T19:20:29.638Z","0.0.1-nightly.285":"2021-07-13T22:54:10.580Z","0.0.1-nightly.286":"2021-07-14T13:04:10.793Z","0.0.1-nightly.287":"2021-07-14T18:46:12.375Z","0.0.1-nightly.288":"2021-07-15T18:35:31.003Z","0.0.1-nightly.289":"2021-07-16T01:27:26.527Z","0.0.1-nightly.290":"2021-07-16T02:12:04.439Z","0.0.1-nightly.291":"2021-07-16T03:26:35.668Z","0.0.1-alpha.0":"2021-07-16T03:44:03.031Z","0.0.1-nightly.292":"2021-07-18T01:55:40.379Z","0.0.1-nightly.293":"2021-07-20T00:16:08.430Z","0.0.1-nightly.294":"2021-07-22T01:21:55.453Z","0.0.1-nightly.295":"2021-07-22T12:33:13.006Z","0.0.1-nightly.296":"2021-07-23T12:38:37.027Z","0.0.1-nightly.297":"2021-07-26T21:46:30.031Z","0.0.1-nightly.298":"2021-07-27T12:05:45.434Z","0.0.1-nightly.299":"2021-07-29T21:35:53.710Z","0.0.1-nightly.300":"2021-07-31T15:22:10.673Z","0.0.1-nightly.301":"2021-08-01T03:11:01.831Z","0.0.1-nightly.302":"2021-08-02T15:16:49.176Z","0.0.1-nightly.303":"2021-08-03T10:56:27.937Z","0.0.1-nightly.304":"2021-08-04T01:36:04.366Z","0.0.1-nightly.305":"2021-08-05T11:14:06.321Z","0.0.1-nightly.306":"2021-08-05T21:11:11.327Z","0.0.1-nightly.307":"2021-08-06T12:46:44.329Z","0.0.1-nightly.308":"2021-08-13T01:37:09.868Z","0.0.1-nightly.309":"2021-08-13T22:08:54.968Z","0.0.1-nightly.310":"2021-08-14T11:42:46.787Z","0.0.1-nightly.311":"2021-08-14T13:46:19.690Z","0.0.1-nightly.312":"2021-08-20T04:45:07.033Z","0.0.1-nightly.313":"2021-08-21T16:40:06.208Z","0.0.1-nightly.314":"2021-08-21T20:33:23.292Z","0.0.1-nightly.315":"2021-08-21T23:23:36.159Z","0.0.1-nightly.316":"2021-08-24T02:01:18.703Z","0.0.1-nightly.317":"2021-08-26T12:57:10.660Z","0.0.1-nightly.318":"2021-08-31T03:45:39.736Z","0.0.1-nightly.319":"2021-09-01T12:17:16.119Z","0.0.1-nightly.320":"2021-09-03T02:36:24.382Z","0.0.1-nightly.321":"2021-09-06T11:08:40.864Z","0.0.1-nightly.322":"2021-09-07T11:03:42.713Z","0.0.1-nightly.323":"2021-09-08T23:33:02.356Z","0.0.1-nightly.324":"2021-09-09T04:48:02.811Z","0.0.1-nightly.325":"2021-09-10T11:13:54.337Z","0.0.1-nightly.326":"2021-09-11T11:41:00.066Z","0.0.1-nightly.327":"2021-09-12T18:06:47.147Z","0.0.1-nightly.328":"2021-09-13T09:05:04.827Z","0.0.1-nightly.329":"2021-09-13T12:02:34.743Z","0.0.1-nightly.330":"2021-09-13T14:23:53.300Z","0.0.1-nightly.331":"2021-09-13T22:16:37.308Z","0.0.1-nightly.332":"2021-09-14T11:27:36.485Z","0.0.1-nightly.333":"2021-09-15T11:48:05.467Z","0.0.1-nightly.334":"2021-09-16T08:54:37.222Z","0.0.1-nightly.335":"2021-09-17T12:12:30.415Z","0.0.1-nightly.336":"2021-09-17T21:52:20.402Z","0.0.1-nightly.337":"2021-09-18T02:08:29.726Z","0.0.1-nightly.338":"2021-09-18T13:02:38.384Z","0.0.1-nightly.339":"2021-09-19T00:09:58.664Z","0.0.1-nightly.340":"2021-09-19T17:26:42.826Z","0.0.1-nightly.341":"2021-09-20T08:54:40.835Z","0.0.1-nightly.342":"2021-09-20T11:23:44.272Z","0.0.1-nightly.343":"2021-09-21T11:55:12.504Z","0.0.1-nightly.344":"2021-09-22T02:38:25.819Z","0.0.1-nightly.345":"2021-09-22T11:41:36.847Z","0.0.1-nightly.346":"2021-09-24T14:10:48.870Z","0.0.1-nightly.347":"2021-09-25T01:58:19.775Z","0.0.1-nightly.348":"2021-09-26T12:21:31.966Z","0.0.1-nightly.349":"2021-09-27T12:20:20.925Z","0.0.1-nightly.350":"2021-09-28T00:09:53.609Z","0.0.1-nightly.351":"2021-09-30T15:15:06.463Z","0.0.1-nightly.352":"2021-10-03T18:50:17.505Z","0.0.1-nightly.353":"2021-10-04T08:51:25.974Z","0.0.1-nightly.354":"2021-10-04T12:54:21.550Z","0.0.1-nightly.355":"2021-10-05T10:34:51.218Z","0.0.1-nightly.356":"2021-10-06T11:31:24.056Z","0.0.1-nightly.357":"2021-10-06T21:52:26.710Z","0.0.1-nightly.358":"2021-10-07T23:36:39.917Z","0.0.1-nightly.359":"2021-10-10T22:09:52.844Z","0.0.1-nightly.360":"2021-10-11T15:04:08.087Z","0.0.1-nightly.361":"2021-10-13T08:50:07.678Z","0.0.1-nightly.362":"2021-10-14T12:41:57.207Z","0.0.1-nightly.363":"2021-10-14T21:50:55.380Z","0.0.1-nightly.364":"2021-10-15T09:02:16.096Z","0.0.1-nightly.365":"2021-10-15T12:54:30.366Z","0.0.1-nightly.366":"2021-10-16T15:57:31.578Z","0.0.1-nightly.367":"2021-10-17T15:00:31.238Z","0.0.1-nightly.368":"2021-10-18T09:37:04.181Z","0.0.1-nightly.369":"2021-10-18T15:48:19.684Z","0.0.1-nightly.370":"2021-10-19T03:11:49.381Z","0.0.1-nightly.371":"2021-10-19T11:51:15.036Z","0.0.1-nightly.372":"2021-10-20T12:17:44.275Z","0.0.1-nightly.373":"2021-10-20T22:16:30.245Z","0.0.1-nightly.374":"2021-10-21T12:15:12.614Z","0.0.1-nightly.375":"2021-10-21T22:16:01.553Z","0.0.1-nightly.376":"2021-10-22T22:05:04.008Z","0.0.1-nightly.377":"2021-10-23T22:46:59.621Z","0.0.1-nightly.378":"2021-10-25T11:36:31.648Z","0.0.1-nightly.379":"2021-10-26T11:11:54.556Z","0.0.1-nightly.380":"2021-10-27T11:23:36.947Z","0.0.1-nightly.381":"2021-10-28T09:01:40.268Z","0.0.1-nightly.382":"2021-10-29T00:35:30.590Z","0.0.1-nightly.383":"2021-10-30T01:51:46.534Z","0.0.1-nightly.384":"2021-11-01T12:43:53.417Z","0.0.1-nightly.385":"2021-11-03T12:35:14.990Z","0.0.1-nightly.386":"2021-11-09T09:50:49.182Z","0.0.1-nightly.387":"2021-11-09T12:07:15.477Z","0.0.1-nightly.388":"2021-11-11T13:52:06.901Z","0.0.1-nightly.389":"2021-11-11T22:10:18.621Z","0.0.1-nightly.390":"2021-11-12T14:09:36.904Z","0.0.1-nightly.391":"2021-11-12T23:21:53.836Z","0.0.1-nightly.392":"2021-11-15T14:44:15.767Z","0.0.1-nightly.393":"2021-11-16T13:50:35.267Z","0.0.1-nightly.394":"2021-11-19T01:44:33.786Z","0.0.1-nightly.395":"2021-11-19T12:58:49.494Z","0.0.1-nightly.396":"2021-11-20T11:16:22.318Z","0.0.1-nightly.397":"2021-11-22T23:18:04.211Z","0.0.1-nightly.398":"2021-11-25T02:06:55.089Z","0.0.1-nightly.399":"2021-11-25T14:41:35.004Z","0.0.1-nightly.400":"2021-11-26T13:46:52.330Z","0.0.1-nightly.401":"2021-11-26T22:47:25.406Z","0.0.1-nightly.402":"2021-11-30T15:47:26.190Z","0.0.1-nightly.403":"2021-12-01T13:39:12.510Z","0.0.1-nightly.404":"2021-12-02T23:01:45.405Z","0.0.1-nightly.405":"2021-12-04T21:32:58.677Z","0.0.1-nightly.406":"2021-12-06T22:14:50.781Z","0.0.1-nightly.407":"2021-12-08T22:30:09.048Z","0.0.1-nightly.408":"2021-12-09T14:00:06.608Z","0.0.1-nightly.409":"2021-12-12T19:02:14.851Z","0.0.1-nightly.410":"2021-12-13T13:34:37.397Z","0.0.1-nightly.411":"2021-12-15T14:15:12.154Z","0.0.1-nightly.412":"2021-12-17T16:02:59.731Z","0.0.1-nightly.413":"2021-12-18T15:26:06.754Z","0.0.1-nightly.414":"2021-12-19T13:37:21.117Z","0.0.1-nightly.415":"2021-12-22T17:38:29.032Z","0.0.1-nightly.416":"2021-12-24T18:46:39.072Z","0.0.1-nightly.417":"2021-12-27T19:12:54.501Z","0.0.1-nightly.418":"2021-12-29T22:50:44.209Z","0.0.1-nightly.419":"2021-12-31T04:29:38.919Z","0.0.1-nightly.420":"2021-12-31T14:16:57.318Z","0.0.1-nightly.421":"2022-01-01T17:21:51.241Z","0.0.1-nightly.422":"2022-01-02T15:35:51.088Z","0.0.1-nightly.423":"2022-01-03T10:26:48.156Z","0.0.1-nightly.424":"2022-01-03T21:47:29.167Z","0.0.1-nightly.425":"2022-01-05T04:52:48.604Z","0.0.1-nightly.426":"2022-01-05T12:39:13.658Z","0.0.1-nightly.427":"2022-01-05T22:40:40.756Z","0.0.1-nightly.428":"2022-01-08T16:12:27.087Z","0.0.1-nightly.429":"2022-01-10T22:43:41.375Z","0.0.1-nightly.430":"2022-01-11T13:15:34.022Z","0.0.1-nightly.431":"2022-01-12T11:48:56.698Z","0.0.1-nightly.432":"2022-01-14T11:56:02.178Z","0.0.1-nightly.433":"2022-01-14T23:13:03.298Z","0.0.1-nightly.434":"2022-01-15T12:29:49.521Z","0.0.1-nightly.435":"2022-01-16T15:01:52.900Z","0.0.1-nightly.436":"2022-01-18T11:57:17.904Z","0.0.1-nightly.437":"2022-01-19T12:58:38.343Z","0.0.1-nightly.438":"2022-01-19T23:14:29.829Z","0.0.1-nightly.439":"2022-01-20T12:24:43.293Z","0.0.1-nightly.440":"2022-01-21T14:45:59.334Z","0.0.1-nightly.441":"2022-01-23T18:24:40.854Z","0.0.1-nightly.442":"2022-01-26T12:08:11.297Z","0.0.1-nightly.443":"2022-01-27T12:03:11.080Z","0.0.1-nightly.444":"2022-01-28T12:04:06.867Z","0.0.1-nightly.445":"2022-01-29T16:04:10.938Z","0.0.1-nightly.446":"2022-02-02T13:06:07.116Z","0.0.1-nightly.447":"2022-02-03T00:00:30.003Z","0.0.1-nightly.448":"2022-02-03T16:22:36.046Z","0.0.1-nightly.449":"2022-02-08T13:17:03.121Z","0.0.1-nightly.450":"2022-02-09T10:46:57.962Z","0.0.1-nightly.451":"2022-02-11T11:31:15.927Z","0.0.1-nightly.452":"2022-02-11T16:53:38.598Z","0.0.1-nightly.453":"2022-02-14T13:17:34.327Z","0.0.1-nightly.454":"2022-02-15T13:32:03.817Z","0.0.1-nightly.455":"2022-02-16T16:42:05.020Z","0.0.1-nightly.456":"2022-02-21T18:52:41.502Z","0.0.1-nightly.457":"2022-02-23T13:17:43.701Z","0.0.1-nightly.458":"2022-02-24T13:48:18.582Z","0.0.1-nightly.459":"2022-02-25T13:24:07.240Z","0.0.1-nightly.460":"2022-03-11T13:01:45.161Z","0.0.1-nightly.461":"2022-03-17T12:28:54.502Z","0.0.1-nightly.462":"2022-03-22T18:36:22.947Z","0.0.1-nightly.463":"2022-03-23T12:45:51.840Z","0.0.1-nightly.464":"2022-03-24T12:00:42.157Z"},"maintainers":[{"name":"chgibb","email":"chris.gibb@outlook.com"}],"description":"A new Flutter project.","license":"ISC","readme":"","readmeFilename":""}