Skip to content

Commit b132ae8

Browse files
authored
ummm (#604)
1 parent 708f230 commit b132ae8

File tree

48 files changed

+1851
-1314
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1851
-1314
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ resolver = "2"
33

44
members = [
55
"rust/helloworld_tonic",
6+
"rust/cards",
67
"rust/doc_db",
8+
"rust/wordchains",
79
"protos/example_service",
810
"protos/doc_db",
911
]
@@ -17,11 +19,11 @@ readme = "README.md"
1719
[workspace.dependencies]
1820
example_service = { path = "protos/example_service" }
1921
doc_db_proto = { path = "protos/doc_db" }
20-
prost = { version = "0.13.4" }
22+
prost = { version = "0.13.5" }
2123
prost-types = { version = "0.13.5", default-features = false }
2224
tonic = { version = "0.12.3", features = ["transport"] }
2325
tonic-build = "0.12.3"
24-
tokio = { version = "1.43.0", default-features = false, features = ["macros", "net", "rt-multi-thread", "signal"] }
26+
tokio = { version = "1.44.1", default-features = false, features = ["macros", "net", "rt-multi-thread", "signal"] }
2527
protoc-gen-tonic = "0.4.1"
2628
protoc-gen-prost = "0.4.0"
2729
mongodb = "3.2.3"

MODULE.bazel.lock

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

README.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
![MoonBase](static_content/moon.gif)
66

7+
## IDE Support
78
### IntelliJ
89
Tested with [Bazel for IntelliJ](https://plugins.jetbrains.com/plugin/8609-bazel-for-intellij)
910

@@ -30,5 +31,54 @@ bazel run @hedron_compile_commands//:refresh_all
3031
code .
3132
```
3233

33-
### Importing a project?
34+
## Importing a project?
3435
See [IMPORTING](./IMPORTING.md)
36+
37+
## Repository Contents
38+
39+
This repository contains multiple projects implemented across various programming languages. Here's a summary of the major components:
40+
41+
### Card Games
42+
- **Rust**: [`/rust/cards`](rust/cards) - Experimenting with moving card game engines to Rust
43+
- **C++**: [`/cpp/cards`](cpp/cards) - Golf rules implementation and some helpers
44+
- **Go**: [`/go/cards`](go/cards) - Experimenting with moving card game engines to Go
45+
46+
### Document Database
47+
- **Rust**: [`doc_db`](rust/doc_db) - DocDB with Mongo backend
48+
- **Go**: [`doc_db`](go/doc_db) - DocDB WIP
49+
- **C++**: [`doc_db_client`](cpp/doc_db_client) - Document database client
50+
51+
### Golf Services
52+
- **C++**:
53+
- [`golf_service`](cpp/golf_service) - Golf websocket server
54+
- [`golf_grpc`](cpp/golf_grpc) - Golf gRPC service
55+
- **Web**:
56+
- [`golf_ui`](web/golf_ui) - Original golf UI
57+
- [`golf_ui_2`](web/golf_ui_2) - Updated golf UI
58+
59+
### Web Related
60+
- **C++**:
61+
- [`lakitu`](cpp/lakitu) - GRPC wrapper for C++
62+
- [`example_service`](cpp/example_service) - Example service
63+
- **Java**:
64+
- [`lunarcat`](jvm/src/main/java/com/muchq/lunarcat) - Rest-style HTTP server
65+
- **Rust**:
66+
- [`helloworld_tonic`](rust/helloworld_tonic) - gRPC example using Tonic
67+
- **Go**:
68+
- [`resilience4g`](go/resilience4g) - Resilience4J for Go
69+
- [`r3dr`](go/r3dr) - a url shortening service
70+
- [`mucks`](go/mucks) - Router wrapper middleware
71+
- [`example_grpc`](go/example_grpc) - gRPC example
72+
73+
### Other Projects
74+
- **Rust**:
75+
- [`wordchains`](rust/wordchains) - Word chain implementation
76+
- **C++**:
77+
- [`so_leet`](cpp/so_leet) - Some leetcode
78+
- [`futility`](cpp/futility) - Utilities for C++
79+
- **Go**:
80+
- [`images`](go/images) - Some image processing tools
81+
- [`clock`](go/clock) - a Clock
82+
- **JS**:
83+
- [`flippymem`](web/flippymem) - Flippy memory game
84+
- **JVM**: [`java and scala stuff`](jvm) - Java/Scala projects

bazel/cc.MODULE.bazel

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,3 @@ git_override(
1212

1313
mongoose_ext = use_extension("//bazel/extensions:mongoose.bzl", "mongoose")
1414
use_repo(mongoose_ext, "mongoose_cc")
15-
16-
raylib_ext = use_extension("//bazel/extensions:raylib.bzl", "raylib")
17-
use_repo(raylib_ext, "raylib")

bazel/extensions/raylib.bzl

Lines changed: 0 additions & 43 deletions
This file was deleted.

bazel/rust.MODULE.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ crate.from_cargo(
2525
"//protos/example_service:Cargo.toml",
2626
"//protos/doc_db:Cargo.toml",
2727
"//rust/helloworld_tonic:Cargo.toml",
28+
"//rust/cards:Cargo.toml",
2829
"//rust/doc_db:Cargo.toml",
30+
"//rust/wordchains:Cargo.toml",
2931
],
3032
supported_platform_triples = [
3133
"aarch64-apple-darwin",

cpp/cards/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Card Games - C++ Implementation
2+
3+
This module provides a set of classes and utilities for building card games.
4+
5+
## Related Projects
6+
7+
- [Rust Implementation](../../rust/cards) (WIP)
8+
- [Go Implementation](../../go/cards) (WIP)
9+
10+
## Components
11+
12+
- Top level module contains core components for building card games.
13+
- [golf](./golf) is a mostly complete implementation of the game Golf.
14+
15+
## Building
16+
17+
This project uses Bazel for building:
18+
19+
```bash
20+
bazel build //cpp/cards:...
21+
```
22+
23+
## Testing
24+
25+
```bash
26+
bazel test //cpp/cards:...
27+
```
28+
29+
## IDE Support
30+
31+
For optimal development experience, use CLion with the Bazel plugin or VSCode with the compile commands extractor as described in the main [README](../../README.md).

cpp/cards/card.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#ifndef CPP_CARDS_CARD_H
22
#define CPP_CARDS_CARD_H
33

4-
#include <string>
5-
#include <unordered_map>
6-
74
namespace cards {
85

96
enum class Suit { Clubs, Diamonds, Hearts, Spades };

cpp/doc_db_client/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Document Database Client - C++ Implementation
2+
3+
This directory contains a C++ client implementation for interacting with the document database system. It provides a high-performance interface for C++ applications to access the document database.
4+
5+
## Related Projects
6+
7+
This client implementation is part of a multi-language document database system. Related implementations can be found in:
8+
- [Rust Implementation](../../rust/doc_db)
9+
- [Go Implementation](../../go/doc_db)
10+
11+
## Building
12+
13+
This project uses Bazel for building:
14+
15+
```bash
16+
bazel build //cpp/doc_db_client:...
17+
```
18+
19+
## Testing
20+
21+
```bash
22+
bazel test //cpp/doc_db_client:...
23+
```
24+
25+
## Protocol Buffers
26+
27+
This implementation uses protocol buffers for data serialization. The proto definitions can be found in the [protos](../../protos) directory.
28+
29+
## IDE Support
30+
31+
For optimal development experience, use CLion with the Bazel plugin or VSCode with the compile commands extractor as described in the main [README](../../README.md).

cpp/example_raylib/BUILD.bazel

Lines changed: 0 additions & 9 deletions
This file was deleted.

cpp/example_raylib/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

cpp/example_raylib/main.cc

Lines changed: 0 additions & 21 deletions
This file was deleted.

cpp/example_service/README.md

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
1-
# Example GRPC Service
1+
# Example Service - C++ Implementation
22

3-
### Build
4-
```
5-
bazel build //cpp/example_service
6-
```
3+
This directory contains a C++ implementation of an example service. It serves as a reference implementation for building C++ services in this repository.
74

8-
### Run
9-
```
10-
bazel-bin/cpp/example_service/example_service
11-
```
5+
## Features
6+
7+
- Service architecture
8+
- Protocol buffer integration
9+
- Error handling
10+
- Logging
11+
- Configuration management
12+
13+
## Building
14+
15+
This project uses Bazel for building:
1216

13-
### Call
17+
```bash
18+
bazel build //cpp/example_service:...
1419
```
15-
➜ ~ grpcurl -d '{"name": "Friend"}' -plaintext localhost:8080 example_service.Greeter/SayHello
16-
{
17-
"message": "Hello Friend"
18-
}
20+
21+
## Testing
22+
23+
```bash
24+
bazel test //cpp/example_service:...
1925
```
2026

21-
### OCI
22-
# OCI
23-
```shell
24-
sudo apt install podman
25-
bazel run //cpp/example_service:oci_tarball
26-
podman run -p 8080:8089 example_cc_grpc
27-
grpcurl -d '{"name": "Friend"}' -plaintext localhost:8080 example_service.Greeter/SayHello
27+
## Running the Service
28+
29+
```bash
30+
bazel run //cpp/example_service:server
2831
```
32+
33+
## Protocol Buffers
34+
35+
This service uses protocol buffers for data serialization. The proto definitions can be found in the [protos](../../protos) directory.
36+
37+
## IDE Support
38+
39+
For optimal development experience, use CLion with the Bazel plugin or VSCode with the compile commands extractor as described in the main [README](../../README.md).

cpp/futility/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Utility Library - C++ Implementation
2+
3+
This directory contains a C++ utility library. It provides a collection of commonly used utilities and helper functions for C++ development.
4+
5+
## Features
6+
7+
- String manipulation
8+
- File operations
9+
- Memory management
10+
- Thread utilities
11+
- Logging
12+
- Error handling
13+
- Type conversions
14+
15+
## Building
16+
17+
This project uses Bazel for building:
18+
19+
```bash
20+
bazel build //cpp/futility:...
21+
```
22+
23+
## Testing
24+
25+
```bash
26+
bazel test //cpp/futility:...
27+
```
28+
29+
## Example Usage
30+
31+
```cpp
32+
// Example of using utility functions
33+
#include "futility/string_utils.h"
34+
#include "futility/file_utils.h"
35+
36+
int main() {
37+
// String manipulation
38+
std::string input = "Hello, World!";
39+
auto trimmed = futility::Trim(input);
40+
41+
// File operations
42+
auto content = futility::ReadFile("example.txt");
43+
return 0;
44+
}
45+
```
46+
47+
## IDE Support
48+
49+
For optimal development experience, use CLion with the Bazel plugin or VSCode with the compile commands extractor as described in the main [README](../../README.md).

0 commit comments

Comments
 (0)