sandstorm-io / vagrant-spk

Packaging tool for Sandstorm, a self-hosting platform for web apps!
Apache License 2.0
55 stars 29 forks source link

Create a workerd stack #341

Open ocdtrekkie opened 1 year ago

ocdtrekkie commented 1 year ago

This is the setup.sh I wrote a couple weeks ago which got me... most of the way there maybe?

sudo apt-get install -y clang libc++-dev libc++abi-dev g++ unzip zip git
curl -OL https://github.com/bazelbuild/bazel/releases/download/5.3.0/bazel-5.3.0-installer-linux-x86_64.sh
chmod +x bazel-5.3.0-installer-linux-x86_[64.sh](http://64.sh/)
./bazel-5.3.0-installer-linux-x86_[64.sh](http://64.sh/) --user

git -C "workerd" pull || git clone https://github.com/cloudflare/workerd
cd workerd
sudo /root/bin/bazel clean --expunge
sudo /root/bin/bazel build -c opt //src/workerd/server:workerd

But I wasn't able to get it to successfully build.

We can use the edge chat demo for testing, but durable objects support hasn't made it into workerd yet, so the useful apps will be limited. But one of their recent demos involves adding comments to static web pages using workerd, a concept we've wanted to explore more before.

ocdtrekkie commented 1 year ago

I think as per https://github.com/cloudflare/workerd/pull/302 it should be possible for a workerd stack to behave reasonably as a Sandstorm app with persistent storage now?

zenhack commented 1 year ago

Pijul's Nest might be a good "real" app to package once we've figured out the basic stack: https://pijul.org/posts/2023-05-23-nest-a-new-hope/