[-] secana@programming.dev 3 points 1 month ago

Just released Kellnr (https://kellnr.io) 5.2.6 with some bug fixes. I really wish I had more time for new features but at the moment my spare time is rare. If you want to host your own crates on your own infrastructure, check it out.

[-] secana@programming.dev 4 points 3 months ago

I reworked the whole CI/CD pipeline for https://kellnr.io. Switched from Ubuntu as the base image to the official Rust (Debian) image. Additionally, musl targets are build and released on github. This should allow kellnr to run out-of-the-box on any Linux distro.

[-] secana@programming.dev 2 points 3 months ago

Thanks for the response. You are right, the config was at the wrong path. Unfortunately, the config itself does not work, too. After a bit of testing around this worked for me:

apiVersion: v1
kind: PersistentVolume
metadata:
  name: nix-cache-volume
spec:
  capacity:
    storage: 500Gi
  storageClassName: manual
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/k8s/nix-cache" # Needs exists before PV is created!
  persistentVolumeReclaimPolicy: Retain
***
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: nix-cache-pvc
spec:
  accessModes:
    - ReadWriteOnce
  storageClassName: manual
  resources:
    requests:
      storage: 500Gi
***
apiVersion: apps/v1
kind: Deployment
metadata:
  name: nix-cache
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nix-cache
  template:
    metadata:
      labels:
        app: nix-cache
        name: nix-cache
    spec:
      volumes:
        - name: nix-cache-storage
          persistentVolumeClaim:
            claimName: nix-cache-pvc
        - name: nix-cache-config
          configMap:
            name: nix-cache-config
      containers:
        - name: nix-cache
          image: nginx:1.27.0 
          ports:
            - containerPort: 80
          volumeMounts:
            - name: nix-cache-storage
              mountPath: /data
            - name: nix-cache-config
              mountPath: /etc/nginx/nginx.conf
              subPath: nginx.conf
              readOnly: true
          resources:
            limits:
              memory: "512Mi"
              cpu: "300m"
            requests:
              memory: "256Mi"
              cpu: "200m"
***
apiVersion: v1
kind: Service
metadata:
  name: nix-cache
spec:
  selector:
    app: nix-cache
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80
***
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: nix-cache-ingress
  annotations:
    traefik.ingress.kubernetes.io/router.tls: "true"
spec:
  rules:
    - host: "nix-cache.raspi.home"
      http:
        paths:
          - pathType: Prefix
            path: "/"
            backend:
              service:
                name: nix-cache
                port:
                  number: 80
  tls:
    - secretName: nix-cache-raspi-home-tls
      hosts:
        - "nix-cache.raspi.home"
***
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
  name: nix-cache.raspi.home
spec:
  commonName: nix-cache.raspi.home
  dnsNames:
    - "nix-cache.raspi.home"
  secretName: nix-cache-raspi-home-tls
  issuerRef:
    name: ca-issuer
    kind: ClusterIssuer
***
apiVersion: v1
kind: ConfigMap
metadata:
  name: nix-cache-config
data:
  # See: https://www.channable.com/tech/setting-up-a-private-nix-cache-for-fun-and-profit
  nginx.conf: |
    events {
        worker_connections 1024;
    }
    http {
      proxy_cache_path /data/nginx/cache max_size=500G keys_zone=cache_zone:50m inactive=365d;
      proxy_cache cache_zone;
      proxy_cache_valid 200 365d;
      proxy_cache_use_stale error timeout invalid_header updating http_500 http_502 http_504 http_403 http_404 http_429;
      proxy_ignore_headers X-Accel-Expires Expires Cache-Control Set-Cookie;
      proxy_cache_lock on;

      server {
          listen 80;

          server_name nix-cache.raspi.home;

          location /nix-cache-info {
              return 200 "StoreDir: /nix/store\nWantMassQuery: 1\nPriority: 41\n";
          }

          location / {
              proxy_set_header Host $proxy_host;
              proxy_pass https://cache.nixos.org;
          }
      }
    }

The config is an adaption from this blog post: https://www.channable.com/tech/setting-up-a-private-nix-cache-for-fun-and-profit

[-] secana@programming.dev 4 points 4 months ago

Unfortunately not. But I try to work on it a few hours every week in my spare time. I think that having an easy and free crate registry is crucial for the adaption of Rust in the commercial space. Companies don't want to share their code publicly on crates.io. My full time job is in the IT security sector. My hope is that by pushing Rust as a safe language, we can close some fundamental design flaws that languages like C/C++ introduced and make software landscape more secure.

[-] secana@programming.dev 3 points 4 months ago

How is the overall ML story with Rust? Is it usable in comparison to Python?

[-] secana@programming.dev 3 points 4 months ago

Never heard of it. I used the Rust book when I started learning it.

[-] secana@programming.dev 3 points 6 months ago

Didn't know that one. Thanks for sharing.

[-] secana@programming.dev 3 points 7 months ago

Cool project idea! How did you come up with it?

[-] secana@programming.dev 3 points 7 months ago

I you share your code here, maybe someone can help.

[-] secana@programming.dev 3 points 7 months ago

Thanks! Took me few iterations to get there.

5
submitted 8 months ago by secana@programming.dev to c/nix@programming.dev

Hi! It's my first day with nixos. I tried to compile a rust project. To do so, I used a nix-shell with the content from here: https://nixos.wiki/wiki/Rust with the "Installation via rustup" option.

Unfortunately the compilation fails:

$ cargo check
   Compiling libc v0.2.151
   Compiling proc-macro2 v1.0.73
   Compiling serde v1.0.193
    Checking once_cell v1.19.0
   Compiling thiserror v1.0.53
error: linker `aarch64-linux-gnu-gcc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `serde` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error
error: could not compile `thiserror` (build script) due to 1 previous error

I run NixOS 23.11 stable on a VM on a Macbook with M1 (arm64) CPU.

Any ideas how to fix that?

26
Zig, Rust and other languages (notes.eatonphil.com)

What do you think about the points the authors makes?

16

Kellnr 5.2.0 is released. Besides many small changes, the main feature of this release is UI support for cached crates. Until now, only private crates were shown in the UI. Now, cached crates from crates.io are shown and searchable from the UI, too.

[-] secana@programming.dev 2 points 8 months ago

Cool! What's your impression of typst? Is it ready to replace latex or is it still in its infancy?

[-] secana@programming.dev 3 points 8 months ago

How easy is it to create custom widgets with iced.rs? Or does Cosmic provide it's own full widget library?

27

Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?

22

Hi rustaceans! What are you working on this week? Did you discover something new, you want to share?

5

While working on Kellnr, I updated the dependencies. It seems that the update of cargo breaks the build. I created an issue on github. Maybe somebody here has an idea for a simple fix.

117

The title says it all: How can we grow the Rust community here on Lemmy? Many users fled Reddit or are here for different reasons. But compared to it's commercial big brother, the Rust community here, feels more or less dead. I would like to discuss ideas, on how we can changes that and make Lemmy the default for Rust related discussions, instead of Reddit.

23

Self-host your crates on your own hardware, inclusive docs with a full web UI that allows you to search and inspect your crates.

15
submitted 10 months ago by secana@programming.dev to c/rust@programming.dev

Learn how to wrap a native shared C library in a cross-platform Rust crate for Windows, Linux, macOS and x86_64 + ARM64.

26
Miro/Figjam alternative? (programming.dev)

Hi! I'm searching for a Miro or FigJam alternative to self-host on my Raspberry Pi 4 Kubernetes Cluster. Any ideas for a good whiteboard software?

20
submitted 10 months ago by secana@programming.dev to c/rust@programming.dev

Version 5.1.0 of Kellnr, the private crate registry for Rust was just released. It features a new landing page, dependency updates and bug fixes.

Check it out, if you want to host crates on your own hardware!

23
Non-Send Futures When? (matklad.github.io)
submitted 11 months ago by secana@programming.dev to c/rust@programming.dev
view more: ‹ prev next ›

secana

joined 11 months ago