---
date: '2022-10-29'
description: notes on ownership, borrowing, stack and heap memory management, and foreign-function interfaces in rust.
id: Rust
modified: 2026-06-05 15:08:29 GMT-04:00
tags:
  - seed
  - technical
title: Rust
created: '2022-10-29'
published: '2022-10-29'
pageLayout: default
slug: thoughts/Rust
permalink: https://aarnphm.xyz/thoughts/Rust.md
generator:
  quartz: v4.6.0
  hostedProvider: Cloudflare
  baseUrl: aarnphm.xyz
full: https://aarnphm.xyz/llms-full.txt
---
Ownership and Borrowing

- Stack and heaps

```rust
fn main() {
    let s = String::from("Hello");
}
```

borrow mutable ONCE

- long running owners
- refcount

Foreign-Function Interfaces (FFI)

