Skip to content

Migration support#147

Merged
JBenda merged 27 commits intomasterfrom
feature/migration
Apr 15, 2026
Merged

Migration support#147
JBenda merged 27 commits intomasterfrom
feature/migration

Conversation

@JBenda
Copy link
Copy Markdown
Owner

@JBenda JBenda commented Apr 15, 2026

Add the capability to load a snapshot from a previous version of a story.

A created snapshot got an can_be_migrated() function to check if the snapshot is migratable.
Rule of thumb: directly after choosing a choice, before reading any more content, the state should be migratable, as long as you are not in a tunnel.

Best practices also include using a hub knot for snapshots with no local variables, which is guaranteed to be kept around in future versions of the story.

Also, once only choices should get an explicit label, or you know that you will not reorder them, because this would break the tracking.

For more details, feel free to ask or look into inkcpp\include\snapshot.h

Fixes: #112

TODO:

  • add new interface to python
  • add new interface to c

Julian and others added 26 commits November 20, 2025 18:25
refactor: add simple flag to `managad_array` because msvc hicks on implace overwrite of abstract classes
tags for choices where stord as pointer not as offset in array
reconstructing globals from a snapshot leaves some state behind, when reconstruction again globals from the same snapshot this data need to be cleared first.

refactor: fixes clang compiler warnings
+ globals variabe migration
+ globals visit count migration
+ runner temp_var migration: store current_knot_id as hash
+ runner jump to current knot
+ runner load new static global/knot tags, discard old ones
+ disable C++STL, EH and RTTI for CLIB
+ add c bindnings for story::from_binary and snapshot::from_binary
+ add compile option INKCPP_NO_STL to generate more standalone lib files
…ve formatted asserts again

also added a format message for the endian assert
…ve formatted asserts again

also added a format message for the endian assert
Permanent lists are used also as base for variable
Permanent lists are used also as base for variable
Permanent lists are used also as base for variable
@JBenda JBenda force-pushed the feature/migration branch 4 times, most recently from 7ec2389 to b60309d Compare April 15, 2026 11:39
@JBenda JBenda force-pushed the feature/migration branch from b60309d to cf6f1aa Compare April 15, 2026 11:41
@JBenda JBenda force-pushed the feature/migration branch from cf6f1aa to a922651 Compare April 15, 2026 11:49
@github-actions
Copy link
Copy Markdown

Ink Proof Results

These results are obtained by running the Ink-Proof Testing Suite on the compiled binaries in this pull request.

System Results
Linux x64 130/130 passed
MacOSX-ARM DISABLED
MacOSX DISABLED
Windows x64 130/130 passed

@JBenda JBenda merged commit 51f8905 into master Apr 15, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Snapshot Migration

2 participants