11<p align =" center " >
2- <img src =" https://raw.githubusercontent.com/scrogson/starlang /main/assets/starlang .png " alt =" Starlang Logo" width =" 200 " >
2+ <img src =" https://raw.githubusercontent.com/scrogson/ambitious /main/assets/ambitious .png " alt =" Ambitious Logo" width =" 200 " >
33</p >
44
5- # Starlang - Erlang-style Concurrency for Rust
5+ # Ambitious - Erlang-style Concurrency for Rust
66
77A native Rust implementation of Erlang/OTP primitives, bringing the power of the BEAM's concurrency model to Rust with full type safety.
88
@@ -15,42 +15,42 @@ A native Rust implementation of Erlang/OTP primitives, bringing the power of the
1515- ** Supervisor** : Fault-tolerant supervision trees with configurable restart strategies
1616- ** DynamicSupervisor** : Start children on demand with automatic restart
1717- ** Application** : OTP-style application lifecycle management
18- - ** Distribution** : Connect Starlang nodes across the network with QUIC transport
18+ - ** Distribution** : Connect Ambitious nodes across the network with QUIC transport
1919- ** Registry** : Local process registry with pub/sub support and via-tuple routing
2020- ** Channels** : Phoenix-style channels for real-time communication
2121- ** Presence** : Distributed presence tracking for real-time applications
2222
2323## Quick Start
2424
25- Add Starlang to your ` Cargo.toml ` :
25+ Add Ambitious to your ` Cargo.toml ` :
2626
2727``` toml
2828[dependencies ]
29- starlang = " 0.1"
29+ ambitious = " 0.1"
3030```
3131
3232### Basic Process Spawning
3333
3434``` rust
35- use starlang :: prelude :: * ;
35+ use ambitious :: prelude :: * ;
3636
37- #[starlang :: main]
37+ #[ambitious :: main]
3838async fn main () {
3939 // Spawn a process
40- let pid = starlang :: spawn (|| async {
41- println! (" Hello from process {:?}" , starlang :: current_pid ());
40+ let pid = ambitious :: spawn (|| async {
41+ println! (" Hello from process {:?}" , ambitious :: current_pid ());
4242 });
4343
4444 // Send a message
45- starlang :: send (pid , & " Hello!" ). ok ();
45+ ambitious :: send (pid , & " Hello!" ). ok ();
4646}
4747```
4848
4949### GenServer Example
5050
5151``` rust
52- use starlang :: prelude :: * ;
53- use starlang :: gen_server :: {async_trait, GenServer , InitResult , CallResult , CastResult };
52+ use ambitious :: prelude :: * ;
53+ use ambitious :: gen_server :: {async_trait, GenServer , InitResult , CallResult , CastResult };
5454use serde :: {Serialize , Deserialize };
5555
5656struct Counter ;
@@ -105,8 +105,8 @@ impl GenServer for Counter {
105105### Supervisor Example
106106
107107``` rust
108- use starlang :: prelude :: * ;
109- use starlang :: supervisor :: {Supervisor , SupervisorInit , SupervisorFlags , ChildSpec , Strategy };
108+ use ambitious :: prelude :: * ;
109+ use ambitious :: supervisor :: {Supervisor , SupervisorInit , SupervisorFlags , ChildSpec , Strategy };
110110
111111struct MySupervisor ;
112112
@@ -121,7 +121,7 @@ impl Supervisor for MySupervisor {
121121 vec! [
122122 ChildSpec :: new (" worker" , || async {
123123 // Start your worker here
124- Ok (starlang :: spawn (|| async { /* worker code */ }))
124+ Ok (ambitious :: spawn (|| async { /* worker code */ }))
125125 }),
126126 ],
127127 )
@@ -132,15 +132,15 @@ impl Supervisor for MySupervisor {
132132### DynamicSupervisor Example
133133
134134``` rust
135- use starlang :: supervisor :: dynamic_supervisor :: {self , DynamicSupervisorOpts };
136- use starlang :: supervisor :: ChildSpec ;
135+ use ambitious :: supervisor :: dynamic_supervisor :: {self , DynamicSupervisorOpts };
136+ use ambitious :: supervisor :: ChildSpec ;
137137
138138// Start a dynamic supervisor
139139let sup_pid = dynamic_supervisor :: start (DynamicSupervisorOpts :: new ()). await ? ;
140140
141141// Start children on demand
142142let child_spec = ChildSpec :: new (" worker" , || async {
143- Ok (starlang :: spawn (|| async { /* worker code */ }))
143+ Ok (ambitious :: spawn (|| async { /* worker code */ }))
144144});
145145let child_pid = dynamic_supervisor :: start_child (sup_pid , child_spec ). await ? ;
146146
@@ -180,15 +180,15 @@ dynamic_supervisor::terminate_child(sup_pid, child_pid)?;
180180## Crate Structure
181181
182182```
183- starlang /
184- ├── starlang / # Main crate re-exporting all functionality
185- ├── starlang -core/ # Core types: Pid, Ref, ExitReason, Term trait
186- ├── starlang -runtime/ # Async runtime, scheduler, process registry
187- ├── starlang -process/ # Process spawning, mailboxes, links, monitors
188- ├── starlang -gen-server/ # GenServer trait and implementation
189- ├── starlang -supervisor/ # Supervisor trait and restart strategies
190- ├── starlang -application/ # Application lifecycle management
191- ├── starlang -macros/ # Procedural macros for ergonomic APIs
183+ ambitious /
184+ ├── ambitious / # Main crate re-exporting all functionality
185+ ├── ambitious -core/ # Core types: Pid, Ref, ExitReason, Term trait
186+ ├── ambitious -runtime/ # Async runtime, scheduler, process registry
187+ ├── ambitious -process/ # Process spawning, mailboxes, links, monitors
188+ ├── ambitious -gen-server/ # GenServer trait and implementation
189+ ├── ambitious -supervisor/ # Supervisor trait and restart strategies
190+ ├── ambitious -application/ # Application lifecycle management
191+ ├── ambitious -macros/ # Procedural macros for ergonomic APIs
192192└── examples/
193193 └── chat/ # Distributed chat server example
194194```
@@ -200,7 +200,7 @@ starlang/
200200The ` Term ` trait (similar to Erlang's term concept) enables any serializable type to be sent between processes:
201201
202202``` rust
203- use starlang :: Term ;
203+ use ambitious :: Term ;
204204
205205// Any type implementing Serialize + DeserializeOwned automatically implements Term
206206#[derive(Serialize , Deserialize )]
@@ -218,11 +218,11 @@ let decoded: MyMessage = Term::decode(&bytes)?;
218218
219219``` rust
220220// Register a process by name
221- starlang :: register (" my_server" . to_string (), pid );
221+ ambitious :: register (" my_server" . to_string (), pid );
222222
223223// Look up by name
224- if let Some (pid ) = starlang :: whereis (" my_server" ) {
225- starlang :: send (pid , & message )? ;
224+ if let Some (pid ) = ambitious :: whereis (" my_server" ) {
225+ ambitious :: send (pid , & message )? ;
226226}
227227```
228228
@@ -231,8 +231,8 @@ if let Some(pid) = starlang::whereis("my_server") {
231231Similar to Elixir's ` {:via, module, term} ` pattern:
232232
233233``` rust
234- use starlang :: gen_server :: ServerRef ;
235- use starlang :: registry :: Registry ;
234+ use ambitious :: gen_server :: ServerRef ;
235+ use ambitious :: registry :: Registry ;
236236
237237// Create a custom registry
238238let registry : Arc <Registry <Vec <u8 >, ()>> = Arc :: new (Registry :: unique (" my_registry" ));
@@ -246,10 +246,10 @@ let result = gen_server::call::<MyServer>(server_ref, request, timeout).await?;
246246
247247## Distribution
248248
249- Starlang supports distributed nodes connected via QUIC:
249+ Ambitious supports distributed nodes connected via QUIC:
250250
251251``` rust
252- use starlang :: node;
252+ use ambitious :: node;
253253
254254// Start distribution
255255node :: start (" node1@localhost" , " 127.0.0.1:9000" ). await ? ;
@@ -258,7 +258,7 @@ node::start("node1@localhost", "127.0.0.1:9000").await?;
258258node :: connect (" node2@localhost" , " 127.0.0.1:9001" ). await ? ;
259259
260260// Send messages to remote processes
261- starlang :: send (remote_pid , & message )? ;
261+ ambitious :: send (remote_pid , & message )? ;
262262```
263263
264264## Building and Testing
@@ -271,7 +271,7 @@ cargo build
271271cargo test
272272
273273# Run a specific crate's tests
274- cargo test -p starlang -gen-server
274+ cargo test -p ambitious -gen-server
275275
276276# Run the chat example
277277cargo run --example chat-server
0 commit comments