This repository has been archived by the owner on Jan 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: devcontainer configuration * ci: add workflows * feat: set default shell * refactor: remove comments * feat: structure cargo project * feat: logo * docs: basic layout
- Loading branch information
1 parent
efd4485
commit 418bf30
Showing
21 changed files
with
226 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ARG VARIANT="buster" | ||
FROM mcr.microsoft.com/vscode/devcontainers/rust:0-${VARIANT} | ||
|
||
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ | ||
# && apt-get -y install --no-install-recommends <your-package-list-here> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{ | ||
"name": "Rust", | ||
"build": { | ||
"dockerfile": "Dockerfile", | ||
"args": { | ||
"VARIANT": "buster" | ||
} | ||
}, | ||
"runArgs": [ | ||
"--cap-add=SYS_PTRACE", | ||
"--security-opt", | ||
"seccomp=unconfined" | ||
], | ||
"customizations": { | ||
"vscode": { | ||
"settings": { | ||
"lldb.executable": "/usr/bin/lldb", | ||
"files.watcherExclude": { | ||
"**/target/**": true | ||
}, | ||
"rust-analyzer.checkOnSave.command": "clippy", | ||
"terminal.integrated.defaultProfile.linux": "zsh", | ||
"editor.formatOnSave": true, | ||
"html.completion.attributeDefaultValue": "singlequotes", | ||
"[html][handlebars]": { | ||
"editor.defaultFormatter": "vscode.html-language-features" | ||
}, | ||
"[javascript][javascriptreact][typescript]": { | ||
"editor.defaultFormatter": "vscode.typescript-language-features" | ||
}, | ||
"[json][jsonc]": { | ||
"editor.defaultFormatter": "vscode.json-language-features" | ||
}, | ||
"[css][scss][less]": { | ||
"editor.defaultFormatter": "vscode.css-language-features" | ||
} | ||
}, | ||
"extensions": [ | ||
"vadimcn.vscode-lldb", | ||
"mutantdino.resourcemonitor", | ||
"rust-lang.rust-analyzer", | ||
"tamasfe.even-better-toml", | ||
"serayuzgur.crates" | ||
] | ||
} | ||
}, | ||
// "forwardPorts": [], | ||
"postCreateCommand": "rustc --version", | ||
"remoteUser": "vscode" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
workflow_dispatch: | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Build | ||
run: cargo build --all --verbose | ||
- name: Run tests | ||
run: cargo test --all --verbose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
release: | ||
name: release ${{ matrix.target }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl] | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Compile and release | ||
uses: rust-build/rust-build.action@latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
RUSTTARGET: ${{ matrix.target }} | ||
EXTRA_FILES: "README.md LICENSE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,2 @@ | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
/target/ | ||
|
||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries | ||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html | ||
Cargo.lock | ||
|
||
# These are backup files generated by rustfmt | ||
**/*.rs.bk | ||
/target | ||
**/*.rs.bk |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[workspace] | ||
members = ["crates/*"] | ||
|
||
[package] | ||
name = "fpt" | ||
version = "0.0.0" | ||
authors = ["Jonas Mathisrud Sterud <[email protected]>"] | ||
edition = "2021" | ||
description = "Financial portfolio tracker" | ||
repository = "https://github.com/jonassterud/fpt" | ||
license = "MIT" | ||
|
||
[dependencies] | ||
fpt_api = { path = "crates/fpt_api" } | ||
fpt_web = { path = "crates/fpt_web" } | ||
|
||
anyhow = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,17 @@ | ||
# fpt | ||
Financial portfolio tracker | ||
 | ||
|
||
## About | ||
**fpt** is a financial portfolio tracker. | ||
|
||
## Configuration | ||
... | ||
|
||
## Contributing | ||
Feel free to contribute! | ||
|
||
Use tools such as [Rustfmt](https://github.com/rust-lang/rustfmt) and [Clippy](https://github.com/rust-lang/rust-clippy) to improve your code. | ||
Commit messages should follow [conventionalcommits.org](https://www.conventionalcommits.org). | ||
Where type is one of the following: `feat`, `fix`, `ci`, `docs` or `refactor`. | ||
|
||
## License | ||
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "fpt_api" | ||
version = "0.0.0" | ||
authors = ["Jonas Mathisrud Sterud <[email protected]>"] | ||
edition = "2021" | ||
description = "Financial portfolio tracker - API" | ||
repository = "https://github.com/jonassterud/fpt" | ||
license = "MIT" | ||
|
||
[dependencies] | ||
anyhow = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod tests; | ||
|
||
use anyhow::Result; | ||
|
||
pub fn start() -> Result<()> { | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[allow(unused_imports)] | ||
use super::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "fpt_web" | ||
version = "0.0.0" | ||
authors = ["Jonas Mathisrud Sterud <[email protected]>"] | ||
edition = "2021" | ||
description = "Financial portfolio tracker - web server" | ||
repository = "https://github.com/jonassterud/fpt" | ||
license = "MIT" | ||
|
||
[dependencies] | ||
anyhow = "1.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
mod tests; | ||
|
||
use anyhow::Result; | ||
|
||
pub fn start() -> Result<()> { | ||
todo!() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#[allow(unused_imports)] | ||
use super::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"bg-gradient-0": "#783192", | ||
"bg-gradient-1": "#59BCC8", | ||
"icon": "#ffffff", | ||
"font": "#ffffff", | ||
"slogan": "#ffffff" | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
use anyhow::Result; | ||
|
||
fn main() -> Result<()> { | ||
fpt_api::start()?; | ||
fpt_web::start()?; | ||
|
||
println!("Access fpt at: 127.0.0.1:8080"); | ||
|
||
Ok(()) | ||
} |