Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
4d36582
WIP switch to oci lib from docker
kcking Nov 30, 2024
1d01b04
add file
kcking Nov 30, 2024
ff5c4be
WIP, still need to migrate to rules_nodejs
kcking Jan 18, 2025
833f34c
more WIP; js bundle now compiles
kcking Sep 4, 2025
c22d9b1
remove tailwind for now, fix server dir layout
kcking Sep 4, 2025
5e38efd
WIP
kcking Sep 4, 2025
8bbe2a1
bazel mod tidy or clean fixed it?
kcking Sep 4, 2025
34bd931
wip
kcking Sep 4, 2025
29f9087
tidy, debugging
kcking Sep 6, 2025
ecce09c
fixed static files minus css!
kcking Sep 6, 2025
8f1f8d7
we're so back! css works :tada:
kcking Sep 6, 2025
4ff4966
cleanup
kcking Sep 6, 2025
1930db6
fix -c opt
kcking Sep 6, 2025
06d0d83
wasmopt and brotli work again!
kcking Sep 6, 2025
b90f0ac
WIP multiarch
kcking Sep 6, 2025
befe84d
add toolchains for cross compilation
kcking Sep 8, 2025
8679983
upgrade to rust 1.89
kcking Sep 8, 2025
4eb2f6a
remove debug prints
kcking Sep 8, 2025
6ed853c
push using image_multiarch rule
kcking Sep 8, 2025
f10fcaf
remove unused stuff
kcking Sep 8, 2025
8b16ef3
update workflow
kcking Sep 8, 2025
8038e75
try upgrading tsconfig-to-swc to fix windows build
kcking Sep 8, 2025
0ad26c4
try hoist=false
kcking Sep 8, 2025
91a7481
enable runfiles on windows
kcking Sep 8, 2025
4d46e4b
try bazel 7 until https://github.com/bazelbuild/bazel/issues/26701 is…
kcking Sep 8, 2025
1e88e76
re-lock
kcking Sep 8, 2025
3dc6b16
try crate annotation to fix windows ring build
kcking Sep 8, 2025
dcf6ebe
upgrade wasm_bindgen
kcking Sep 8, 2025
5999403
edition 2024
kcking Sep 8, 2025
cd06a0d
manual wasm-bindgen toolchain to fix windows build
kcking Sep 10, 2025
578039f
upgrade bazel again wooo
kcking Sep 10, 2025
20da767
upgrade hermetic_cc to fix linux
kcking Sep 10, 2025
9e0cb05
upgrade platforms
kcking Sep 10, 2025
69c9d1c
nope its not actually fixed for windows
kcking Sep 10, 2025
e791c08
use git override for hermetic_toolchain
kcking Sep 10, 2025
8c25263
WIP
kcking Sep 10, 2025
524fa55
remove lto comment -- code size is the same
kcking Sep 10, 2025
dfa9e36
cleanups and try removing rules_go
kcking Sep 10, 2025
b5f9021
more cleanup
kcking Sep 10, 2025
1d0ec03
more
kcking Sep 10, 2025
01b506e
WIP
kcking Sep 10, 2025
6c202a5
WIP amd64
kcking Sep 10, 2025
35d36eb
try cc base image
kcking Sep 10, 2025
88eacc0
add both arches individually
kcking Sep 11, 2025
86a245c
arm and workdir
kcking Sep 12, 2025
3fbf620
amd64 works! needed manual platform transition...
kcking Sep 12, 2025
43b3aef
update post
kcking Sep 13, 2025
938860f
udpate target name in CI
kcking Sep 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bundle/node_modules
7 changes: 6 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
build --symlink_prefix=target/
build --incompatible_enable_cc_toolchain_resolution=1
common --enable_bzlmod

# passes an argument `--skipLibCheck` to *every* spawn of the TypeScript compiler, tsc
common --@aspect_rules_ts//ts:skipLibCheck=always

common:windows --enable_runfiles
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.6.1
5 changes: 3 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
- name: build opt
run: bazel build //server:opt
- name: build arm64 image
# docker golang library not implemented on windows
# rules_oci currently not working on windows
# https://github.com/bazel-contrib/rules_oci/pull/827
if: matrix.os != 'windows-latest'
run: bazel build //server:image-arm64
run: bazel build //server:image-multiarch
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/dist
node_modules
buck-out
bazel-*
40 changes: 16 additions & 24 deletions BUILD
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
load("@aspect_rules_js//js:defs.bzl", "js_library", "js_run_binary", "js_run_devserver", "js_test")
load("@bazel_skylib//rules:common_settings.bzl", "bool_flag")
load("@rules_rust//wasm_bindgen:defs.bzl", "rust_wasm_bindgen")
load("@crate_index//:defs.bzl", "aliases", "all_crate_deps")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_library")
load("@rules_rust_wasm_bindgen//:defs.bzl", "rust_wasm_bindgen")
load("//emsdk:emsdk.bzl", "wasmopt")

package(
Expand Down Expand Up @@ -41,7 +42,6 @@ rust_binary(
],
":fastbuild": [],
"//conditions:default": [
"-Clto",
"-Ccodegen-units=1",
"-Cpanic=abort",
"-Copt-level=z",
Expand All @@ -51,7 +51,6 @@ rust_binary(
normal = True,
) + [
":implfuture",
"@rules_rust//wasm_bindgen/3rdparty:wasm_bindgen",
],
)

Expand Down Expand Up @@ -97,37 +96,30 @@ filegroup(
name = "static_files",
srcs = glob(["static/**"]) + [
":tailwind",
":copybundletostatic",
"//bundle",
],
)

genrule(
name = "tailwind",
srcs = glob(["src/**/*.rs"]) + ["tailwind.config.js"],
outs = ["static/tailwind.css"],
cmd = "$(execpath @root_npm//tailwindcss/bin:tailwindcss) --output=$(OUTS)",
tools = ["@root_npm//tailwindcss/bin:tailwindcss"],
visibility = ["//:__pkg__"],
)

genrule(
name = "copybundletostatic",
srcs = ["//bundle"],
outs = ["static/bundle.js"],
cmd = "cp $(@D)/../bundle/bundle.js $(OUTS)",
cmd_bat = "copy \"$(@D)\\..\\bundle\\bundle.js\" $(OUTS)",
)

wasmopt(
name = "app_wasm_opt",
src = ":app_wasm",
out = "app_wasm_bg_opt.wasm",
out = "app_wasm/app_wasm_bg_opt.wasm",
)

genrule(
name = "app_wasm_opt_br",
srcs = [":app_wasm_opt"],
outs = ["app_wasm_bg_opt.wasm.br"],
outs = ["app_wasm/app_wasm_bg_opt.wasm.br"],
cmd = "$(execpath @brotli) -9 $<",
tools = ["@brotli"],
)

js_run_binary(
name = "tailwind",
srcs = glob(["src/**/*.rs"]) + [
"tailwind.config.js",
],
args = ["--output=static/css/tailwind.css"],
out_dirs = ["static/css"],
tool = "//bundle:tailwindcss",
)
75 changes: 41 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ members = [".", "server"]
name = "app"

[dependencies]
wasm-bindgen = "=0.2.92"
wasm-bindgen = "=0.2.100"
log = "0.4"
stylist = { version = "0.10.1", features = [
"yew",
Expand Down
Loading
Loading