This commit is contained in:
2025-09-01 22:39:50 +10:00
parent 4b189cd50c
commit 3b7b0868b0
3 changed files with 82 additions and 8 deletions

77
flake.lock generated
View File

@@ -1,6 +1,63 @@
{ {
"nodes": { "nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"naersk",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1752475459,
"narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=",
"owner": "nix-community",
"repo": "fenix",
"rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"naersk": {
"inputs": {
"fenix": "fenix",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1752689277,
"narHash": "sha256-uldUBFkZe/E7qbvxa3mH1ItrWZyT6w1dBKJQF/3ZSsc=",
"owner": "nix-community",
"repo": "naersk",
"rev": "0e72363d0938b0208d6c646d10649164c43f4d64",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": {
"lastModified": 1752077645,
"narHash": "sha256-HM791ZQtXV93xtCY+ZxG1REzhQenSQO020cu6rHtAPk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "be9e214982e20b8310878ac2baa063a961c1bdf6",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1756542300, "lastModified": 1756542300,
"narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=", "narHash": "sha256-tlOn88coG5fzdyqz6R93SQL5Gpq+m/DsWpekNFhqPQk=",
@@ -18,7 +75,25 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "naersk": "naersk",
"nixpkgs": "nixpkgs_2"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1752428706,
"narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "591e3b7624be97e4443ea7b5542c191311aa141d",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
} }
} }
}, },

View File

@@ -2,21 +2,22 @@
description = "lead-rust"; description = "lead-rust";
inputs = { inputs = {
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
}; };
outputs = { outputs = {
self, self,
naersk,
nixpkgs, nixpkgs,
}: let }: let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs {inherit system;}; pkgs = import nixpkgs {inherit system;};
naerskLib = pkgs.callPackage naersk {};
in { in {
devShells.default = pkgs.mkShell { packages.${system}.default = naerskLib.buildPackage {
buildInputs = with pkgs; [ src = ./.;
openssl buildInputs = [pkgs.openssl];
];
nativeBuildInputs = [pkgs.pkg-config]; nativeBuildInputs = [pkgs.pkg-config];
}; };
}; };

View File

@@ -5,8 +5,6 @@ mod tokenizer;
use std::io; use std::io;
use std::{io, net::SocketAddr};
use tokio::{net::TcpListener, runtime::Runtime};
use websocket::server::WsServer; use websocket::server::WsServer;
use crate::{cell::CellRef, evaluator::Evaluator}; use crate::{cell::CellRef, evaluator::Evaluator};