Skip to content

Commit

Permalink
feat(sdk): add alto bundler
Browse files Browse the repository at this point in the history
  • Loading branch information
tuler committed Jul 19, 2024
1 parent dfebf04 commit 622b8d2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/hot-spiders-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/sdk": minor
---

add alto bundler
7 changes: 7 additions & 0 deletions packages/sdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ curl -sSL https://github.com/google/go-containerregistry/releases/download/v${CR
tar -zx -C /usr/local/bin
EOF

# alto
FROM node:18.19.0-bookworm AS alto
RUN npm install -g @pimlico/alto

# devnet files
FROM node:slim as devnet
ARG DEVNET_VERSION
Expand All @@ -72,6 +76,7 @@ apt-get install -y --no-install-recommends \
jq \
libarchive-tools \
locales \
nodejs \
squashfs-tools \
xxd \
xz-utils
Expand Down Expand Up @@ -102,13 +107,15 @@ RUN curl -sSL https://github.com/foundry-rs/foundry/releases/download/nightly-${
tar -zx -C /usr/local/bin

# healthcheck script using net_listening JSON-RPC method
COPY alto /usr/local/bin
COPY devnet /usr/local/bin
COPY eth_isready /usr/local/bin
COPY eth_dump /usr/local/bin
COPY eth_load /usr/local/bin
COPY create_machine_snapshot /usr/local/bin

COPY entrypoint.sh /usr/local/bin/
COPY --from=alto /usr/local/lib/node_modules/@pimlico/alto /usr/local/lib/node_modules/@pimlico/alto
COPY --from=su-exec /usr/local/src/su-exec /usr/local/bin/
COPY --from=crane /usr/local/bin/crane /usr/local/bin/
COPY --from=devnet /usr/local/lib/node_modules/@cartesi/devnet/export/abi/localhost.json /usr/share/cartesi/
Expand Down
2 changes: 2 additions & 0 deletions packages/sdk/alto
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
node "/usr/local/lib/node_modules/@pimlico/alto/esm/cli/index.js" $@

0 comments on commit 622b8d2

Please sign in to comment.