Skip to content

Commit 66f5804

Browse files
committed
functora-tagged-macros init
1 parent 8634d39 commit 66f5804

File tree

11 files changed

+182
-16
lines changed

11 files changed

+182
-16
lines changed

rust/.envrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
if [ -z "$NIX_DEVELOP_ONCE" ]; then
22
export NIX_DEVELOP_ONCE=1
3-
nix develop
3+
nix develop .#unfree --impure
44
fi

rust/flake.lock

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/flake.nix

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
description = "Rust Dev Shell";
33

44
inputs = {
5+
master.url = "github:nixos/nixpkgs";
56
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
67
unstable.url = "github:nixos/nixpkgs?ref=nixos-unstable";
78
rust-overlay.url = "github:oxalica/rust-overlay";
@@ -10,6 +11,7 @@
1011

1112
outputs = {
1213
self,
14+
master,
1315
nixpkgs,
1416
unstable,
1517
rust-overlay,
@@ -18,6 +20,21 @@
1820
flake-utils.lib.eachDefaultSystem (
1921
system: let
2022
pkgs = unstable.legacyPackages.${system};
23+
shell = {
24+
packages = with pkgs; [
25+
alejandra
26+
bacon
27+
cargo
28+
cargo-edit
29+
cargo-tarpaulin
30+
clippy
31+
rust-analyzer
32+
rustc
33+
rustfmt
34+
wasmtime
35+
license-generator
36+
];
37+
};
2138
mkRustPkg = pkg:
2239
pkgs.rustPlatform.buildRustPackage {
2340
name = pkg;
@@ -103,21 +120,16 @@
103120
'';
104121
};
105122
in {
106-
devShells.default = pkgs.mkShell {
107-
packages = with pkgs; [
108-
alejandra
109-
bacon
110-
cargo
111-
cargo-edit
112-
cargo-tarpaulin
113-
clippy
114-
rust-analyzer
115-
rustc
116-
rustfmt
117-
wasmtime
118-
license-generator
119-
];
120-
};
123+
devShells.default = pkgs.mkShell shell;
124+
devShells.unfree = pkgs.mkShell (shell
125+
// {
126+
packages =
127+
shell.packages
128+
++ [
129+
pkgs.qutebrowser
130+
master.legacyPackages.${system}.antigravity
131+
];
132+
});
121133
packages = rec {
122134
rustell = mkRustPkg "rustell";
123135
rustell-nvim = mkRustellNvim "${rustell}/bin/rustell";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/target
2+
tarpaulin-report.html
3+
lcov.info
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"rust-analyzer.cargo.features": ["serde", "diesel"]
3+
}

rust/functora-tagged-macros/Cargo.lock

Lines changed: 81 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[package]
2+
name = "functora-tagged-macros"
3+
license = "MIT"
4+
version = "0.1.0"
5+
edition = "2024"
6+
keywords = ["derive", "tagged", "newtype", "refinement", "literal"]
7+
categories = ["data-structures", "rust-patterns"]
8+
repository = "https://github.com/functora/functora.github.io/tree/master/rust/functora-tagged-macros"
9+
documentation = "https://docs.rs/functora-tagged-macros"
10+
description = "Procedural macros for inlining refined `functora-tagged` literals, eliminating boilerplate and runtime overhead."
11+
12+
[dependencies]
13+
functora-tagged = "0.1.2"
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2025 functora
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# functora-tagged-macros
2+
3+
Procedural macros for inlining refined `functora-tagged` literals, eliminating boilerplate and runtime overhead.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
edition = "2024"
2+
max_width = 60

0 commit comments

Comments
 (0)