GithubHelp home page GithubHelp logo

adamnemecek / homotopy-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from homotopy-io/homotopy-rs

0.0 1.0 0.0 9.54 MB

A Rust/WASM implementation of homotopy.io

Home Page: https://homotopy.io

License: BSD 3-Clause "New" or "Revised" License

JavaScript 0.34% Python 0.82% Rust 93.71% CSS 2.51% Nix 1.43% HTML 0.18% GLSL 1.00% Dockerfile 0.02%

homotopy-rs's Introduction

About the project

The homotopy.io proof assistant allows the construction of composite morphisms in a finitely-generated semistrict n-category, via a point-and-click user interface. Composites are rendered as 2d and 3d geometries, and can be visualised in 4d as movies of 3d geometries. Beyond its features as a visual proof assistant, homotopy.io can also be used as an effective tool to typeset string diagrams: any 2d diagram constructed in the proof assistant can be exported with ease into LaTeX/TikZ and SVG, with experimental support for manim.

The proof assistant is implemented in the Rust programming language, and compiled to WebAssembly to run in the web browser.

For a description of how the tool works, please see the nLab page. A more recent tutorial may be found here.

The master branch is hosted live here: https://beta.homotopy.io/

Developing

The easiest way to set up a development environment is with Nix.

Running

nix develop github:homotopy-io/homotopy-rs

will spawn a development shell with Rust, and all the necessary tooling required to build the project. Additionally, this is the exact same environment that the CI uses, so providing that it is passing, this cannot fail:

Build status

Any recent commit can be run with

nix run github:homotopy-io/homotopy-rs?rev=X

Please adhere to Rust stable and lint all code with nix run github:homotopy-io/homotopy-rs#lint.

Development server

From the root of the project, run cargo make serve. This will build the app into /dist, and concurrently run a development server on http://localhost:5000, which refreshes whenever the code changes. Alternatively, the project can be built with nix build, with the development server invoked by sfz -r result/, where result/ is the nix-build output folder.

Nix & GitHub Actions

This project uses GitHub Actions CI, for automating builds, testing, and deployment. GitHub Actions uses Nix to build, and the resulting compilation artifacts should like-for-like match those generated by nix-build. In particular, this allows binary artifacts (including witnesses of tests being run!) to be substituted across machines, in the standard way supported by Nix. Nix builds are cached on Cachix. In other words, nix-build | cachix push homotopy-io allows the CI to skip compilation and test running.

Dependencies are updated via Dependabot, and are automatically merged (provided that all tests pass). Keep the Cargo.lock updated with any changes to the various Cargo.toml, e.g. by running cargo check inside a dev-shell, as not doing so may cause problems with the build.

Firebase

Builds are deployed to Firebase for hosting, by the GitHub Actions CI. https://beta.homotopy.io mirrors master, and any pull request generates a Firebase Hosting preview site, of the form homotopy-rs--homotopy-io-X.web.app.

In future, Firebase will also act as online storage for user projects.

Citing

The tool should be cited as follows:

@article{homotopy-io,
  author = {Nathan Corbyn and Lukas Heidemann and Nick Hu and Calin Tataru and Jamie Vicary},
  title = {The proof assistant homotopy.io},
  url = {https://homotopy.io/},
  date = {2022},
}

License

Unless explicitly stated otherwise, all contributions are licensed under the following terms.

Source

homotopy.io source code is published under the terms of the BSD 3-Clause License.

Documentation

Creative Commons License
homotopy.io documentation is licensed under a Creative Commons Attribution 4.0 International License.

Dependencies

We use the HiGHS linear programming solver for the layout algorithm:

Parallelizing the dual revised simplex method, Q. Huangfu and J. A. J. Hall, Mathematical Programming Computation, 10 (1), 119-142, 2018. DOI: 10.1007/s12532-017-0130-5

We use the keyboard-css library.

homotopy-rs's People

Contributors

calintat avatar dependabot[bot] avatar nickhu avatar zrho avatar doctorn avatar regular-citizen avatar github-actions[bot] avatar thud avatar h-yulong avatar akvile1206 avatar adamnemecek avatar jamievicary avatar mlharaujo avatar anastasia-courtney avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.