Skip to content

Instantly share code, notes, and snippets.

@wildwind123
Last active April 9, 2026 13:51
Show Gist options
  • Select an option

  • Save wildwind123/36cdf6929d7706945a00e6badf51fe71 to your computer and use it in GitHub Desktop.

Select an option

Save wildwind123/36cdf6929d7706945a00e6badf51fe71 to your computer and use it in GitHub Desktop.
Install Microsoft Edit
https://github.com/microsoft/edit
cd /tmp && \
rm -f edit.tar.zst && \
curl -s https://api.github.com/repos/microsoft/edit/releases/latest | \
grep -oP '"browser_download_url": "\K.*x86_64-linux-gnu\.tar\.zst' | \
xargs -I {} curl -L --fail -o edit.tar.zst {} && \
tar --zstd -xvf edit.tar.zst && \
sudo mv -f edit /usr/local/bin/microsoft-edit && \
sudo chmod +x /usr/local/bin/microsoft-edit && \
echo "✅ Microsoft Edit installed as microsoft-edit" && \
/usr/local/bin/microsoft-edit --version

build for old linux

docker run --rm -it \
  -v ./output:/output \
  ubuntu:22.04 bash -c '
    apt-get update && apt-get install -y git curl build-essential pkg-config libssl-dev libicu-dev ca-certificates &&
    curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y &&
    . "$HOME/.cargo/env" &&
    git clone https://github.com/microsoft/edit.git &&
    cd edit &&
    RUSTFLAGS="-C target-feature=+crt-static" cargo build --release &&
    cp target/release/edit /output/microsoft-edit &&
    chmod +x /output/microsoft-edit &&
    echo "✅ Build with static CRT completed!"
  '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment