{"id":13566108,"url":"https://github.com/ChristianSchott/boris","last_synced_at":"2025-04-03T23:31:09.261Z","repository":{"id":219081928,"uuid":"748114046","full_name":"ChristianSchott/boris","owner":"ChristianSchott","description":"Visualizing Ownership and Borrowing in Rust Programs","archived":false,"fork":false,"pushed_at":"2024-12-13T20:04:02.000Z","size":11336,"stargazers_count":41,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-13T21:18:49.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChristianSchott.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-25T09:57:30.000Z","updated_at":"2024-12-13T20:04:06.000Z","dependencies_parsed_at":"2024-03-01T14:29:19.316Z","dependency_job_id":"b3cbef55-2323-49bd-8d4d-0037bbc382c1","html_url":"https://github.com/ChristianSchott/boris","commit_stats":null,"previous_names":["christianschott/boris"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianSchott%2Fboris","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianSchott%2Fboris/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianSchott%2Fboris/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChristianSchott%2Fboris/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChristianSchott","download_url":"https://codeload.github.com/ChristianSchott/boris/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247097667,"owners_count":20883122,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:02:02.251Z","updated_at":"2025-04-03T23:31:04.252Z","avatar_url":"https://github.com/ChristianSchott.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# BORIS - A BORrow vISualizer for Rust programs\n\nThis tool tries to visualize Rust's memory management, especially ownership transfer and borrows.\nAiming to make these concepts easier to grasp for beginners, and experienced programmers switching from other languages.\n\nThis project is part of my master's thesis at the Julius-Maximilians-University Würzburg, so the main focus is currently on finishing the thesis, not adding more features and fixing bugs ( feel free to do so, though :) )\n\nFor now it is a standalone program, but IDE integration may be something to look into for the future.\n\n![](/imgs/app_example.png)\n\n### [\u003e\u003e Web viewer \u003c\u003c](https://christianschott.github.io/boris-viewer/#ownership)\n\n## Limitations\n\n- no borrow checker (no dependency unstable rust compiler hooks, or [polonius](https://github.com/rust-lang/polonius)).\n  - no (/limited) error visualizations. However, the visualizations should still be useful while debugging borrow checker errors.\n- complex lifetime annotations: rust analyzer does not lower lifetime annotations properly yet, meaning that any `struct test\u003c'a, 'b\u003e {}` will be treated as `struct test\u003c'a, 'a\u003e {}`\n- `async`\n- `unsafe` (interior mutability, inline assembly, etc.)\n- bugs\n- this was my first rust project, so coding style is probably suboptimal in many cases :)\n\n## Crates\n\n- `boris_shared`: data structures shared between the backend analysis, and rendering code\n- `boris_analysis`: the core analysis code, depending on rust analyzer\n- `boris_renderer`: code for rendering the analysis results\n- `boris_app`: a standalone app, combining the analysis backend with a very basic frontend window\n- `boris_viewer`: a WASM compatible frontend, for embedding into websites (without the analysis backend)\n- `boris_exporter`: an internal tool for exporting/serializing analysis outputs, and creating graphics for the thesis\n\n## Compilation\n\nApp:\n\n- `cargo run -p boris_app --release` to run the main application\n\nWASM Viewer:\n\n- run `trunk serve` in the `boris_viewer` folder for running the web viewer application locally. More information about deploying can be found [here](https://github.com/emilk/eframe_template#web-locally).\n- the viewer directly embeds pre-analysed function bodies from the `./example/export/bodies/` folder (see `./project/boris_viewer/examples.rs`)\n- access examples via `url/#example_name` (e.g., https://christianschott.github.io/boris-viewer/#ownership)\n\n## Related Works:\n\n- [RustViz](https://github.com/rustviz/rustviz)\n- [Aquascope](https://github.com/cognitive-engineering-lab/aquascope)\n- [Graphical depiction of ownership and borrowing in Rust](https://rufflewind.com/2017-02-15/rust-move-copy-borrow)\n- [Think Spatially to Grok Lifetimes](https://www.justanotherdot.com/posts/think-spatially-to-grok-lifetimes.html)\n- [Rust Lifetime Visualization Ideas](https://blog.adamant-lang.org/2019/rust-lifetime-visualization-ideas/)\n- [Flowistry](https://github.com/willcrichton/flowistry/)\n- [REVIS](https://marketplace.visualstudio.com/items?itemName=weirane.errorviz)\n\n## Credits\n\nIt is based on the powerful [rust-analyzer](https://github.com/rust-lang/rust-analyzer) crate, making this whole project even possible.\nFor the rendering it utilizes [egui](https://github.com/emilk/egui), as it provided a very fast and simple way for drawing to the screen.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChristianSchott%2Fboris","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FChristianSchott%2Fboris","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FChristianSchott%2Fboris/lists"}