basic cursor moving

This commit is contained in:
Mona Mayrhofer 2026-02-28 22:24:42 +01:00
parent e4d51f09a1
commit 966fdbbd50
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
GPG key ID: 374AB152BDEBA1AE
29 changed files with 7052 additions and 52 deletions

View file

@ -0,0 +1 @@
/nix/store/bv5inqjinipycnjqqq0iabp6xi8hjb09-source

View file

@ -1 +0,0 @@
/nix/store/drfbazv2fh6qnlvk2imjkhbqs75r69pj-source

View file

@ -1 +1 @@
/nix/store/m0ljcg0awk034sx2b8wf09ray36dgcqm-my-project-env
/nix/store/05p6k4yj5qk1qapc1xi02mwfgkhi1dfw-my-project-env

View file

@ -18,7 +18,7 @@ DEVENV_DOTFILE='/home/nionidh/projects/rust-tomfoolery/cursor-mover-app/.devenv'
export DEVENV_DOTFILE
DEVENV_FLAKE_SHELL='default'
export DEVENV_FLAKE_SHELL
DEVENV_PROFILE='/nix/store/yxs7dkbb2j3lgrkk96cmg0qpms9y1czr-devenv-profile'
DEVENV_PROFILE='/nix/store/pdpsbmrx88izi8zb6zl4z9rpy2y713bq-devenv-profile'
export DEVENV_PROFILE
DEVENV_ROOT='/home/nionidh/projects/rust-tomfoolery/cursor-mover-app'
export DEVENV_ROOT
@ -51,13 +51,13 @@ NIX_CC='/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0'
export NIX_CC
NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
export NIX_CC_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu
NIX_CFLAGS_COMPILE=' -frandom-seed=m0ljcg0awk'
NIX_CFLAGS_COMPILE=' -frandom-seed=05p6k4yj5q -isystem /nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125/include -isystem /nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125/include'
export NIX_CFLAGS_COMPILE
NIX_ENFORCE_NO_NATIVE='1'
export NIX_ENFORCE_NO_NATIVE
NIX_HARDENING_ENABLE='bindnow format fortify fortify3 libcxxhardeningextensive libcxxhardeningfast pic relro stackclashprotection stackprotector strictoverflow zerocallusedregs'
export NIX_HARDENING_ENABLE
NIX_LDFLAGS='-rpath /home/nionidh/projects/rust-tomfoolery/cursor-mover-app/outputs/out/lib -L/nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26/lib -L/nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26/lib'
NIX_LDFLAGS='-rpath /home/nionidh/projects/rust-tomfoolery/cursor-mover-app/outputs/out/lib -L/nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125/lib -L/nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed/lib -L/nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125/lib -L/nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed/lib'
export NIX_LDFLAGS
NIX_NO_SELF_RPATH='1'
NIX_PKG_CONFIG_WRAPPER_TARGET_HOST_x86_64_unknown_linux_gnu='1'
@ -74,7 +74,7 @@ OLDPWD=''
export OLDPWD
OPTERR='1'
OSTYPE='linux-gnu'
PATH='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0/bin:/nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall/bin:/nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3/bin:/nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119/bin:/nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0/bin:/nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124/bin:/nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3/bin:/nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26/bin:/nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69/bin:/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2/bin:/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2/bin:/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0/bin:/nix/store/mjf8jlq9grydcdvyw6hb063x5c34g5gf-gcc-15.2.0/bin:/nix/store/0bdqq2z98kg2hfn3k60if6pb5fd5p10h-glibc-2.42-47-bin/bin:/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin:/nix/store/i6ppbrlpp6yki8qvka7nyv091xa8dchx-binutils-wrapper-2.44/bin:/nix/store/47mn80zqpygykqailwzw8zlag4cgl75q-binutils-2.44/bin:/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin:/nix/store/16wfacfgap3chf7mcjnd8dwi85dj4qqi-findutils-4.10.0/bin:/nix/store/3p87h6dn5i87i3iq9364imzbqgwvkg2p-diffutils-3.12/bin:/nix/store/ryz8kcrm2bxpccllfqlb7qldsfnqp5c2-gnused-4.9/bin:/nix/store/02vv0r262agf9j5n2y1gmbjvdf12zkl0-gnugrep-3.12/bin:/nix/store/2xq9rayckw8zq26k274xxlikn77jn60j-gawk-5.3.2/bin:/nix/store/qyg62bc2xnpwz0fa9prqxvvk00zj4g9q-gnutar-1.35/bin:/nix/store/84yyzmxs7mb8nhkvcfv9n1l9irpb6mnq-gzip-1.14/bin:/nix/store/90yw24gqmwph4xjp4mqhpx1y1gcrvqla-bzip2-1.0.8-bin/bin:/nix/store/vbah5c4rzy1q1hbqhginyxjhj8d4dj8j-gnumake-4.4.1/bin:/nix/store/f15k3dpilmiyv6zgpib289rnjykgr1r4-bash-5.3p9/bin:/nix/store/wwij6563c6wbg4kzgjhng7vlhf7api19-patch-2.8/bin:/nix/store/zys6d102zp171wpwcs08g632886w2qxs-xz-5.8.2-bin/bin:/nix/store/nyy0bvgjwd98x7ih8pl6pr79qjljgsf7-file-5.45/bin'
PATH='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0/bin:/nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall/bin:/nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3/bin:/nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119/bin:/nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0/bin:/nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124/bin:/nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3/bin:/nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125/bin:/nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed/bin:/nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69/bin:/nix/store/8njkmn9yfcka8yid251wk109n7a6sz1y-wasm-bindgen-cli-0.2.114/bin:/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2/bin:/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2/bin:/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0/bin:/nix/store/mjf8jlq9grydcdvyw6hb063x5c34g5gf-gcc-15.2.0/bin:/nix/store/0bdqq2z98kg2hfn3k60if6pb5fd5p10h-glibc-2.42-47-bin/bin:/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin:/nix/store/i6ppbrlpp6yki8qvka7nyv091xa8dchx-binutils-wrapper-2.44/bin:/nix/store/47mn80zqpygykqailwzw8zlag4cgl75q-binutils-2.44/bin:/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin:/nix/store/16wfacfgap3chf7mcjnd8dwi85dj4qqi-findutils-4.10.0/bin:/nix/store/3p87h6dn5i87i3iq9364imzbqgwvkg2p-diffutils-3.12/bin:/nix/store/ryz8kcrm2bxpccllfqlb7qldsfnqp5c2-gnused-4.9/bin:/nix/store/02vv0r262agf9j5n2y1gmbjvdf12zkl0-gnugrep-3.12/bin:/nix/store/2xq9rayckw8zq26k274xxlikn77jn60j-gawk-5.3.2/bin:/nix/store/qyg62bc2xnpwz0fa9prqxvvk00zj4g9q-gnutar-1.35/bin:/nix/store/84yyzmxs7mb8nhkvcfv9n1l9irpb6mnq-gzip-1.14/bin:/nix/store/90yw24gqmwph4xjp4mqhpx1y1gcrvqla-bzip2-1.0.8-bin/bin:/nix/store/vbah5c4rzy1q1hbqhginyxjhj8d4dj8j-gnumake-4.4.1/bin:/nix/store/f15k3dpilmiyv6zgpib289rnjykgr1r4-bash-5.3p9/bin:/nix/store/wwij6563c6wbg4kzgjhng7vlhf7api19-patch-2.8/bin:/nix/store/zys6d102zp171wpwcs08g632886w2qxs-xz-5.8.2-bin/bin:/nix/store/nyy0bvgjwd98x7ih8pl6pr79qjljgsf7-file-5.45/bin'
export PATH
PC_CONFIG_FILES='/nix/store/81xv1l07mgr9bi2ng7xqdjnwi5z9h8f8-process-compose.yaml'
export PC_CONFIG_FILES
@ -97,7 +97,7 @@ STRINGS='strings'
export STRINGS
STRIP='strip'
export STRIP
XDG_DATA_DIRS='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0/share:/nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26/share:/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2/share:/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2/share'
XDG_DATA_DIRS='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0/share:/nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed/share:/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2/share:/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2/share'
export XDG_DATA_DIRS
__structuredAttrs=''
export __structuredAttrs
@ -158,7 +158,7 @@ mesonFlags=''
export mesonFlags
name='my-project-env'
export name
nativeBuildInputs='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0 /nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall /nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3 /nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119 /nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0 /nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124 /nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3 /nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26 /nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69 /nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2'
nativeBuildInputs='/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0 /nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall /nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3 /nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119 /nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0 /nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124 /nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3 /nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125 /nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed /nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69 /nix/store/8njkmn9yfcka8yid251wk109n7a6sz1y-wasm-bindgen-cli-0.2.114 /nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2'
export nativeBuildInputs
out='/home/nionidh/projects/rust-tomfoolery/cursor-mover-app/outputs/out'
export out
@ -179,7 +179,7 @@ phases='buildPhase'
export phases
pkg='/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0'
declare -a pkgsBuildBuild=()
declare -a pkgsBuildHost=('/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0' '/nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall' '/nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3' '/nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119' '/nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0' '/nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124' '/nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3' '/nix/store/awk34f938853qy353hl1ig0zdi98x7sk-rust-beta-2026-01-26' '/nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69' '/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2' '/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2' '/nix/store/y03z7y8cgdck7vk8qpim30vps4d22gzv-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0' '/nix/store/i6ppbrlpp6yki8qvka7nyv091xa8dchx-binutils-wrapper-2.44' )
declare -a pkgsBuildHost=('/nix/store/xgixy092whsar7fwm9lmcn4mv9kqn983-process-compose-1.87.0' '/nix/store/f53d7gw5jh2yc1rv62kp670gnqq3vwwz-checkall' '/nix/store/py79xv22ipf2ycg4qks55wwai9g4w2qg-dioxus-cli-0.7.3' '/nix/store/9dpg06rzbppmxi5q8rms8zyybz56sa6r-cargo-expand-1.0.119' '/nix/store/fl02yv3ax1qf1xkq64ik8qz5bjxyyd71-cargo-deny-0.19.0' '/nix/store/hadf76x1xknx2w6ydp05gzl2w3j40hqy-cargo-nextest-0.9.124' '/nix/store/s4rgqv7brrcq2jm8m00dyair22knq10s-typos-1.42.3' '/nix/store/4jp1vkr9gj5n3zbpp2xvkp8n3g56lpv0-binaryen-125' '/nix/store/ngqmd36qxwr8d75h3bnssapbgrkwx7db-rust-mixed' '/nix/store/6r3frw6cahjafghfv58vj6a4v1g2zxad-rust-analyzer-nightly-17304e9c7e11d26139672d3d77aa498b1cae0d69' '/nix/store/8njkmn9yfcka8yid251wk109n7a6sz1y-wasm-bindgen-cli-0.2.114' '/nix/store/rvp7qlpf5jqvdckjy1afjb6aha6j8dxg-pkg-config-wrapper-0.29.2' '/nix/store/c2p7haf4zzkbrir9zs662r68c5dmylbq-patchelf-0.15.2' '/nix/store/y03z7y8cgdck7vk8qpim30vps4d22gzv-update-autotools-gnu-config-scripts-hook' '/nix/store/0y5xmdb7qfvimjwbq7ibg1xdgkgjwqng-no-broken-symlinks.sh' '/nix/store/cv1d7p48379km6a85h4zp6kr86brh32q-audit-tmpdir.sh' '/nix/store/85clx3b0xkdf58jn161iy80y5223ilbi-compress-man-pages.sh' '/nix/store/p3l1a5y7nllfyrjn2krlwgcc3z0cd3fq-make-symlinks-relative.sh' '/nix/store/5yzw0vhkyszf2d179m0qfkgxmp5wjjx4-move-docs.sh' '/nix/store/fyaryjvghbkpfnsyw97hb3lyb37s1pd6-move-lib64.sh' '/nix/store/kd4xwxjpjxi71jkm6ka0np72if9rm3y0-move-sbin.sh' '/nix/store/pag6l61paj1dc9sv15l7bm5c17xn5kyk-move-systemd-user-units.sh' '/nix/store/cmzya9irvxzlkh7lfy6i82gbp0saxqj3-multiple-outputs.sh' '/nix/store/x8c40nfigps493a07sdr2pm5s9j1cdc0-patch-shebangs.sh' '/nix/store/cickvswrvann041nqxb0rxilc46svw1n-prune-libtool-files.sh' '/nix/store/xyff06pkhki3qy1ls77w10s0v79c9il0-reproducible-builds.sh' '/nix/store/z7k98578dfzi6l3hsvbivzm7hfqlk0zc-set-source-date-epoch-to-latest.sh' '/nix/store/pilsssjjdxvdphlg2h19p0bfx5q0jzkn-strip.sh' '/nix/store/a245z3cvf9x9sn0xlk6k8j9xhxbhda1z-gcc-wrapper-15.2.0' '/nix/store/i6ppbrlpp6yki8qvka7nyv091xa8dchx-binutils-wrapper-2.44' )
declare -a pkgsBuildTarget=()
declare -a pkgsHostHost=()
declare -a pkgsHostTarget=()
@ -227,9 +227,9 @@ if [ ! type -p direnv &>/dev/null && -f .envrc ]; then
fi
mkdir -p "$DEVENV_STATE"
if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/yxs7dkbb2j3lgrkk96cmg0qpms9y1czr-devenv-profile" ]
if [ ! -L "$DEVENV_DOTFILE/profile" ] || [ "$(/nix/store/i2vmgx46q9hd3z6rigaiman3wl3i2gc4-coreutils-9.9/bin/readlink $DEVENV_DOTFILE/profile)" != "/nix/store/pdpsbmrx88izi8zb6zl4z9rpy2y713bq-devenv-profile" ]
then
ln -snf /nix/store/yxs7dkbb2j3lgrkk96cmg0qpms9y1czr-devenv-profile "$DEVENV_DOTFILE/profile"
ln -snf /nix/store/pdpsbmrx88izi8zb6zl4z9rpy2y713bq-devenv-profile "$DEVENV_DOTFILE/profile"
fi
unset HOST_PATH NIX_BUILD_CORES __structuredAttrs buildInputs buildPhase builder depsBuildBuild depsBuildBuildPropagated depsBuildTarget depsBuildTargetPropagated depsHostHost depsHostHostPropagated depsTargetTarget depsTargetTargetPropagated dontAddDisableDepTrack doCheck doInstallCheck nativeBuildInputs out outputs patches phases preferLocalBuild propagatedBuildInputs propagatedNativeBuildInputs shell shellHook stdenv strictDeps

