<p dir="auto">Expected behavior<br>
Is there any plan to release a Deno binary for linux-arm64?</p>
<p dir="auto">I have successfully created the binary for  Deno by running following:</p>
<p dir="auto">curl --proto '=https' --tlsv1.2 -sSf <a href="https://sh.rustup.rs" rel="nofollow">https://sh.rustup.rs</a> | sh<br>
export PATH=$PATH:$HOME/.cargo/bin<br>
apt install libglib2.0-dev<br>
git clone <a href="https://github.com/denoland/deno/">https://github.com/denoland/deno/</a><br>
cd deno<br>
cargo build -vv</p>
<p dir="auto">It will be very helpful if arm64 binaries are released. If any help is required in releasing them, I am happy to contribute.</p>
<p dir="auto">Actual behavior<br>
Deno binary is available for amd64 only.</p>
<p dir="auto">Builds for arm64 are now in CI, but are not ready for release. We still need to make some changes to make the tests work with this build.<br>
<strike>I managed to get deno to build for arm64 using the <code class="notranslate">aarch64-unknown-linux-gnu</code> target. Currently It doesn't execute successfully on a raspberry pi 3b+ running <a href="https://wiki.debian.org/RaspberryPi3" rel="nofollow">a preview image of debian buster arm64/aarch64</a>. It gives me the following print out:</strike></p><strike>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="root@rpi3:~/deno-build# ./deno https://deno.land/welcome.ts
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xfffff58d4d10
==== C stack trace ===============================

    ./deno(+0x8ad5fc) [0xaaaaafc445fc]
    ./deno(+0x9dd72c) [0xaaaaafd7472c]
    ./deno(+0x8a9f10) [0xaaaaafc40f10]
    ./deno(+0x83aa08) [0xaaaaafbd1a08]
    ./deno(+0x69c070) [0xaaaaafa33070]
    ./deno(+0x7bdbb4) [0xaaaaafb54bb4]
    ./deno(+0x7bdb00) [0xaaaaafb54b00]
    ./deno(+0x7bc6bc) [0xaaaaafb536bc]
    ./deno(+0x7bd9f8) [0xaaaaafb549f8]
    ./deno(+0x7bbbb8) [0xaaaaafb52bb8]
    ./deno(+0x2165dc) [0xaaaaaf5ad5dc]
    ./deno(+0x7c0be4) [0xaaaaafb57be4]
    ./deno(+0x663f68) [0xaaaaaf9faf68]
    ./deno(+0x7c0124) [0xaaaaafb57124]
    ./deno(+0x1c8e80) [0xaaaaaf55fe80]
    ./deno(+0x1c8f68) [0xaaaaaf55ff68]
    ./deno(+0x1b3dec) [0xaaaaaf54adec]
    ./deno(+0xce2f0) [0xaaaaaf4652f0]
    ./deno(+0x112b78) [0xaaaaaf4a9b78]
    ./deno(+0x11ef74) [0xaaaaaf4b5f74]
    ./deno(+0xb80c38) [0xaaaaaff17c38]
    ./deno(+0xb8fcf4) [0xaaaaaff26cf4]
    ./deno(+0xb814ec) [0xaaaaaff184ec]
    ./deno(+0x112d50) [0xaaaaaf4a9d50]
    /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe4) [0xffff8644ed24]
    ./deno(+0xbae4c) [0xaaaaaf451e4c]
"><pre class="notranslate"><code class="notranslate">root@rpi3:~/deno-build# ./deno https://deno.land/welcome.ts
#
# Fatal error in , line 0
# unreachable code
#
#
#
#FailureMessage Object: 0xfffff58d4d10
==== C stack trace ===============================

    ./deno(+0x8ad5fc) [0xaaaaafc445fc]
    ./deno(+0x9dd72c) [0xaaaaafd7472c]
    ./deno(+0x8a9f10) [0xaaaaafc40f10]
    ./deno(+0x83aa08) [0xaaaaafbd1a08]
    ./deno(+0x69c070) [0xaaaaafa33070]
    ./deno(+0x7bdbb4) [0xaaaaafb54bb4]
    ./deno(+0x7bdb00) [0xaaaaafb54b00]
    ./deno(+0x7bc6bc) [0xaaaaafb536bc]
    ./deno(+0x7bd9f8) [0xaaaaafb549f8]
    ./deno(+0x7bbbb8) [0xaaaaafb52bb8]
    ./deno(+0x2165dc) [0xaaaaaf5ad5dc]
    ./deno(+0x7c0be4) [0xaaaaafb57be4]
    ./deno(+0x663f68) [0xaaaaaf9faf68]
    ./deno(+0x7c0124) [0xaaaaafb57124]
    ./deno(+0x1c8e80) [0xaaaaaf55fe80]
    ./deno(+0x1c8f68) [0xaaaaaf55ff68]
    ./deno(+0x1b3dec) [0xaaaaaf54adec]
    ./deno(+0xce2f0) [0xaaaaaf4652f0]
    ./deno(+0x112b78) [0xaaaaaf4a9b78]
    ./deno(+0x11ef74) [0xaaaaaf4b5f74]
    ./deno(+0xb80c38) [0xaaaaaff17c38]
    ./deno(+0xb8fcf4) [0xaaaaaff26cf4]
    ./deno(+0xb814ec) [0xaaaaaff184ec]
    ./deno(+0x112d50) [0xaaaaaf4a9d50]
    /lib/aarch64-linux-gnu/libc.so.6(__libc_start_main+0xe4) [0xffff8644ed24]
    ./deno(+0xbae4c) [0xaaaaaf451e4c]

