-
Notifications
You must be signed in to change notification settings - Fork 176
Document migration plan #94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
IgnatiusPang
wants to merge
13
commits into
SimHacker:master
Choose a base branch
from
IgnatiusPang:document-migration-plan
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Document migration plan #94
IgnatiusPang
wants to merge
13
commits into
SimHacker:master
from
IgnatiusPang:document-migration-plan
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Documented a phased implementation plan for the simulation project, detailing core phases including Rust simulation, FFI API, Python UI development, and integration.
Added guidelines for Python coding standards, error handling, logging, and debugging.
Added comprehensive coding standards and best practices for Bash and R programming, including guidelines on readability, error handling, logging, and project organization.
This commit introduces the initial migration of the Micropolis simulation core from C to Rust, and sets up a Python FFI layer for a new UI. The key changes include: - A new Rust crate `micropolis-rs` with the basic structure of the simulation. - The main simulation loop (`map_scan`) has been ported from C. - Data structures have been moved to Rust, using `Vec`s instead of fixed-size arrays to enable serialization. - A Python FFI layer has been created using `pyo3`, exposing the `Micropolis` class and its methods. - Save/load functionality has been implemented using `serde` and `bincode`. - A basic Python UI using the Arcade library has been set up in `micropolis-arcade-ui`. - The Rust code is tested with unit and integration tests, and the FFI layer is tested with a Python script.
Feature: Initial Migration of Micropolis from C to Rust
feat: Continue migration of game to Rust and Python
feat: Continue migration of game to Rust and Python
This commit implements the core FFI bridge as described in Phase 2 of the project's plan of action. The following changes were made: - The `get_map_view` function in `micropolis-rs/src/lib.rs` was modified to accept x, y, width, and height parameters to return a partial view of the map. - A new static method, `create_city`, was added to the `Micropolis` Python class to provide a consistent API endpoint for city creation. - The verification script `micropolis-rs/test_wheel.py` was updated to use the new FFI functions and to import the correct `micropolis_engine` module instead of `micropolis_rs`. All existing Rust tests and the Python verification script pass, confirming the FFI bridge is functional.
Implement FFI Bridge for Rust Engine
Added a reference to the micropolis-rs codebase for development guidance.
As requested, this change updates the `plan_of_action.md` file to include a detailed enumeration of the C files that need to be ported to Rust for Phase 1 of the project. This provides a clear roadmap for the migration work.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.