No description
| src | More tweaks to tests | |
| .gitignore | Initial files | |
| Cargo.lock | Initial files | |
| Cargo.toml | Initial files | |
| LICENSE | Adding license | |
| README.md | Updated docs | |
Gemini data parser
Overview
This might be a silly idea but I was thinking about data transfer and simple applications and wondered if a data format that was just based on Markdown (in the same way Gemtext is) might be a Good Thing(tm).
For example:
# top
This is a comment because we are looking for special characters for object and field indictaors so we can put any other text in the data and it will just get ignored
* field1: "hello"
* field2: 123
* field3: 133.456
* field4: true
## Level2 - 1
### Level3 - 1
__NOTE:__ Can even add notes as comments too, with formatting
### Level3 - 2
## Level2 - 2
* field2.1: "Long text"
* field2.3: "Escape CRLF\n\r"
Notes
Creating a new library
Running these commands
cd gemini-data-parser
cargo init --lib --name gemdata .
Emacs Rust Setup
- Installing operating system packages
apk add rust-analyzer tree-sitter
apk add tree-sitter-toml tree-sitter-go tree-sitter-python tree-sitter-rust
apk add tree-sitter-xml tree-sitter-regex tree-sitter-ruby
- Installing these packages Emacs
- tree-sitter
- rustic
- lsp-mode
- company
- yasnippet
- flycheck
- Using
M-x package-refresh-contentsfirst - Then
M-x package-install <package name>to install each package
References
Rust
- Cargo project layout
- Cargo features section, conditional compliation
- Creating a new package
- Generic data types
- Box
- Box source code, box for heap allocation
- Unions
- Vector of objects belonging to a trait
- Representing multiple types with enum
- Using enums or boxed traits
- Defining enums
- For loop and range
- Match control flow
- Idiomatic way to convert String to &str
- Mastering Rust vectors ownership and borrowing
- Rust operators
- Rust Vector
- Turning vectors into slices
- AsSlice trait
- Vector source code