diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-02-23T08·00+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-02-23T08·08+0000 |
commit | 782cfa9e3372d0cfe13471597968d58deb181e71 (patch) | |
tree | 590d43f902e8ce560a26781732df87105a19b9e9 /corp/tvixbolt | |
parent | 91d5745c3dbb3eb118be969a80e0608794b0e59d (diff) |
chore(tvixbolt): move from //corp to //web r/7595
Assigning copyright to the TVL community (whatever that is), and adding AGPL-3.0-or-later license. I also cleaned up some of the stuff on the landing page. Change-Id: I4dbca19406e00e5105fed50e8fb64e0fcca23e3a Reviewed-on: https://cl.tvl.fyi/c/depot/+/11013 Autosubmit: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
Diffstat (limited to 'corp/tvixbolt')
-rw-r--r-- | corp/tvixbolt/.gitignore | 2 | ||||
-rw-r--r-- | corp/tvixbolt/Cargo.lock | 1103 | ||||
-rw-r--r-- | corp/tvixbolt/Cargo.toml | 26 | ||||
-rw-r--r-- | corp/tvixbolt/default.nix | 74 | ||||
-rw-r--r-- | corp/tvixbolt/index.css | 7 | ||||
-rw-r--r-- | corp/tvixbolt/index.html | 15 | ||||
-rw-r--r-- | corp/tvixbolt/src/main.rs | 337 |
7 files changed, 0 insertions, 1564 deletions
diff --git a/corp/tvixbolt/.gitignore b/corp/tvixbolt/.gitignore deleted file mode 100644 index 77fdd3e5cfc1..000000000000 --- a/corp/tvixbolt/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -dist diff --git a/corp/tvixbolt/Cargo.lock b/corp/tvixbolt/Cargo.lock deleted file mode 100644 index 7c7afb63f95b..000000000000 --- a/corp/tvixbolt/Cargo.lock +++ /dev/null @@ -1,1103 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" - -[[package]] -name = "bitmaps" -version = "3.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "703642b98a00b3b90513279a8ede3fcfa479c126c5fb46e78f3051522f021403" - -[[package]] -name = "boolinator" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfa8873f51c92e232f9bac4065cddef41b714152812bfc5f7672ba16d6ef8cd9" - -[[package]] -name = "bstr" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" -dependencies = [ - "memchr", - "regex-automata", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "codemap" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e769b5c8c8283982a987c6e948e540254f1058d5a74b8794914d4ef5fc2a24" - -[[package]] -name = "codemap-diagnostic" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc20770be05b566a963bf91505e60412c4a2d016d1ef95c5512823bb085a8122" -dependencies = [ - "codemap", - "termcolor", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "countme" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636" - -[[package]] -name = "dirs" -version = "4.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" -dependencies = [ - "libc", - "redox_users", - "winapi", -] - -[[package]] -name = "either" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "genawaiter" -version = "0.99.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86bd0361bcbde39b13475e6e36cb24c329964aa2611be285289d1e4b751c1a0" -dependencies = [ - "genawaiter-macro", -] - -[[package]] -name = "genawaiter-macro" -version = "0.99.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b32dfe1fdfc0bbde1f22a5da25355514b5e450c33a6af6770884c8750aedfbc" - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gloo" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23947965eee55e3e97a5cd142dd4c10631cc349b48cecca0ed230fd296f568cd" -dependencies = [ - "gloo-console", - "gloo-dialogs", - "gloo-events", - "gloo-file", - "gloo-render", - "gloo-storage", - "gloo-timers", - "gloo-utils", -] - -[[package]] -name = "gloo-console" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b7ce3c05debe147233596904981848862b068862e9ec3e34be446077190d3f" -dependencies = [ - "gloo-utils", - "js-sys", - "serde", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-dialogs" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67062364ac72d27f08445a46cab428188e2e224ec9e37efdba48ae8c289002e6" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-events" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b107f8abed8105e4182de63845afcc7b69c098b7852a813ea7462a320992fc" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-file" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d5564e570a38b43d78bdc063374a0c3098c4f0d64005b12f9bbe87e869b6d7" -dependencies = [ - "futures-channel", - "gloo-events", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-render" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd9306aef67cfd4449823aadcd14e3958e0800aa2183955a309112a84ec7764" -dependencies = [ - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-storage" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6ab60bf5dbfd6f0ed1f7843da31b41010515c745735c970e821945ca91e480" -dependencies = [ - "gloo-utils", - "js-sys", - "serde", - "serde_json", - "thiserror", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "gloo-utils" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037fcb07216cb3a30f7292bd0176b050b7b9a052ba830ef7d5d65f6dc64ba58e" -dependencies = [ - "js-sys", - "serde", - "serde_json", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "imbl" -version = "2.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978d142c8028edf52095703af2fad11d6f611af1246685725d6b850634647085" -dependencies = [ - "bitmaps", - "imbl-sized-chunks", - "rand_core", - "rand_xoshiro", - "serde", - "version_check", -] - -[[package]] -name = "imbl-sized-chunks" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6957ea0b2541c5ca561d3ef4538044af79f8a05a1eb3a3b148936aaceaa1076" -dependencies = [ - "bitmaps", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "itertools" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lexical-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-parse-integer" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-util" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "lexical-write-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] - -[[package]] -name = "lexical-write-integer" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.152" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.1", - "libc", - "redox_syscall", -] - -[[package]] -name = "log" -version = "0.4.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - -[[package]] -name = "nom8" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "os_str_bytes" -version = "6.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" -dependencies = [ - "memchr", -] - -[[package]] -name = "path-clean" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecba01bf2678719532c5e3059e0b5f0811273d94b397088b82e3bd0a78c78fdd" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95fc56cda0b5c3325f5fbbd7ff9fda9e02bb00bb3dac51252d2f1bfa1cb8cc8c" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "rnix" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb35cedbeb70e0ccabef2a31bcff0aebd114f19566086300b8f42c725fc2cb5f" -dependencies = [ - "rowan", -] - -[[package]] -name = "route-recognizer" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afab94fb28594581f62d981211a9a4d53cc8130bbcbbb89a0440d9b8e81a7746" - -[[package]] -name = "rowan" -version = "0.15.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a58fa8a7ccff2aec4f39cc45bf5f985cec7125ab271cf681c279fd00192b49" -dependencies = [ - "countme", - "hashbrown 0.14.3", - "memoffset", - "rustc-hash", - "text-size", -] - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "ryu" -version = "1.0.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" - -[[package]] -name = "scoped-tls-hkt" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ddc765d3410d9f6c6ca071bf0b67f6b01e3ec4595dc3892f02677e75819dddc" - -[[package]] -name = "serde" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde-wasm-bindgen" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "618365e8e586c22123d692b72a7d791d5ee697817b65a218cdf12a98870af0f7" -dependencies = [ - "fnv", - "js-sys", - "serde", - "wasm-bindgen", -] - -[[package]] -name = "serde_derive" -version = "1.0.195" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "serde_json" -version = "1.0.111" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smol_str" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74212e6bbe9a4352329b2f68ba3130c15a3f26fe88ff22dbdc6cdd58fa85e99c" -dependencies = [ - "serde", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.48" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tabwriter" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a327282c4f64f6dc37e3bba4c2b6842cc3a992f204fa58d917696a89f691e5f6" -dependencies = [ - "unicode-width", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "text-size" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233" - -[[package]] -name = "thiserror" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54378c645627613241d077a3a79db965db602882668f9136ac42af9ecb730ad" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.56" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", -] - -[[package]] -name = "toml" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb9d890e4dc9298b70f740f615f2e05b9db37dce531f6b24fb77ac993f9f217" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - -[[package]] -name = "toml_datetime" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_edit" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" -dependencies = [ - "indexmap", - "nom8", - "serde", - "serde_spanned", - "toml_datetime", -] - -[[package]] -name = "tvix-eval" -version = "0.1.0" -dependencies = [ - "bstr", - "bytes", - "codemap", - "codemap-diagnostic", - "dirs", - "genawaiter", - "imbl", - "itertools", - "lazy_static", - "lexical-core", - "os_str_bytes", - "path-clean", - "regex", - "rnix", - "rowan", - "serde", - "serde_json", - "smol_str", - "tabwriter", - "toml", - "tvix-eval-builtin-macros", - "xml-rs", -] - -[[package]] -name = "tvix-eval-builtin-macros" -version = "0.0.1" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "tvixbolt" -version = "0.1.0" -dependencies = [ - "codemap", - "rnix", - "serde", - "serde_urlencoded", - "tvix-eval", - "wasm-bindgen", - "web-sys", - "yew", - "yew-router", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.39" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" - -[[package]] -name = "web-sys" -version = "0.3.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "xml-rs" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a" - -[[package]] -name = "yew" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a1ccb53e57d3f7d847338cf5758befa811cabe207df07f543c06f502f9998cd" -dependencies = [ - "console_error_panic_hook", - "gloo", - "gloo-utils", - "indexmap", - "js-sys", - "scoped-tls-hkt", - "slab", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "yew-macro", -] - -[[package]] -name = "yew-macro" -version = "0.19.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fab79082b556d768d6e21811869c761893f0450e1d550a67892b9bce303b7bb" -dependencies = [ - "boolinator", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "yew-router" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155804f6f3aa309f596d5c3fa14486a94e7756f1edd7634569949e401d5099f2" -dependencies = [ - "gloo", - "gloo-utils", - "js-sys", - "route-recognizer", - "serde", - "serde-wasm-bindgen", - "serde_urlencoded", - "thiserror", - "wasm-bindgen", - "web-sys", - "yew", - "yew-router-macro", -] - -[[package]] -name = "yew-router-macro" -version = "0.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39049d193b52eaad4ffc80916bf08806d142c90b5edcebd527644de438a7e19a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] diff --git a/corp/tvixbolt/Cargo.toml b/corp/tvixbolt/Cargo.toml deleted file mode 100644 index ce5ffb90e3bd..000000000000 --- a/corp/tvixbolt/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "tvixbolt" -version = "0.1.0" -edition = "2021" - -[dependencies] -yew = "0.19.3" -yew-router = "0.16" -codemap = "0.1.3" -serde_urlencoded = "*" # pinned by yew -rnix = "0.11.0" - -# needs to be in sync with nixpkgs -wasm-bindgen = "= 0.2.91" - -[dependencies.tvix-eval] -path = "../../tvix/eval" -default-features = false - -[dependencies.serde] -version = "*" # pinned by yew -features = [ "derive" ] - -[dependencies.web-sys] -version = "*" # pinned by yew -features = [ "HtmlDetailsElement" ] diff --git a/corp/tvixbolt/default.nix b/corp/tvixbolt/default.nix deleted file mode 100644 index 9b6baa582fb0..000000000000 --- a/corp/tvixbolt/default.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ depot, lib, pkgs, ... }: - -let - wasmRust = pkgs.rust-bin.stable.latest.default.override { - targets = [ "wasm32-unknown-unknown" ]; - }; - - cargoToml = with builtins; fromTOML (readFile ./Cargo.toml); - - wasmBindgenMatch = - cargoToml.dependencies.wasm-bindgen == "= ${pkgs.wasm-bindgen-cli.version}"; - - assertWasmBindgen = assert (lib.assertMsg wasmBindgenMatch '' - Due to instability in the Rust WASM ecosystem, the trunk build - tool enforces that the Cargo-dependency version of `wasm-bindgen` - MUST match the version of the CLI supplied in the environment. - - This can get out of sync when nixpkgs is updated. To resolve it, - wasm-bindgen must be bumped in the Cargo.toml file and cargo needs - to be run to resolve the dependencies. - - Versions of `wasm-bindgen` in Cargo.toml: - - Expected: '= ${pkgs.wasm-bindgen-cli.version}' - Actual: '${cargoToml.dependencies.wasm-bindgen}' - ''); pkgs.wasm-bindgen-cli; - - deps = [ - pkgs.binaryen - pkgs.sass - pkgs.trunk - - wasmRust - assertWasmBindgen - ]; - - # Cargo.toml needs to be patched with the /nix/store source path of - # tvix-eval. - cargoTomlPatch = pkgs.writeText "tvix-eval-src.patch" '' - diff --git a/Cargo.toml b/Cargo.toml - index 75006bec18..6ca244bbb2 100644 - --- a/Cargo.toml - +++ b/Cargo.toml - @@ -16,7 +16,7 @@ rnix = "0.11.0" - wasm-bindgen = "= 0.2.83" - - [dependencies.tvix-eval] - -path = "../../tvix/eval" - +path = "${depot.tvix.crates.workspaceMembers.tvix-eval.build.src}" - default-features = false - - [dependencies.serde] - ''; -in -pkgs.rustPlatform.buildRustPackage rec { - pname = "tvixbolt"; - version = "canon"; - src = lib.cleanSource ./.; - - cargoLock.lockFile = ./Cargo.lock; - - patches = [ - cargoTomlPatch - ]; - - buildPhase = '' - export PATH=${lib.makeBinPath deps}:$PATH - mkdir home - export HOME=$PWD/home - trunk build --release -d $out - ''; - - dontInstall = true; -} diff --git a/corp/tvixbolt/index.css b/corp/tvixbolt/index.css deleted file mode 100644 index 95bd7d098362..000000000000 --- a/corp/tvixbolt/index.css +++ /dev/null @@ -1,7 +0,0 @@ -.footer { - text-align: right; -} - -.lod { - text-align: center; -} diff --git a/corp/tvixbolt/index.html b/corp/tvixbolt/index.html deleted file mode 100644 index d35fe1a006e9..000000000000 --- a/corp/tvixbolt/index.html +++ /dev/null @@ -1,15 +0,0 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8" /> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" - href="https://static.tvl.su/latest/terminal.min.css" /> - <link data-trunk rel="inline" href="index.css"> - <title>Tvixbolt</title> - - <!-- Yandex.RTB --> - <script>window.yaContextCb=window.yaContextCb||[]</script> - <script src="https://yandex.ru/ads/system/context.js" async></script> - </head> -</html> diff --git a/corp/tvixbolt/src/main.rs b/corp/tvixbolt/src/main.rs deleted file mode 100644 index e8a2bc02e29f..000000000000 --- a/corp/tvixbolt/src/main.rs +++ /dev/null @@ -1,337 +0,0 @@ -use std::fmt::Write; - -use serde::{Deserialize, Serialize}; -use tvix_eval::observer::{DisassemblingObserver, TracingObserver}; -use web_sys::HtmlDetailsElement; -use web_sys::HtmlTextAreaElement; -use yew::prelude::*; -use yew::TargetCast; -use yew_router::{prelude::*, AnyRoute}; - -#[derive(Clone)] -enum Msg { - CodeChange(String), - ToggleTrace(bool), - ToggleDisplayAst(bool), - - // Required because browsers are stupid and it's easy to get into - // infinite loops with `ontoggle` events. - NoOp, -} - -#[derive(Clone, Serialize, Deserialize)] -struct Model { - code: String, - - // #[serde(skip_serializing)] - trace: bool, - - // #[serde(skip_serializing)] - display_ast: bool, -} - -fn tvixbolt_overview() -> Html { - html! { - <> - <p> - {"This page lets you explore the bytecode generated by the "} - <a href="https://cs.tvl.fyi/depot/-/tree/tvix">{"Tvix"}</a> - {" compiler for the Nix language. See the "} - <a href="https://tvl.fyi/blog/rewriting-nix">{"Tvix announcement"}</a> - {" for some background information on Tvix itself."} - </p> - <p> - {"Tvix is still "}<i>{"extremely work-in-progress"}</i>{" and you "} - {"should expect to be able to cause bugs and errors in this tool."} - </p> - <p> - {"Tvixbolt is a project from "} - <a href="https://tvl.su"> - {"TVL LLC"} - </a> - {". If you're looking for the TVL Community, click "} - <a href="https://tvl.fyi"> - {"here"} - </a> - {"."} - </p> - </> - } -} - -/// This renders an ad in the Tvixbolt footer. Most people that end up -/// on Tvixbolt will probably block this anyways, but might as well. -fn ad() -> Html { - let ad_code = r#" -window.yaContextCb.push(()=>{ - Ya.Context.AdvManager.render({ - renderTo: 'yandex_rtb_R-A-1943274-1', - blockId: 'R-A-1943274-1' - }) -}) -"#; - - html! { - <div id="ad"> - <div id="yandex_rtb_R-A-1943274-1"></div> - <script>{ad_code}</script> - </div> - } -} - -fn footer_link(location: &'static str, name: &str) -> Html { - html! { - <> - <a class="uncoloured-link" href={location}>{name}</a>{" | "} - </> - } -} - -fn footer() -> Html { - html! { - <> - <hr/> - <footer> - <p class="footer"> - {footer_link("https://tvl.su", "home")} - {footer_link("https://cs.tvl.fyi", "code")} - {footer_link("https://tvl.fyi/builds", "ci")} - {footer_link("https://b.tvl.fyi", "bugs")} - {"© ООО ТВЛ"} - </p> - <p class="lod">{"ಠ_ಠ"}</p> - {ad()} - </footer> - </> - } -} - -impl Component for Model { - type Message = Msg; - type Properties = (); - - fn create(_: &Context<Self>) -> Self { - BrowserHistory::new() - .location() - .query::<Self>() - .unwrap_or_else(|_| Self { - code: String::new(), - trace: false, - display_ast: false, - }) - } - - fn update(&mut self, _: &Context<Self>, msg: Self::Message) -> bool { - match msg { - Msg::ToggleTrace(trace) => { - self.trace = trace; - } - - Msg::ToggleDisplayAst(display_ast) => { - self.display_ast = display_ast; - } - - Msg::CodeChange(new_code) => { - self.code = new_code; - } - - Msg::NoOp => {} - } - - let _ = BrowserHistory::new().replace_with_query(AnyRoute::new("/"), self.clone()); - - true - } - - fn view(&self, ctx: &Context<Self>) -> Html { - // This gives us a component's "`Scope`" which allows us to send messages, etc to the component. - let link = ctx.link(); - html! { - <> - <div class="container"> - <h1>{"tvixbolt 0.1-alpha"}</h1> - {tvixbolt_overview()} - <form> - <fieldset> - <legend>{"Input"}</legend> - - <div class="form-group"> - <label for="code">{"Nix code:"}</label> - <textarea - oninput={link.callback(|e: InputEvent| { - let ta = e.target_unchecked_into::<HtmlTextAreaElement>().value(); - Msg::CodeChange(ta) - - })} - id="code" cols="30" rows="10" value={self.code.clone()}> - </textarea> - </div> - </fieldset> - </form> - <hr /> - {self.run(ctx)} - {footer()} - </div> - </> - } - } -} - -impl Model { - fn run(&self, ctx: &Context<Self>) -> Html { - if self.code.is_empty() { - return html! { - <p> - {"Enter some Nix code above to get started. Don't know Nix yet? "} - {"Check out "} - <a href="https://code.tvl.fyi/about/nix/nix-1p/README.md">{"nix-1p"}</a> - {"!"} - </p> - }; - } - - html! { - <> - <h2>{"Result:"}</h2> - {eval(self).display(ctx, self)} - </> - } - } -} - -#[derive(Default)] -struct Output { - errors: String, - warnings: String, - output: String, - bytecode: Vec<u8>, - trace: Vec<u8>, - ast: String, -} - -fn maybe_show(title: &str, s: &str) -> Html { - if s.is_empty() { - html! {} - } else { - html! { - <> - <h3>{title}</h3> - <pre>{s}</pre> - </> - } - } -} - -fn maybe_details( - ctx: &Context<Model>, - title: &str, - s: &str, - display: bool, - toggle: fn(bool) -> Msg, -) -> Html { - let link = ctx.link(); - if display { - let msg = toggle(false); - html! { - <details open=true - ontoggle={link.callback(move |e: Event| { - let details = e.target_unchecked_into::<HtmlDetailsElement>(); - if !details.open() { - msg.clone() - } else { - Msg::NoOp - } - })}> - - <summary><h3 style="display: inline;">{title}</h3></summary> - <pre>{s}</pre> - </details> - } - } else { - let msg = toggle(true); - html! { - <details ontoggle={link.callback(move |e: Event| { - let details = e.target_unchecked_into::<HtmlDetailsElement>(); - if details.open() { - msg.clone() - } else { - Msg::NoOp - } - })}> - <summary><h3 style="display: inline;">{title}</h3></summary> - </details> - } - } -} - -impl Output { - fn display(self, ctx: &Context<Model>, model: &Model) -> Html { - html! { - <> - {maybe_show("Errors:", &self.errors)} - {maybe_show("Warnings:", &self.warnings)} - {maybe_show("Output:", &self.output)} - {maybe_show("Bytecode:", &String::from_utf8_lossy(&self.bytecode))} - {maybe_details(ctx, "Runtime trace:", &String::from_utf8_lossy(&self.trace), model.trace, Msg::ToggleTrace)} - {maybe_details(ctx, "Parsed AST:", &self.ast, model.display_ast, Msg::ToggleDisplayAst)} - </> - } - } -} - -fn eval(model: &Model) -> Output { - let mut out = Output::default(); - - if model.code.is_empty() { - return out; - } - - let mut eval = tvix_eval::Evaluation::new_pure(); - let source = eval.source_map(); - - let result = { - let mut compiler_observer = DisassemblingObserver::new(source.clone(), &mut out.bytecode); - eval.compiler_observer = Some(&mut compiler_observer); - - let mut runtime_observer = TracingObserver::new(&mut out.trace); - if model.trace { - eval.runtime_observer = Some(&mut runtime_observer); - } - - eval.evaluate(&model.code, Some("/nixbolt".into())) - }; - - if model.display_ast { - if let Some(ref expr) = result.expr { - out.ast = tvix_eval::pretty_print_expr(expr); - } - } - - out.output = match result.value { - Some(val) => val.to_string(), - None => "".to_string(), - }; - - for warning in result.warnings { - writeln!( - &mut out.warnings, - "{}\n", - warning.fancy_format_str(&source).trim(), - ) - .unwrap(); - } - - if !result.errors.is_empty() { - for error in &result.errors { - writeln!(&mut out.errors, "{}\n", error.fancy_format_str().trim(),).unwrap(); - } - - return out; - } - - out -} - -fn main() { - yew::start_app::<Model>(); -} |