diff options
author | Florian Klink <flokli@flokli.de> | 2024-07-04T14·14+0300 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2024-07-05T16·26+0000 |
commit | af933c177ad7f3bc9730cc7e51b6bfe6b86fd5ae (patch) | |
tree | b56e4df06e5ed54db92ad4155cd46e74b590f774 | |
parent | 6037888e18bf34e8381acfd7fa6c0bed3049e14d (diff) |
docs(tvix): update WASM status r/8344
crate2nix can now build WASM, and cl/11859 showcases this now. Even if it's not in the same cargo workspace, we should still migrate tvixbolt to a crate2nix build. Remove the part about Build/Store frontends, it was more of an explanation why we want WASM builds to be nice, it can be tracked in separate TODOs once more concrete. Change-Id: If4f5e0994b55520ba70cabefb4fcef9dc17bc394 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11945 Tested-by: BuildkiteCI Reviewed-by: Ilan Joselevich <personal@ilanjoselevich.com> Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de>
-rw-r--r-- | tvix/docs/src/TODO.md | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/tvix/docs/src/TODO.md b/tvix/docs/src/TODO.md index 52fa0a9e7480..fe161e3412d4 100644 --- a/tvix/docs/src/TODO.md +++ b/tvix/docs/src/TODO.md @@ -30,26 +30,12 @@ Most of Tvix is living inside a `//tvix` cargo workspace, and we use `crate2nix` as a build system, to get crate-level build granularity (and caching), keeping compile times somewhat manageable. -In the future, for Store/Build, we want to build some more web frontends, -exposing some data by calling to the API. Being able to write this in Rust, -and reusing most of our existing code dealing with the data structures would -be preferred. - -However, using the crate2nix tooling in combination with compiling for WASM is -a bumpy ride (and `//web.tvixbolt` works around this by using -`rustPlatform.buildRustPackage` instead, which invokes cargo inside a FOD): - -`buildRustCrate` in nixpkgs (which is used by `crate2nix` under the hood) -doesn't allow specifying another `--target` explicitly, but relies on the cross -machinery in nixpkgs exclusively. - -`doc/languages-frameworks/rust.section.md` suggests it should be a matter of -re-instantiating nixpkgs for `wasm32-unknown-unknown`, but that's no recognized -as a valid architecture. -The suggested alternative, setting only `rustc.config` to it seems to get us -further, but the `Crate.nix` logic for detecting arch-conditional crates doesn't -seem to cover that case, and tries to build crates (`cpufeatures` for `sha{1,2}`) -which are supposed to be skipped. +Thanks to the recent crate2nix fixes, we can now use it to build WASM. +We should migrate `//web/tvixbolt` from `rustPlatform.buildRustPackage` to +`crate2nix`. +An initial cl/11821 to move it to the `//tvix` workspace got some pushback, we +should see if it's possible to keep it in a separate directory and still refer +to the (cleaned) sources described in `tvix/default.nix`. ## Perf - String Contexts currently do a lot of indirections (edef) |