Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
# the vX.Y.Z tag — and the tag triggers the GoReleaser workflow.
- uses: changesets/action@v1
with:
version: npx changeset version
version: npm run version # changeset version + sync rust/Cargo.toml (lockstep)
publish: npm run release
env:
# A PAT (contents:write + pull-requests:write on this repo) lets the
Expand Down
10 changes: 10 additions & 0 deletions rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ pub mod prelude {
#[macro_export]
macro_rules! shellcade_game {
($game:expr) => {
// Native builds (cargo test) have no exports, so the registration is
// surfaced as a doc-hidden pub fn instead: it type-checks the Game
// impl, roots the whole game for dead-code analysis, and hands tests
// a constructor.
#[cfg(not(target_arch = "wasm32"))]
#[doc(hidden)]
pub fn __shellcade_game() -> impl $crate::Game {
$game
}

#[cfg(target_arch = "wasm32")]
const _: () = {
::std::thread_local! {
Expand Down
Loading