Developers
HPO Curator is a tauri application with a Rust backend and an Angular front end.
The application makes major use of the following rust crates.
This page summarizes some of the angular and Rust/tauri commands that have been useful to create the application.
Initial setup
These steps were used to initialize the application and do not need to be repeated
1 |
|
The installer will ask questions about settings. We chose typescript, angular, npm.
Following this, run the following command.
1 |
|
Note that we are using standalone components.
Run the GUI application in development mode
1 |
|
Creating new components
To generate a new component, navigate to the src/app folder, make a directory with the name of the component, cd into the new directory, and enter the following command.
1 |
|
This will initialize the typical four files for an angular component.
Set up file system access
At the top level of the project, enter
1 |
|
in the src-tauri folder, enter
1 |
|
for the shell component (which opens the system browser)
1 |
|
In the angular component, add
1 2 |
|
Port issues
If one gets the error message: Port 1420 is already in use
, then use the following command to obtain the process ID:
1 2 3 |
|
then end the process with
1 |
|
This may also cause the typescript part of the app to not be updated when we run npm run tauri dev
.
Run in browser
Can be useful with the DevTools panel
1 |
|
Problems with tauri.conf.json
Try to get the latest version
1 2 |
|
generate a new file
1 |
|
file system (tauri v2)
npm run tauri add fs npm run tauri add dialog
.