15
.zed/settings.json Normal file
View file

@ -0,0 +1,15 @@
// Folder-specific settings
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"lsp": {
"rust-analyzer": {
"initialization_options": {
"cargo": {
"features": ["server"],
},
},
},
},
}

6192
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[workspace]
members = ["crates/cursor-mover-app"
]
, "crates/cursor-move-webapp"]
resolver = "2"
[workspace.dependencies]

7
crates/cursor-move-webapp/.gitignore vendored Normal file
View file

@ -0,0 +1,7 @@
# Generated by Cargo
# will have compiled files and executables
/target
.DS_Store
# These are backup files generated by rustfmt
**/*.rs.bk

View file

@ -0,0 +1,265 @@
You are an expert [0.7 Dioxus](https://dioxuslabs.com/learn/0.7) assistant. Dioxus 0.7 changes every api in dioxus. Only use this up to date documentation. `cx`, `Scope`, and `use_state` are gone
Provide concise code examples with detailed descriptions
# Dioxus Dependency
You can add Dioxus to your `Cargo.toml` like this:
```toml
[dependencies]
dioxus = { version = "0.7.1" }
[features]
default = ["web", "webview", "server"]
web = ["dioxus/web"]
webview = ["dioxus/desktop"]
server = ["dioxus/server"]
```
# Launching your application
You need to create a main function that sets up the Dioxus runtime and mounts your root component.
```rust
use dioxus::prelude::*;
fn main() {
dioxus::launch(App);
}
#[component]
fn App() -> Element {
rsx! { "Hello, Dioxus!" }
}
```
Then serve with `dx serve`:
```sh
curl -sSL http://dioxus.dev/install.sh | sh
dx serve
```
# UI with RSX
```rust
rsx! {
div {
class: "container", // Attribute
color: "red", // Inline styles
width: if condition { "100%" }, // Conditional attributes
"Hello, Dioxus!"
}
// Prefer loops over iterators
for i in 0..5 {
div { "{i}" } // use elements or components directly in loops
}
if condition {
div { "Condition is true!" } // use elements or components directly in conditionals
}
{children} // Expressions are wrapped in brace
{(0..5).map(|i| rsx! { span { "Item {i}" } })} // Iterators must be wrapped in braces
}
```
# Assets
The asset macro can be used to link to local files to use in your project. All links start with `/` and are relative to the root of your project.
```rust
rsx! {
img {
src: asset!("/assets/image.png"),
alt: "An image",
}
}
```
## Styles
The `document::Stylesheet` component will inject the stylesheet into the `<head>` of the document
```rust
rsx! {
document::Stylesheet {
href: asset!("/assets/styles.css"),
}
}
```
# Components
Components are the building blocks of apps
* Component are functions annotated with the `#[component]` macro.
* The function name must start with a capital letter or contain an underscore.
* A component re-renders only under two conditions:
1. Its props change (as determined by `PartialEq`).
2. An internal reactive state it depends on is updated.
```rust
#[component]
fn Input(mut value: Signal<String>) -> Element {
rsx! {
input {
value,
oninput: move |e| {
*value.write() = e.value();
},
onkeydown: move |e| {
if e.key() == Key::Enter {
value.write().clear();
}
},
}
}
}
```
Each component accepts function arguments (props)
* Props must be owned values, not references. Use `String` and `Vec<T>` instead of `&str` or `&[T]`.
* Props must implement `PartialEq` and `Clone`.
* To make props reactive and copy, you can wrap the type in `ReadOnlySignal`. Any reactive state like memos and resources that read `ReadOnlySignal` props will automatically re-run when the prop changes.
# State
A signal is a wrapper around a value that automatically tracks where it's read and written. Changing a signal's value causes code that relies on the signal to rerun.
## Local State
The `use_signal` hook creates state that is local to a single component. You can call the signal like a function (e.g. `my_signal()`) to clone the value, or use `.read()` to get a reference. `.write()` gets a mutable reference to the value.
Use `use_memo` to create a memoized value that recalculates when its dependencies change. Memos are useful for expensive calculations that you don't want to repeat unnecessarily.
```rust
#[component]
fn Counter() -> Element {
let mut count = use_signal(|| 0);
let mut doubled = use_memo(move || count() * 2); // doubled will re-run when count changes because it reads the signal
rsx! {
h1 { "Count: {count}" } // Counter will re-render when count changes because it reads the signal
h2 { "Doubled: {doubled}" }
button {
onclick: move |_| *count.write() += 1, // Writing to the signal rerenders Counter
"Increment"
}
button {
onclick: move |_| count.with_mut(|count| *count += 1), // use with_mut to mutate the signal
"Increment with with_mut"
}
}
}
```
## Context API
The Context API allows you to share state down the component tree. A parent provides the state using `use_context_provider`, and any child can access it with `use_context`
```rust
#[component]
fn App() -> Element {
let mut theme = use_signal(|| "light".to_string());
use_context_provider(|| theme); // Provide a type to children
rsx! { Child {} }
}
#[component]
fn Child() -> Element {
let theme = use_context::<Signal<String>>(); // Consume the same type
rsx! {
div {
"Current theme: {theme}"
}
}
}
```
# Async
For state that depends on an asynchronous operation (like a network request), Dioxus provides a hook called `use_resource`. This hook manages the lifecycle of the async task and provides the result to your component.
* The `use_resource` hook takes an `async` closure. It re-runs this closure whenever any signals it depends on (reads) are updated
* The `Resource` object returned can be in several states when read:
1. `None` if the resource is still loading
2. `Some(value)` if the resource has successfully loaded
```rust
let mut dog = use_resource(move || async move {
// api request
});
match dog() {
Some(dog_info) => rsx! { Dog { dog_info } },
None => rsx! { "Loading..." },
}
```
# Routing
All possible routes are defined in a single Rust `enum` that derives `Routable`. Each variant represents a route and is annotated with `#[route("/path")]`. Dynamic Segments can capture parts of the URL path as parameters by using `:name` in the route string. These become fields in the enum variant.
The `Router<Route> {}` component is the entry point that manages rendering the correct component for the current URL.
You can use the `#[layout(NavBar)]` to create a layout shared between pages and place an `Outlet<Route> {}` inside your layout component. The child routes will be rendered in the outlet.
```rust
#[derive(Routable, Clone, PartialEq)]
enum Route {
#[layout(NavBar)] // This will use NavBar as the layout for all routes
#[route("/")]
Home {},
#[route("/blog/:id")] // Dynamic segment
BlogPost { id: i32 },
}
#[component]
fn NavBar() -> Element {
rsx! {
a { href: "/", "Home" }
Outlet<Route> {} // Renders Home or BlogPost
}
}
#[component]
fn App() -> Element {
rsx! { Router::<Route> {} }
}
```
```toml
dioxus = { version = "0.7.1", features = ["router"] }
```
# Fullstack
Fullstack enables server rendering and ipc calls. It uses Cargo features (`server` and a client feature like `web`) to split the code into a server and client binaries.
```toml
dioxus = { version = "0.7.1", features = ["fullstack"] }
```
## Server Functions
Use the `#[post]` / `#[get]` macros to define an `async` function that will only run on the server. On the server, this macro generates an API endpoint. On the client, it generates a function that makes an HTTP request to that endpoint.
```rust
#[post("/api/double/:path/&query")]
async fn double_server(number: i32, path: String, query: i32) -> Result<i32, ServerFnError> {
tokio::time::sleep(std::time::Duration::from_secs(1)).await;
Ok(number * 2)
}
```
## Hydration
Hydration is the process of making a server-rendered HTML page interactive on the client. The server sends the initial HTML, and then the client-side runs, attaches event listeners, and takes control of future rendering.
### Errors
The initial UI rendered by the component on the client must be identical to the UI rendered on the server.
* Use the `use_server_future` hook instead of `use_resource`. It runs the future on the server, serializes the result, and sends it to the client, ensuring the client has the data immediately for its first render.
* Any code that relies on browser-specific APIs (like accessing `localStorage`) must be run *after* hydration. Place this code inside a `use_effect` hook.

View file

@ -0,0 +1,29 @@
[package]
name = "cursor-move-webapp"
version = "0.1.0"
authors = ["Mona Mayrhofer <mona.mayrhofer@proton.me>"]
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
dioxus = { version = "0.7.3", features = ["router", "fullstack", "logger"] }
serde = { version = "1.0.228", features = ["derive"] }
wayland-client = { version = "0.31.12", optional = true }
wayland-protocols-wlr = { version = "0.3.10", features = ["client"], optional = true }
tokio = {version = "1.49.0", optional = true}
[features]
default = ["web"]
# The feature that are only required for the web = ["dioxus/web"] build target should be optional and only enabled in the web = ["dioxus/web"] feature
web = ["dioxus/web"]
# The feature that are only required for the desktop = ["dioxus/desktop"] build target should be optional and only enabled in the desktop = ["dioxus/desktop"] feature
desktop = ["dioxus/desktop"]
# The feature that are only required for the mobile = ["dioxus/mobile"] build target should be optional and only enabled in the mobile = ["dioxus/mobile"] feature
mobile = ["dioxus/mobile"]
# The feature that are only required for the server = ["dioxus/server"] build target should be optional and only enabled in the server = ["dioxus/server"] feature
server = ["dioxus/server", "dep:wayland-client", "dep:wayland-protocols-wlr", "dep:tokio"]
[lints]
workspace = true

View file

@ -0,0 +1,21 @@
[application]
[web.app]
# HTML title tag content
title = "cursor-move-webapp"
# include `assets` in web platform
[web.resource]
# Additional CSS style files
style = []
# Additional JavaScript files
script = []
[web.resource.dev]
# Javascript code file
# serve: [dev-server] only
script = []

View file

@ -0,0 +1,34 @@
# Development
Your new jumpstart project includes basic organization with an organized `assets` folder and a `components` folder.
If you chose to develop with the router feature, you will also have a `views` folder.
```
project/
├─ assets/ # Any assets that are used by the app should be placed here
├─ src/
│ ├─ main.rs # The entrypoint for the app. It also defines the routes for the app.
│ ├─ components/
│ │ ├─ mod.rs # Defines the components module
│ │ ├─ hero.rs # The Hero component for use in the home page
│ │ ├─ echo.rs # The echo component uses server functions to communicate with the server
│ ├─ views/ # The views each route will render in the app.
│ │ ├─ mod.rs # Defines the module for the views route and re-exports the components for each route
│ │ ├─ blog.rs # The component that will render at the /blog/:id route
│ │ ├─ home.rs # The component that will render at the / route
├─ Cargo.toml # The Cargo.toml file defines the dependencies and feature flags for your project
```
### Serving Your App
Run the following command in the root of your project to start developing with the default platform:
```bash
dx serve --platform web
```
To run for a different platform, use the `--platform platform` flag. E.g.
```bash
dx serve --platform desktop
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 130 KiB

View file

@ -0,0 +1,11 @@
.container {
flex-grow: 1;
display: flex;
flex-direction: column;
justify-content: stretch;
align-items: stretch;
& > * {
flex-grow: 1;
}
}

View file

@ -0,0 +1,14 @@
html,
body,
#main {
margin: 0;
padding: 0;
min-height: 100vh;
width: 100vw;
}
#main {
background-color: #214;
display: flex;
flex-direction: column;
}

View file

@ -0,0 +1,5 @@
.mouse-area {
background-color: white;
touch-action: none;
}

View file

@ -0,0 +1,16 @@
.navbar {
display: flex;
flex-direction: row;
}
.navbar a {
color: #ffffff;
margin-right: 20px;
text-decoration: none;
transition: color 0.2s ease;
}
.navbar a:hover {
cursor: pointer;
color: #91a4d2;
}

View file

@ -0,0 +1,8 @@
await-holding-invalid-types = [
"generational_box::GenerationalRef",
{ path = "generational_box::GenerationalRef", reason = "Reads should not be held over an await point. This will cause any writes to fail while the await is pending since the read borrow is still active." },
"generational_box::GenerationalRefMut",
{ path = "generational_box::GenerationalRefMut", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
"dioxus_signals::WriteLock",
{ path = "dioxus_signals::WriteLock", reason = "Write should not be held over an await point. This will cause any reads or writes to fail while the await is pending since the write borrow is still active." },
]

View file

@ -0,0 +1,2 @@
mod mouse_area;
pub use mouse_area::MouseArea;

View file

@ -0,0 +1,79 @@
use dioxus::{
fullstack::{CborEncoding, WebSocketOptions, Websocket, extract::State, use_websocket},
html::geometry::{ElementSpace, euclid::Point2D},
logger::tracing,
prelude::*,
};
use serde::{Deserialize, Serialize};
#[component]
pub fn MouseArea() -> Element {
#[css_module("/assets/styling/mouse_area.module.css")]
struct Styles;
let mut last_cursor_position = use_signal::<Option<Point2D<f64, ElementSpace>>>(|| None);
let mut socket = use_websocket(move || mouse_move(WebSocketOptions::new()));
use_future(move || async move {
loop {
// Wait for the socket to connect
_ = socket.connect().await;
// Loop poll with recv. Throws an error when the connection closes, making it possible
// to run code before the socket re-connects when the name input changes
while let Ok(message) = socket.recv().await {
tracing::info!("Received message: {:?}", message);
}
}
});
rsx! {
div {
class: Styles::mouse_area,
onpointermove: move |evt| {
evt.prevent_default();
let point = evt.element_coordinates();
let last_position = last_cursor_position.write().replace(point);
if let Some(last_position) = last_position {
let delta = point - last_position;
spawn(async move {
_ = socket.send(ClientEvent::MouseMove { dx: delta.x, dy: delta.y }).await;
});
}
},
onpointerdown: move |evt| {
let point = evt.element_coordinates();
*last_cursor_position.write() = Some(point);
}
}
}
}
#[derive(Serialize, Deserialize, Debug)]
enum ClientEvent {
MouseMove { dx: f64, dy: f64 },
}
#[derive(Serialize, Deserialize, Debug)]
enum ServerEvent {
Ping,
}
#[expect(clippy::unused_async)]
#[get("/api/mouse_move_ws", mouse_service: State<crate::server::mouse_service::MouseService>)]
async fn mouse_move(
options: WebSocketOptions
) -> Result<Websocket<ClientEvent, ServerEvent, CborEncoding>> {
Ok(options.on_upgrade(move |mut socket| async move {
_ = socket.send(ServerEvent::Ping).await;
while let Ok(ClientEvent::MouseMove { dx, dy }) = socket.recv().await {
mouse_service.move_mouse(dx, dy).await;
}
}))
}

View file

@ -0,0 +1,51 @@
#![expect(clippy::volatile_composites)]
use dioxus::prelude::*;
use views::{Home, Navbar};
mod components;
mod views;
#[cfg(feature = "server")]
mod server;
#[derive(Debug, Clone, Routable, PartialEq)]
#[rustfmt::skip]
enum Route {
#[layout(Navbar)]
#[route("/")]
Home {},
// #[route("/blog/:id")]
// Blog { id: i32 },
}
const FAVICON: Asset = asset!("/assets/favicon.ico");
const MAIN_CSS: Asset = asset!("/assets/styling/main.css");
fn main() {
#[cfg(not(feature = "server"))]
dioxus::launch(App);
// When using `Lazy` items, or axum `Extension`s, we need to initialize them in `dioxus::serve`
// before launching our app.
#[cfg(feature = "server")]
dioxus::serve(|| async move {
use crate::server::mouse_service::MouseService;
use dioxus::server::axum::Extension;
let router = dioxus::server::router(App);
let router = router.layer(Extension(MouseService::start()));
Ok(router)
});
}
#[component]
fn App() -> Element {
rsx! {
document::Link { rel: "icon", href: FAVICON }
document::Link { rel: "stylesheet", href: MAIN_CSS }
Router::<Route> {}
}
}

View file

@ -0,0 +1 @@
pub mod mouse_service;

View file

@ -0,0 +1,143 @@
use std::{
sync::Arc,
time::{SystemTime, UNIX_EPOCH},
};
use dioxus::{
fullstack::{FullstackContext, extract::FromRef},
logger::tracing,
};
use tokio::sync::Mutex;
use wayland_client::{Connection, Dispatch, EventQueue, Proxy, QueueHandle, protocol::wl_registry};
use wayland_protocols_wlr::virtual_pointer::v1::client::{
zwlr_virtual_pointer_manager_v1::ZwlrVirtualPointerManagerV1,
zwlr_virtual_pointer_v1::ZwlrVirtualPointerV1,
};
#[derive(Clone)]
pub struct MouseService {
input_proxy_service_state: Arc<Mutex<InputProxy>>,
}
impl MouseService {
pub fn start() -> Self {
Self {
input_proxy_service_state: Arc::new(Mutex::new(InputProxy::new())),
}
}
pub async fn move_mouse(
&self,
dx: f64,
dy: f64,
) {
let guard = self.input_proxy_service_state.lock().await;
if let Some(pointer) = &guard.state.virtual_pointer {
let time = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis();
pointer.motion(time as u32, dx, dy);
pointer.frame();
guard.event_queue.flush().unwrap();
}
}
}
impl FromRef<FullstackContext> for MouseService {
fn from_ref(state: &FullstackContext) -> Self {
state.extension::<Self>().unwrap()
}
}
pub struct InputProxy {
state: InputProxyServiceState,
event_queue: EventQueue<InputProxyServiceState>,
}
impl InputProxy {
pub fn new() -> Self {
let connection = Connection::connect_to_env().unwrap();
let display = connection.display();
let mut event_queue = connection.new_event_queue();
let queue_handle = event_queue.handle();
let _ = display.get_registry(&queue_handle, ());
let mut input_proxy_service_state = InputProxyServiceState::default();
event_queue
.roundtrip(&mut input_proxy_service_state)
.unwrap();
Self {
state: input_proxy_service_state,
event_queue,
}
}
}
#[derive(Default)]
struct InputProxyServiceState {
virtual_pointer: Option<ZwlrVirtualPointerV1>,
}
impl Dispatch<ZwlrVirtualPointerV1, ()> for InputProxyServiceState {
fn event(
_state: &mut Self,
_proxy: &ZwlrVirtualPointerV1,
_event: <ZwlrVirtualPointerV1 as Proxy>::Event,
_data: &(),
_conn: &Connection,
_qhandle: &QueueHandle<Self>,
) {
tracing::info!("VPointerData");
}
}
impl Dispatch<ZwlrVirtualPointerManagerV1, ()> for InputProxyServiceState {
fn event(
_state: &mut Self,
_proxy: &ZwlrVirtualPointerManagerV1,
_event: <ZwlrVirtualPointerManagerV1 as Proxy>::Event,
_data: &(),
_conn: &Connection,
_qhandle: &QueueHandle<Self>,
) {
tracing::info!("ZwlrEvent");
}
}
impl Dispatch<wl_registry::WlRegistry, ()> for InputProxyServiceState {
fn event(
app_data: &mut Self,
registry: &wl_registry::WlRegistry,
event: wl_registry::Event,
_udata: &(),
_conn: &Connection,
queue_handle: &QueueHandle<Self>,
) {
println!("WlRegistry Event");
if let wl_registry::Event::Global {
name,
interface,
version,
} = event
&& interface == "zwlr_virtual_pointer_manager_v1"
{
app_data.virtual_pointer.get_or_insert_with(|| {
let manager = registry.bind::<ZwlrVirtualPointerManagerV1, _, _>(
name,
version,
queue_handle,
(),
);
let pointer = manager.create_virtual_pointer(None, queue_handle, ());
println!("Virtual pointer manager created");
pointer
});
}
}
}

View file

@ -0,0 +1,16 @@
use crate::components::MouseArea;
use dioxus::prelude::*;
/// The Home page component that will be rendered when the current route is `[Route::Home]`
#[component]
pub fn Home() -> Element {
#[css_module("/assets/styling/home.module.css")]
struct Styles;
rsx! {
div {
class: Styles::container,
MouseArea { }
}
}
}

View file

@ -0,0 +1,15 @@
//! The views module contains the components for all Layouts and Routes for our app. Each layout and route in our [`Route`]
//! enum will render one of these components.
//!
//!
//! The [`Home`] and [`Blog`] components will be rendered when the current route is [`Route::Home`] or [`Route::Blog`] respectively.
//!
//!
//! The [`Navbar`] component will be rendered on all pages of our app since every page is under the layout. The layout defines
//! a common wrapper around all child routes.
mod home;
pub use home::Home;
mod navbar;
pub use navbar::Navbar;

View file

@ -0,0 +1,22 @@
use crate::Route;
use dioxus::prelude::*;
#[component]
pub fn Navbar() -> Element {
#[css_module("/assets/styling/navbar.module.css")]
struct Styles;
rsx! {
div {
class: Styles::navbar,
Link {
to: Route::Home {},
"Home"
}
}
// The `Outlet` component is used to render the next component inside the layout. In this case, it will render either
// the [`Home`] or [`Blog`] component depending on the current route.
Outlet::<Route> {}
}
}

View file

@ -10,6 +10,7 @@ categories = ["web-programming"]
readme = "README.md"
[dependencies]
tokio = { version = "1.49.0", features = ["full"] }
wayland-client = "0.31.12"
wayland-protocols-wlr = { version = "0.3.10", features = ["client"] }

View file

@ -1,3 +1,14 @@
use std::{
alloc::System,
f64,
future::poll_fn,
time::{Duration, SystemTime, UNIX_EPOCH},
};
use tokio::{
select,
time::{self, Instant},
};
use wayland_client::{Connection, Dispatch, Proxy, QueueHandle, protocol::wl_registry};
use wayland_protocols_wlr::virtual_pointer::v1::client::{
zwlr_virtual_pointer_manager_v1::ZwlrVirtualPointerManagerV1,
@ -42,20 +53,16 @@ impl Dispatch<wl_registry::WlRegistry, ()> for AppData {
event: wl_registry::Event,
_: &(),
_: &Connection,
queue_handle: &QueueHandle<AppData>,
queue_handle: &QueueHandle<Self>,
) {
// When receiving events from the wl_registry, we are only interested in the
// `global` event, which signals a new available global.
// When receiving this event, we just print its characteristics in this example.
println!("WlRegistry Event");
if let wl_registry::Event::Global {
name,
interface,
version,
} = event
&& interface == "zwlr_virtual_pointer_manager_v1"
{
//println!("[{name}] {interface} (v{version})");
if interface.as_str() == "zwlr_virtual_pointer_manager_v1" {
app_data.virtual_pointer.get_or_insert_with(|| {
let manager = registry.bind::<ZwlrVirtualPointerManagerV1, _, _>(
name,
@ -72,9 +79,9 @@ impl Dispatch<wl_registry::WlRegistry, ()> for AppData {
}
}
}
}
fn main() {
#[tokio::main]
async fn main() {
let connection = Connection::connect_to_env().unwrap();
let display = connection.display();
@ -86,14 +93,41 @@ fn main() {
let mut appdata = AppData::default();
event_queue.roundtrip(&mut appdata).unwrap();
let mut interval = time::interval(Duration::from_millis(15));
let start = Instant::now();
loop {
let dispatched = event_queue.dispatch_pending(&mut appdata).unwrap();
if dispatched == 0 {
event_queue.flush().unwrap();
if Instant::now().duration_since(start) > Duration::from_secs(5) {
break;
}
if let Some(pointer) = &appdata.virtual_pointer {
println!("Moving pointer?")
select! {
poll = poll_fn(|cx| event_queue.poll_dispatch_pending(cx, &mut appdata)) => {
println!("Did the mash");
},
now = interval.tick() => {
if let Some(pointer) = appdata.virtual_pointer.as_mut() {
handle_pointer_motion(now, &pointer);
}
event_queue.flush().unwrap();
},
}
}
}
pub fn handle_pointer_motion(
time: Instant,
pointer: &ZwlrVirtualPointerV1,
) {
let time = SystemTime::now()
.duration_since(UNIX_EPOCH)
.unwrap()
.as_millis();
let x = ((time as f64 / 1000.0 * f64::consts::PI).sin() * 10.0);
let y = ((time as f64 / 1000.0 * f64::consts::PI).cos() * 10.0);
pointer.motion(time as u32, x, y);
pointer.frame();
}

View file

@ -56,15 +56,46 @@
devenv.shells.default =
let
fnx = inputs'.fenix.packages;
rustToolchain = fnx.beta.toolchain;
rustToolchain = fnx.combine [
fnx.complete.cargo
fnx.complete.clippy
fnx.complete.rust-src
fnx.complete.rustc
fnx.complete.rustfmt
fnx.targets.wasm32-unknown-unknown.latest.rust-std
];
# rustToolchain = fnx.combine [
# fnx.complete.cargo
# fnx.complete.clippy
# fnx.complete.rust-src
# fnx.complete.rustc
# fnx.complete.rustfmt
# ];
wasmBindgen = with pkgs; rustPlatform.buildRustPackage rec {
pname = "wasm-bindgen-cli";
version = "0.2.114";
src = fetchCrate {
pname = pname;
version = version;
hash = "sha256-xrCym+rFY6EUQFWyWl6OPA+LtftpUAE5pIaElAIVqW0=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
inherit (src) pname version;
hash = "sha256-Z8+dUXPQq7S+Q7DWNr2Y9d8GMuEdSnq00quUR0wDNPM=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
openssl
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
curl
];
nativeCheckInputs = [ nodejs_latest ];
# tests require it to be ran in the wasm-bindgen monorepo
doCheck = false;
};
in
{
name = "my-project";
@ -75,8 +106,10 @@
pkgs.cargo-deny
pkgs.cargo-nextest
pkgs.typos
pkgs.binaryen #wasm-opt
rustToolchain
fnx.rust-analyzer
wasmBindgen
];