This commit is contained in:
Tao Tien 2026-05-25 17:50:39 -07:00
commit 83428f97f5
12 changed files with 187 additions and 0 deletions

12
.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
target/
# Devenv
.devenv*
devenv.local.nix
devenv.local.yaml
# direnv
.direnv
# pre-commit
.pre-commit-config.yaml

15
Cargo.lock generated Normal file
View file

@ -0,0 +1,15 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "combustcean-core"
version = "0.1.0"
[[package]]
name = "combustcean-range"
version = "0.1.0"
[[package]]
name = "combustcean-tongs"
version = "0.1.0"

3
Cargo.toml Normal file
View file

@ -0,0 +1,3 @@
[workspace]
resolver = "3"
members = ["combustcean-core", "combustcean-range", "combustcean-tongs"]

View file

@ -0,0 +1,6 @@
[package]
name = "combustcean-core"
version = "0.1.0"
edition = "2024"
[dependencies]

View file

@ -0,0 +1,14 @@
pub fn add(left: u64, right: u64) -> u64 {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

View file

@ -0,0 +1,6 @@
[package]
name = "combustcean-range"
version = "0.1.0"
edition = "2024"
[dependencies]

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

View file

@ -0,0 +1,6 @@
[package]
name = "combustcean-tongs"
version = "0.1.0"
edition = "2024"
[dependencies]

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

86
devenv.lock Normal file
View file

@ -0,0 +1,86 @@
{
"nodes": {
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1779749056,
"narHash": "sha256-AtocdrunzuxTvSDn+82RntEhrs6TicM6Z4/zNQS9KKg=",
"owner": "cachix",
"repo": "devenv",
"rev": "099ac65fcef79e88127bdc06adbd1ea94255274a",
"type": "github"
},
"original": {
"dir": "src/modules",
"owner": "cachix",
"repo": "devenv",
"type": "github"
}
},
"nixpkgs": {
"inputs": {
"nixpkgs-src": "nixpkgs-src"
},
"locked": {
"lastModified": 1778507786,
"narHash": "sha256-HzSQCKMsMr8r55LwM1JuzIOB+8bzk0FEv6sItKvsfoY=",
"owner": "cachix",
"repo": "devenv-nixpkgs",
"rev": "8f24a228a782e24576b155d1e39f0d914b380691",
"type": "github"
},
"original": {
"owner": "cachix",
"ref": "rolling",
"repo": "devenv-nixpkgs",
"type": "github"
}
},
"nixpkgs-src": {
"flake": false,
"locked": {
"lastModified": 1778274207,
"narHash": "sha256-I4puXmX1iovcCHZlRmztO3vW0mAbbRvq4F8wgIMQ1MM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b3da656039dc7a6240f27b2ef8cc6a3ef3bccae7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"devenv": "devenv",
"nixpkgs": "nixpkgs",
"rust-overlay": "rust-overlay"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1779765539,
"narHash": "sha256-2QxuD5gJcfCFsnqv54LGEHQKvd+K+DW/ecERwAvuA7w=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "09889992e640378f7008c3302b9d4892579df610",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

25
devenv.nix Normal file
View file

@ -0,0 +1,25 @@
{
pkgs,
lib,
config,
inputs,
...
}: {
processes."tongs:watch" = {
cwd = "./combustcean-tongs";
watch = {
paths = [./combustcean-tongs/src];
extensions = ["rs" "toml"];
};
exec = ''
cargo build --target thumbv7em-none-eabihf --release && \
run-fap ../target/thumbv7em-none-eabihf/release/combustcean-tongs.fap -p /dev/ttyACM0
'';
};
packages = with pkgs; [
# keep-sorted start
jujutsu
# keep-sorted end
];
}

8
devenv.yaml Normal file
View file

@ -0,0 +1,8 @@
inputs:
nixpkgs:
url: github:cachix/devenv-nixpkgs/rolling
rust-overlay:
url: github:oxalica/rust-overlay
inputs:
nixpkgs:
follows: nixpkgs