diff --git a/.github/workflows/build-dev-and-ci.yml b/.github/workflows/build-dev-and-ci.yml index e62ea3bc..016d42cb 100644 --- a/.github/workflows/build-dev-and-ci.yml +++ b/.github/workflows/build-dev-and-ci.yml @@ -48,11 +48,9 @@ jobs: rustc --version - name: ✂ Replace template in
of index.html - if: github.ref != 'refs/heads/master' - env: - INDEX_HTML_HEAD_REPLACEMENT: "" run: | # Remove the INDEX_HTML_HEAD_REPLACEMENT environment variable for build links (not master deploys) + git rev-parse --abbrev-ref HEAD | grep master > /dev/null || export INDEX_HTML_HEAD_REPLACEMENT="" sed -i "s||$INDEX_HTML_HEAD_REPLACEMENT|" frontend/index.html - name: 🌐 Build Graphite web code diff --git a/.nix/flake.nix b/.nix/flake.nix index b17a13eb..1371c406 100644 --- a/.nix/flake.nix +++ b/.nix/flake.nix @@ -1,14 +1,12 @@ # This is a helper file for people using NixOS as their operating system. # If you don't know what this file does, you can safely ignore it. -# This file defines both the development environment for the project. +# This file defines the reproducible development environment for the project. # # Development Environment: -# - Provides all necessary tools for Rust/WASM development -# - Includes Tauri dependencies for desktop app development +# - Provides all necessary tools for Rust/Wasm development # - Sets up profiling and debugging tools # - Configures mold as the default linker for faster builds # -# # Usage: # - Development shell: `nix develop` # - Run in dev shell with direnv: add `use flake` to .envrc @@ -16,7 +14,6 @@ description = "Development environment and build configuration"; inputs = { - # This url should be changed to match your system packages if you work on tauri because you need to use the same graphics library versions as the ones used by your system nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; rust-overlay = { @@ -96,7 +93,6 @@ pkgs.pkg-config pkgs.git pkgs.gobject-introspection - pkgs-unstable.cargo-tauri pkgs-unstable.cargo-about # Linker diff --git a/editor/src/node_graph_executor/runtime_io.rs b/editor/src/node_graph_executor/runtime_io.rs index b6797f3a..2c6bd048 100644 --- a/editor/src/node_graph_executor/runtime_io.rs +++ b/editor/src/node_graph_executor/runtime_io.rs @@ -1,7 +1,7 @@ use super::*; use std::sync::mpsc::{Receiver, Sender}; -/// Handles communication with the NodeRuntime, either locally or via Tauri +/// Handles communication with the NodeRuntime #[derive(Debug)] pub struct NodeRuntimeIO { // Send to diff --git a/frontend/README.md b/frontend/README.md index 657f90ac..3a75c833 100644 --- a/frontend/README.md +++ b/frontend/README.md @@ -1,8 +1,6 @@ # Overview of `/frontend/` -The Graphite frontend is a web app that provides the presentation for the editor. It displays the GUI based on state from the backend and provides users with interactive widgets that send updates to the backend, which is the source of truth for state information. The frontend is built out of reactive components using the [Svelte](https://svelte.dev/) framework. The backend is written in Rust and compiled to WebAssembly (WASM) to be run in the browser alongside the JS code. - -For lack of other options, the frontend is currently written as a web app. Maintaining web compatibility will always be a requirement, but the long-term plan is to port this code to a Rust-based native GUI framework, either written by the Rust community or created by our project if necessary. As a medium-term compromise, we may wrap the web-based frontend in a desktop webview windowing solution like Electron (probably not) or [Tauri](https://tauri.app/) (probably). +The Graphite frontend is a web app that provides the presentation for the editor. It displays the GUI based on state from the backend and provides users with interactive widgets that send updates to the backend, which is the source of truth for state information. The frontend is built out of reactive components using the [Svelte](https://svelte.dev/) framework. The backend is written in Rust and compiled to WebAssembly (Wasm) to be run in the browser alongside the JS code. ## Bundled assets: `assets/` @@ -18,15 +16,15 @@ Source code for the web app in the form of Svelte components and [TypeScript](ht ## WebAssembly wrapper: `wasm/` -Wraps the editor backend codebase (`/editor`) and provides a JS-centric API for the web app to use unburdened by Rust's complex data types that are incompatible with JS data types. Bindings (JS functions that call into the WASM module) are provided by [wasm-bindgen](https://rustwasm.github.io/docs/wasm-bindgen/) in concert with [wasm-pack](https://github.com/rustwasm/wasm-pack). +Wraps the editor backend codebase (`/editor`) and provides a JS-centric API for the web app to use as an entry point, unburdened by Rust's complex data types that are incompatible with JS data types. Bindings (JS functions that call into the Wasm module) are provided by [wasm-bindgen](https://rustwasm.github.io/docs/wasm-bindgen/) in concert with [wasm-pack](https://github.com/rustwasm/wasm-pack). -## ESLint configurations: `.eslintrc.js` +## ESLint configurations: `.eslintrc.cjs` [ESLint](https://eslint.org/) is the tool which enforces style rules on the JS, TS, and Svelte files in our frontend codebase. As it is set up in this config file, ESLint will complain about bad practices and often help reformat code automatically when (in VS Code) the file is saved or `npm run lint` is executed. (If you don't use VS Code, remember to run this command before committing!) This config file for ESLint sets our style preferences and configures our usage of extensions/plugins for Svelte support and [Prettier](https://prettier.io/)'s role as a code formatter. ## npm ecosystem packages: `package.json` -While we don't use Node.js as a JS-based server, we do have to rely on its wide ecosystem of packages for our build system toolchain. If you're just getting started, make sure to install the latest LTS copy of Node.js. Our project's philosophy on third-party packages is to keep our dependency tree as light as possible, so adding anything new to our `package.json` should have overwhelming justification. Most of the packages are just development tooling (TypeScript, Vite, ESLint, Prettier, wasm-pack, and [Sass](https://sass-lang.com/)) that run in your console during the build process. +While we don't use Node.js as a JS-based server, we do rely on its ecosystem of packages for our build system toolchain. If you're just getting started, make sure to install the latest LTS copy of [Node.js](https://nodejs.org/en/download). Our project's philosophy on third-party packages is to keep our dependency tree as light as possible, so adding anything new to our `package.json` should have overwhelming justification. Most of the packages are just development tooling (TypeScript, Vite, ESLint, Prettier, and [Sass](https://sass-lang.com/)) that run in your terminal during the build process. ## npm package installed versions: `package-lock.json` @@ -36,6 +34,6 @@ Specifies the exact versions of packages installed in the npm dependency tree. W Basic configuration options for the TypeScript build tool to do its job in our repository. -## Vite configurations: `vite.config.js` +## Vite configurations: `vite.config.ts` We use the [Vite](https://vitejs.dev/) bundler/build system. This file is where we configure Vite to set up plugins (like the third-party license checker/generator). Part of the license checker plugin setup includes some functions to format web package licenses, as well as Rust package licenses provided by [cargo-about](https://github.com/EmbarkStudios/cargo-about), into a text file that's distributed with the application to provide license notices for third-party code. diff --git a/frontend/src/utility-functions/keyboard-entry.ts b/frontend/src/utility-functions/keyboard-entry.ts index e33181cd..1749f53c 100644 --- a/frontend/src/utility-functions/keyboard-entry.ts +++ b/frontend/src/utility-functions/keyboard-entry.ts @@ -32,7 +32,7 @@ export function textInputCleanup(text: string): string { //
-
-
-
-
-
-
-
-
-
-
-
## Codebase structure
Graphite is built from several main software components. New developers may choose to specialize in one or more area without having to attain a working knowledge of the full codebase.
diff --git a/website/content/volunteer/guide/graphene/_index.md b/website/content/volunteer/guide/graphene/_index.md
index 76e2c509..738b3431 100644
--- a/website/content/volunteer/guide/graphene/_index.md
+++ b/website/content/volunteer/guide/graphene/_index.md
@@ -62,7 +62,7 @@ The fully compiled regime is used only when the user exports the procedural artw
### Compile server
-The three regimes have thus far been only a description of the eventual architecture direction. The interpreted regime is currently the only mode implemented in Graphene. The other two will require access to `rustc` which will necessitate the compile server that we will finish building and then publicly host for Graphite users in the future. Users of the desktop version of Graphite, utilizing [Tauri](https://tauri.app/), will be able to use an embedded `rustc` if the user has opted to download the Rust toolchain while installing Graphite.
+The three regimes have thus far been only a description of the eventual architecture direction. The interpreted regime is currently the only mode implemented in Graphene. The other two will require access to `rustc` which will necessitate the compile server that we will finish building and then publicly host for Graphite users in the future. Users of the desktop version of Graphite will be able to use an embedded `rustc` if the user has opted to download the Rust toolchain while installing Graphite.
Without a compile server, all the nodes are precompiled when Graphite is built. The node registry (in the file `node_registry.rs`) currently exists to allow the interpreted executor to find the Rust functions that correspond to each node with its appropriate type signature. Nodes support generics, so it's currently necessary to list every forseeable concrete type signature in the registry until the compile server can generate bytecode for less common type combinations on-the-fly.
diff --git a/website/content/volunteer/guide/project-setup/_index.md b/website/content/volunteer/guide/project-setup/_index.md
index bc7bad72..e40c55c4 100644
--- a/website/content/volunteer/guide/project-setup/_index.md
+++ b/website/content/volunteer/guide/project-setup/_index.md
@@ -26,8 +26,6 @@ cargo install -f wasm-bindgen-cli@0.2.100
Regarding the last one: you'll likely get faster build times if you manually install that specific version of `wasm-bindgen-cli`. It is supposed to be installed automatically but a version mismatch causes it to reinstall every single recompilation. It may need to be manually updated periodically to match the version of the `wasm-bindgen` dependency in [`Cargo.toml`](https://github.com/GraphiteEditor/Graphite/blob/master/Cargo.toml).
-Lastly, if you intend to develop using the Tauri desktop app build target, obtain [Tauri's dependencies](https://v2.tauri.app/start/prerequisites/). This is not the usual setup for most contributors, so you will know if you need it.
-
## Repository
Clone the project to a convenient location:
diff --git a/website/content/volunteer/guide/student-projects/_index.md b/website/content/volunteer/guide/student-projects/_index.md
index 58668431..434cc425 100644
--- a/website/content/volunteer/guide/student-projects/_index.md
+++ b/website/content/volunteer/guide/student-projects/_index.md
@@ -83,7 +83,7 @@ AI/ML is filling a rapidly growing role as a tool in the creative process. Graph