</code></pre></div>
</strike><p dir="auto"><strike>I opened up the executable with a <a href="https://github.com/radareorg/cutter">arm compatible disassembler</a>, and located the last call from within deno before failure, <code class="notranslate">0x1b3dec</code>. It looks like this call occurs here </strike></p><div class="Box Box--condensed my-2"><strike>
  <div class="Box-header f6">
    <p class="mb-0 text-bold">
      <a href="https://github.com/denoland/deno/blob/b8a537d020f5e4495572daa4d8a59f51fa3b20d1/libdeno/api.cc#L54">deno/libdeno/api.cc</a>
    </p>
    <p class="mb-0 color-fg-muted">
         Line 54
      in
      <a data-pjax="true" class="commit-tease-sha" href="/denoland/deno/commit/b8a537d020f5e4495572daa4d8a59f51fa3b20d1">b8a537d</a>
    </p>
  </div>
  <div itemprop="text" class="Box-body p-0 blob-wrapper blob-wrapper-embedded data">
    <table class="highlight tab-size mb-0 js-file-line-container" data-tab-size="8" data-paste-markdown-skip="">

        <tbody><tr class="border-0">
          <td id="L54" class="blob-num border-0 px-3 py-0 color-bg-default" data-line-number="54"></td>
          <td id="LC54" class="blob-code border-0 px-3 py-0 color-bg-default blob-code-inner js-file-line"> v8::Isolate* isolate = <span class="pl-c1">v8::Isolate::New</span>(params); </td>
        </tr>
    </tbody></table>
  </div>
</strike></div><strike>
 This leads me to suspect an issue with loading the snapshot.</strike><p></p>
<strike>
I managed to get this working successfully with the changes in [my forked branch](https://github.com/afinch7/deno/tree/arm-builds).
<p dir="auto">To replicate my arm64 build you will need docker installed.<br>
Then it should be as simple as:</p>
<ol dir="auto">
<li>Add the following options to .gn</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="target_cpu = &quot;arm64&quot;
v8_target_cpu = &quot;arm64&quot;"><pre class="notranslate"><code class="notranslate">target_cpu = "arm64"
v8_target_cpu = "arm64"
</code></pre></div>
<ol start="2" dir="auto">
<li>Add the following to <code class="notranslate">Dockerfile</code> in your deno repo root</li>
</ol>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="FROM ubuntu:bionic

RUN apt update &amp;&amp; apt install -y curl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu

RUN echo &quot;[target.aarch64-unknown-linux-gnu]\nlinker = \&quot;aarch64-linux-gnu-gcc\&quot;&quot; &gt; /root/.cargo/config

RUN apt install -y nodejs yarn python build-essential cmake make

RUN apt -yq --no-install-suggests --no-install-recommends install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-7-multilib libc6-arm64-cross

WORKDIR /deno

RUN echo &quot;source $HOME/.cargo/env&quot; &gt; /root/.bash

CMD [&quot;/bin/bash&quot;, &quot;--init-file&quot;, &quot;/root/.bash&quot;]"><pre class="notranslate"><code class="notranslate">FROM ubuntu:bionic

RUN apt update &amp;&amp; apt install -y curl

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

RUN /root/.cargo/bin/rustup target add aarch64-unknown-linux-gnu

RUN echo "[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" &gt; /root/.cargo/config

RUN apt install -y nodejs yarn python build-essential cmake make

RUN apt -yq --no-install-suggests --no-install-recommends install g++-aarch64-linux-gnu gcc-aarch64-linux-gnu g++-7-multilib libc6-arm64-cross

WORKDIR /deno

RUN echo "source $HOME/.cargo/env" &gt; /root/.bash

CMD ["/bin/bash", "--init-file", "/root/.bash"]
</code></pre></div>
<ol start="3" dir="auto">
<li>Run <code class="notranslate">docker build -f Dockerfile -t deno-arm64-build . &amp;&amp; docker run -it -v "$PWD/:/deno" -u $(id -u root):$(id -g ${USER}) deno-arm64-build</code> in your deno repo root. This should build a docker image with the required tools and drop you into a bash shell on said image with your deno repo mounted at <code class="notranslate">/deno</code>.</li>
<li>From this point you simply need to run <code class="notranslate">cargo build --target=aarch64-unknown-linux-gnu --release</code></li>
<li>Once the build completes the executable should be located at <code class="notranslate">target/aarch64-unknown-linux-gnu/release/deno</code></li>
</ol>
</strike><p dir="auto"><strike>I wasn't able to get a build working with <code class="notranslate">tools/build.py</code>, since I couldn't find a way to specify a target for  rust <del>it might be possible to use env vars like CC, AR, CFLAGS, etc. I might try that at some point, but I'm putting my efforts into figuring out if the snapshots are even being included in the build correctly right now.</del></strike><strike><br>
I not sure what changed, but I can't get the build to work anymore with docker. I can still get this to work outside of docker though. I'm working on getting this into CI see <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="417467957" data-permission-text="Title is private" data-url="https://github.com/denoland/deno/issues/1887" data-hovercard-type="pull_request" data-hovercard-url="/denoland/deno/pull/1887/hovercard" href="https://github.com/denoland/deno/pull/1887">#1887</a>. The main problem with getting this into CI is how long it takes to build.</strike></p>
<p dir="auto">Edit: fixed some issues with the <code class="notranslate">Dockerfile</code><br>
Edit: added the current user group to the docker run command so this doesn't break your repo as much<br>
Edit: my forked branch has modifications to make this work now</p>