Skip to content
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

Cross-Platformization #108

Open
justinpombrio opened this issue Oct 18, 2024 · 0 comments
Open

Cross-Platformization #108

justinpombrio opened this issue Oct 18, 2024 · 0 comments

Comments

@justinpombrio
Copy link
Owner

Goals for Installation

  1. You can run synless from any directory.
  2. After installation, edits to the scripts and grammars in the source directory don't effect the installed version of Synless. (If they do, it will make development harder once we're using Synless to develop Synless.)
  3. It's easy for users.
  4. It's easy for us.
  5. You can uninstall Synless to remove the binary, scripts, and grammars.
  6. It's cross platform and cross architecture.

Possible Approaches

  • Pre-compiled binaries. Great on all fronts except (4): it's a lot of busywork for us. Though not as bad as I originally feared; e.g. see https://github.com/kornelski/cargo-deb#readme for how easy it is to make a Debian package.
  • Install with cargo install --path . --locked. To access the scripts and grammars after installation, they need to be copied to a standard place (e.g. XDG_DATA_HOME) during build time. This can be done in build.rs, but is against the spec to do so. Nevertheless, it is what Ki does (see runtime_dir()). Fails (5) and is morally wrong.
  • Use an env var. Have users set an environment variable during installation, pointing at the source directory to find scripts and grammars. Fails (2), and (3) a little bit.
  • Use an env var, and copy data files into target/. Like the above, but also copy scripts and grammars into target/ when building. Fails (3) a little bit, otherwise good.
  • Use a Makefile. Fails (4) if done well, and some combination of (3) and (6) because Makefiles aren't windows native.
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

No branches or pull requests

1 participant