I've released an updated version of lukewilliamboswell/basic-ssg.
This is similar to the current roc-lang/roc/examples/static-site-gen
but with some upgrades and fixes.
My goal is to switch my blog and the roc website over to this platform so we can remove that example from the roc-lang/roc
repo, and move it into the roc-lang/examples
instead.
Please let me know if you use this, or have any ides to improve it. :smiley:
Another interesting note, is that this is the first rust platform that can cross-compile for multiple targets from the one machine. The bundle.sh
script basically does the following to produce the prebuilt binaries for all supported targets, and bundle those into a package.
# ADD TARGETS
rustup target add aarch64-apple-darwin
rustup target add x86_64-unknown-linux-gnu
rustup target add x86_64-apple-darwin
rustup target add aarch64-unknown-linux-gnu
# LEGACY LINKER ARTEFACTS
cargo build --release --target=aarch64-apple-darwin
cp target/aarch64-apple-darwin/release/libhost.a platform/macos-arm64.a
cargo build --release --target=aarch64-unknown-linux-gnu
cp target/aarch64-unknown-linux-gnu/release/libhost.a platform/linux-arm64.a
cargo build --release --target=x86_64-unknown-linux-gnu
cp target/x86_64-unknown-linux-gnu/release/libhost.a platform/linux-x64.a
cargo build --release --target=x86_64-apple-darwin
cp target/aarch64-apple-darwin/release/libhost.a platform/macos-x64.a
# BUNDLE INTO PACKAGE
roc build --bundle .tar.br platform/main.roc
I've made an update to lukewilliamboswell/basic-ssg and included an example to show the capabilities of the platform.
You can test it out by running bash example/build.sh
which will build the example site and host the static files using simple-http-server
.
Hopefully this will make it easier for people to get started. :smiley:
Last updated: Jul 06 2025 at 12:14 UTC