@devaloop/devalang 0.0.1-alpha.14 → 0.0.1-alpha.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/.devalang +8 -8
  2. package/Cargo.toml +2 -2
  3. package/README.md +31 -14
  4. package/docs/CHANGELOG.md +59 -0
  5. package/docs/ROADMAP.md +1 -1
  6. package/examples/automation.deva +44 -0
  7. package/examples/index.deva +41 -25
  8. package/examples/plugin.deva +15 -0
  9. package/out-tsc/bin/devalang.exe +0 -0
  10. package/package.json +1 -1
  11. package/project-version.json +3 -3
  12. package/rust/cli/bank.rs +14 -15
  13. package/rust/cli/check.rs +1 -1
  14. package/rust/cli/play.rs +1 -1
  15. package/rust/cli/update.rs +1 -1
  16. package/rust/common/api.rs +3 -6
  17. package/rust/common/cdn.rs +3 -6
  18. package/rust/common/sso.rs +3 -6
  19. package/rust/core/audio/engine.rs +215 -74
  20. package/rust/core/audio/evaluator.rs +101 -0
  21. package/rust/core/audio/interpreter/arrow_call.rs +27 -1
  22. package/rust/core/audio/interpreter/automate.rs +18 -0
  23. package/rust/core/audio/interpreter/call.rs +2 -2
  24. package/rust/core/audio/interpreter/condition.rs +3 -3
  25. package/rust/core/audio/interpreter/driver.rs +49 -16
  26. package/rust/core/audio/interpreter/let_.rs +14 -7
  27. package/rust/core/audio/interpreter/loop_.rs +39 -6
  28. package/rust/core/audio/interpreter/mod.rs +2 -1
  29. package/rust/core/audio/interpreter/sleep.rs +2 -4
  30. package/rust/core/audio/interpreter/spawn.rs +2 -2
  31. package/rust/core/audio/loader/trigger.rs +2 -5
  32. package/rust/core/audio/mod.rs +2 -1
  33. package/rust/core/audio/renderer.rs +1 -1
  34. package/rust/core/audio/special/easing.rs +120 -0
  35. package/rust/core/audio/special/env.rs +41 -0
  36. package/rust/core/audio/special/math.rs +92 -0
  37. package/rust/core/audio/special/mod.rs +9 -0
  38. package/rust/core/audio/special/modulator.rs +120 -0
  39. package/rust/core/debugger/store.rs +1 -1
  40. package/rust/core/error/mod.rs +4 -1
  41. package/rust/core/lexer/handler/arrow.rs +60 -9
  42. package/rust/core/lexer/handler/at.rs +4 -4
  43. package/rust/core/lexer/handler/brace.rs +8 -8
  44. package/rust/core/lexer/handler/colon.rs +4 -4
  45. package/rust/core/lexer/handler/comment.rs +2 -2
  46. package/rust/core/lexer/handler/dot.rs +4 -4
  47. package/rust/core/lexer/handler/driver.rs +42 -13
  48. package/rust/core/lexer/handler/identifier.rs +5 -4
  49. package/rust/core/lexer/handler/newline.rs +1 -1
  50. package/rust/core/lexer/handler/number.rs +3 -3
  51. package/rust/core/lexer/handler/operator.rs +3 -1
  52. package/rust/core/lexer/handler/parenthesis.rs +8 -8
  53. package/rust/core/lexer/handler/slash.rs +5 -5
  54. package/rust/core/lexer/handler/string.rs +1 -1
  55. package/rust/core/lexer/mod.rs +1 -1
  56. package/rust/core/lexer/token.rs +3 -0
  57. package/rust/core/parser/driver.rs +94 -12
  58. package/rust/core/parser/handler/arrow_call.rs +105 -89
  59. package/rust/core/parser/handler/at.rs +1 -1
  60. package/rust/core/parser/handler/dot.rs +3 -3
  61. package/rust/core/parser/handler/identifier/automate.rs +194 -0
  62. package/rust/core/parser/handler/identifier/function.rs +2 -3
  63. package/rust/core/parser/handler/identifier/let_.rs +16 -0
  64. package/rust/core/parser/handler/identifier/mod.rs +14 -10
  65. package/rust/core/parser/handler/identifier/print.rs +29 -0
  66. package/rust/core/parser/handler/identifier/sleep.rs +1 -1
  67. package/rust/core/parser/handler/identifier/synth.rs +7 -9
  68. package/rust/core/parser/handler/loop_.rs +60 -43
  69. package/rust/core/parser/statement.rs +5 -0
  70. package/rust/core/preprocessor/loader.rs +1 -1
  71. package/rust/core/preprocessor/processor.rs +4 -4
  72. package/rust/core/preprocessor/resolver/bank.rs +1 -2
  73. package/rust/core/preprocessor/resolver/call.rs +19 -18
  74. package/rust/core/preprocessor/resolver/driver.rs +7 -5
  75. package/rust/core/preprocessor/resolver/function.rs +3 -13
  76. package/rust/core/preprocessor/resolver/loop_.rs +31 -1
  77. package/rust/core/preprocessor/resolver/spawn.rs +3 -22
  78. package/rust/core/preprocessor/resolver/tempo.rs +1 -1
  79. package/rust/core/preprocessor/resolver/trigger.rs +2 -3
  80. package/rust/core/preprocessor/resolver/value.rs +6 -12
  81. package/rust/core/shared/bank.rs +1 -1
  82. package/rust/core/utils/path.rs +1 -1
  83. package/rust/core/utils/validation.rs +0 -1
  84. package/rust/installer/bank.rs +1 -1
  85. package/rust/installer/plugin.rs +2 -2
  86. package/rust/main.rs +0 -1
  87. package/rust/utils/error.rs +51 -0
  88. package/rust/utils/logger.rs +4 -0
  89. package/rust/utils/mod.rs +1 -44
  90. package/rust/utils/spinner.rs +1 -1
package/.devalang CHANGED
@@ -1,8 +1,8 @@
1
- [defaults]
2
- entry = "./examples"
3
- output = "./output"
4
- watch = false
5
-
6
- [[banks]]
7
- path = "devalang://bank/devaloop.808"
8
- version = "0.0.2"
1
+ [defaults]
2
+ entry = "./examples"
3
+ output = "./output"
4
+ watch = false
5
+
6
+ [[banks]]
7
+ path = "devalang://bank/devaloop.808"
8
+ version = "0.0.2"
package/Cargo.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "devalang"
3
- version = "0.0.1-alpha.14"
3
+ version = "0.0.1-alpha.15"
4
4
  authors = ["Devaloop <contact@devaloop.com>"]
5
5
  description = "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text."
6
6
  license = "MIT"
@@ -10,7 +10,6 @@ categories = ["command-line-utilities", "development-tools", "parser-implementat
10
10
  readme = "README.md"
11
11
  homepage = "https://devalang.com"
12
12
  documentation = "https://docs.devalang.com/"
13
- license-file = "LICENSE"
14
13
  edition = "2024"
15
14
 
16
15
  [[bin]]
@@ -19,6 +18,7 @@ path = "rust/main.rs"
19
18
  required-features = ["cli"]
20
19
 
21
20
  [lib]
21
+ name = "devalang_core"
22
22
  path = "rust/lib.rs"
23
23
  crate-type = ["cdylib", "rlib"]
24
24
 
package/README.md CHANGED
@@ -65,31 +65,48 @@ Create a new Devalang file `src/index.deva` in the project directory:
65
65
  ```deva
66
66
  # src/index.deva
67
67
 
68
- group myLead:
69
- let mySynth = synth sine {
68
+ group main:
69
+ let lead = synth sine {
70
70
  attack: 0,
71
71
  decay: 100,
72
72
  sustain: 100,
73
73
  release: 100
74
74
  }
75
75
 
76
- mySynth -> note(C4, {
76
+ # Global automation for this synth (applies to subsequent notes)
77
+ automate lead:
78
+ param volume {
79
+ 0% = 0.0
80
+ 100% = 1.0
81
+ }
82
+ param pan {
83
+ 0% = -1.0
84
+ 100% = 1.0
85
+ }
86
+ param pitch {
87
+ 0% = -12.0
88
+ 100% = 12.0
89
+ }
90
+
91
+ lead -> note(C4, {
77
92
  duration: 400,
78
- velocity: 0.7,
79
- glide: true
93
+ velocity: 0.8,
94
+ automate: { pan: { 0%: -1.0, 100%: 0.0 } }
80
95
  })
81
96
 
82
- mySynth -> note(G4, {
83
- duration: 600,
84
- slide: true
85
- })
97
+ lead -> note(E4, { duration: 400 })
98
+ lead -> note(G4, { duration: 600, glide: true, target_freq: 659.25 })
99
+ lead -> note(B3, { duration: 400, slide: true, target_amp: 0.3 })
100
+
101
+ for i in [1, 2, 3]:
102
+ lead -> note(C5, { duration: 200 })
86
103
 
87
104
  # Play the lead
88
105
 
89
- call myLead
106
+ call main
90
107
  ```
91
108
 
92
- And the best part ? You can play it directly from the command line:
109
+ ### And the best part ? You can play it directly from the command line:
93
110
 
94
111
  ```bash
95
112
  # Play the Devalang file
@@ -102,9 +119,9 @@ devalang play --watch
102
119
  devalang play --repeat
103
120
  ```
104
121
 
105
- ### 🎉 You can now hear your Devalang code in action!
122
+ ### 🎉 You can now hear your Devalang code in action
106
123
 
107
- > For more examples, check out the [examples directory](./examples/).
124
+ > For more examples, check out the [examples directory](./examples/)
108
125
 
109
126
  ## ❓ Why Devalang ?
110
127
 
@@ -128,7 +145,7 @@ devalang play --repeat
128
145
 
129
146
  ## 📄 Documentation
130
147
 
131
- ### Please refer to the [online documentation](https://docs.devalang.com) for detailed information on syntax, features, and usage examples.
148
+ ### Please refer to the [online documentation](https://docs.devalang.com) for detailed information on syntax, features, and usage examples
132
149
 
133
150
  ## 🧯 Known issues
134
151
 
package/docs/CHANGELOG.md CHANGED
@@ -4,6 +4,65 @@
4
4
 
5
5
  # Changelog
6
6
 
7
+ ## Version 0.0.1-alpha.15 (2025-08-27)
8
+
9
+ ### ✨ Language Features
10
+
11
+ - Added `automate` statement to schedule parameter automation (e.g. volume, pan, pitch) over time
12
+ - Supports per-note automation via a `automate` map on note calls (e.g. `note(C4, { automate: { volume: { 0%: 0.0, 100%: 1.0 } } })`)
13
+ - Added `print` statement to ease debugging at runtime
14
+ - Added special variables and functions usable in expressions:
15
+ - `$env.bpm`, `$env.beat`
16
+ - `$math.sin(expr)`, `$math.cos(expr)`
17
+ - `$env.position` (alias of beat), `$env.seed` (global session seed for deterministic randomness)
18
+ - `$math.random(seed?)`, `$math.lerp(a, b, t)`
19
+ - `$easing.*` functions for shaping values in [0,1]:
20
+ - `linear`, `easeIn/Out/InOutQuad`, `easeIn/Out/InOutCubic`, `easeIn/Out/InOutQuart`,
21
+ `easeIn/Out/InOutExpo`, `easeIn/Out/InOutBack`, `easeIn/Out/InOutElastic`, `easeIn/Out/InOutBounce`
22
+ - `$mod.*` modulators for time-based control:
23
+ - `lfo.sine(ratePerBeat)`, `lfo.tri(ratePerBeat)`, `envelope(attack, decay, sustain, release, t)`
24
+ - Added basic `for` loops and array literals
25
+ - Example: `for i in [1, 2, 3]: print i`
26
+
27
+ ### 🧠 Core Engine
28
+
29
+ - Implemented runtime automation in the audio renderer with linear envelope interpolation
30
+ - Per-note automation supported (volume, pan, pitch) and evaluated during rendering
31
+ - Fixed evaluator recursion guard and improved `$math.*` expression handling (prevents stack overflows)
32
+ - Minor ADSR defaults polish: ensure `sustain` defaults to `1.0`
33
+ - Evaluator now supports `$mod.*` and `$easing.*` calls (evaluated before `$math.*`) for richer automation
34
+ - Modularized `AudioEngine::insert_note` into small helpers (oscillator, ADSR computation, pan gains, envelope evaluation, stereo mix)
35
+ - Reused helpers in `pad_samples` to reduce duplication
36
+ - Moved special variables/functions to a dedicated module: `core::audio::special`, and refactored the evaluator to use it
37
+ - Continued borrow-friendly refactors to avoid unnecessary clones and improve readability
38
+
39
+ ### 🧩 Parser / Preprocessor
40
+
41
+ - Parser upgrades for operators `+ - * /`, parentheses and brackets
42
+ - Improved arrow-call parsing and map handling for multi-line values
43
+ - Resolvers: refined `call`/`spawn` resolution (better error messages with stack traces)
44
+
45
+ ### 🧱 Architecture / Refactor
46
+
47
+ - Modularized audio interpreter (split by statement type); clearer responsibilities
48
+ - Reduced allocations by passing slices/borrows instead of cloning large structures
49
+ - Removed dead code and unused params across resolvers, handlers, and interpreter modules
50
+
51
+ ### 🧰 Tooling / Build
52
+
53
+ - Resolved binary/lib artifact collision by renaming the internal library crate to `devalang_core`
54
+ - Warning sweep: build now compiles cleanly without Rust warnings (and fewer Clippy lints)
55
+ - Moved error collection helpers into a dedicated `utils::error` module
56
+
57
+ ### 🐛 Fixes & Stability
58
+
59
+ - Prevent infinite recursion during numeric expression evaluation
60
+ - Stabilized renderer and interpreter timing when combining `loop`, `call`, and `spawn`
61
+
62
+ ### ⚠️ Breaking changes
63
+
64
+ - Internal crate rename to `devalang_core` (no change to the CLI or WASM package names)
65
+
7
66
  ## Version 0.0.1-alpha.14 (2025-08-24)
8
67
 
9
68
  ### 🌎 Ecosystem
package/docs/ROADMAP.md CHANGED
@@ -27,4 +27,4 @@ Devalang is a work in progress. Here’s what we’re planning next:
27
27
 
28
28
  - ⏳ **Smart modules**: Let Devalang detect and use groups, samples, and variables without needing to import them manually.
29
29
  - ⏳ **Other statements**: Implement `pattern`, `function`, and other control structures.
30
- - ⏳ **Testing**: Expand test coverage for all features.
30
+ - ⏳ **Testing**: Expand test coverage for all features.
@@ -0,0 +1,44 @@
1
+ bpm 120
2
+
3
+ group myLead:
4
+ let mySynth = synth sine
5
+
6
+ # This will automate all notes inside mySynth
7
+ # automate mySynth:
8
+ # param volume {
9
+ # 0% = 0.0
10
+ # 100% = 1.0
11
+ # }
12
+ # param pan {
13
+ # 0% = -1.0
14
+ # 100% = 1.0
15
+ # }
16
+ # param pitch {
17
+ # 0% = -12.0
18
+ # 100% = 12.0
19
+ # }
20
+
21
+ # This will automate only C4
22
+ mySynth -> note(C4, {
23
+ duration: 400,
24
+ automate: {
25
+ pitch: {
26
+ 0%: -12.0
27
+ 100%: 12.0
28
+ },
29
+ pan: {
30
+ 0%: -1.0,
31
+ 100%: 1.0
32
+ }
33
+ }
34
+ })
35
+ mySynth -> note(G4, { duration: 400 })
36
+ mySynth -> note(E4, { duration: 600 })
37
+ mySynth -> note(A4, { duration: 400 })
38
+ mySynth -> note(F4, { duration: 800 })
39
+ mySynth -> note(D4, { duration: 400 })
40
+ mySynth -> note(B3, { duration: 600 })
41
+
42
+
43
+
44
+ call myLead
@@ -1,29 +1,45 @@
1
- # This example demonstrates how to create a custom synth and use it in a group with notes.
1
+ bpm 120
2
2
 
3
- bpm 135
3
+ group main:
4
+ let lead = synth sine {
5
+ attack: 0,
6
+ decay: 100,
7
+ sustain: 100,
8
+ release: 100
9
+ }
4
10
 
5
- let customSynth = synth sine {
6
- attack: 0,
7
- decay: 100,
8
- sustain: 50,
9
- release: 200,
10
- }
11
+ # Global automation for this synth (applies to subsequent notes)
12
+ automate lead:
13
+ param volume {
14
+ 0% = 0.0
15
+ 100% = 1.0
16
+ }
17
+ param pan {
18
+ 0% = -1.0
19
+ 100% = 1.0
20
+ }
21
+ param pitch {
22
+ 0% = -12.0
23
+ 100% = 12.0
24
+ }
11
25
 
12
- group mySynthGroup:
13
- customSynth -> note(C4, {
14
- duration: 1000,
15
- glide: true,
16
- velocity: 0.8
17
- })
18
- customSynth -> note(E3, {
19
- duration: 1000,
20
- glide: true,
21
- velocity: 0.5
22
- })
23
- customSynth -> note(D3, {
24
- duration: 1000,
25
- glide: true,
26
- velocity: 0.6
27
- })
26
+ # Notes (per-note automation can override globals)
27
+ lead -> note(C4, {
28
+ duration: 400,
29
+ velocity: 0.8,
30
+ automate: {
31
+ pan: {
32
+ 0%: -1.0
33
+ 100%: 0.0
34
+ }
35
+ }
36
+ })
37
+ lead -> note(E4, { duration: 400 })
38
+ lead -> note(G4, { duration: 600, glide: true, target_freq: 659.25 })
39
+ lead -> note(B3, { duration: 400, slide: true, target_amp: 0.3 })
28
40
 
29
- spawn mySynthGroup
41
+ # Simple looped fill
42
+ for i in [1, 2, 3]:
43
+ lead -> note(C5, { duration: 200 })
44
+
45
+ call main
@@ -0,0 +1,15 @@
1
+ # NOTE: Available in next release
2
+
3
+ # @use devaloop.acid as acidPlugin
4
+
5
+ # let acidSynth = synth acidPlugin.synth {
6
+ # waveform: "saw",
7
+ # accent: 0.1,
8
+ # decay: 250
9
+ # }
10
+
11
+ # group mySynthGroup:
12
+ # acidSynth -> note(C4, { duration: 600 })
13
+ # acidSynth -> note(E4, { duration: 600 })
14
+
15
+ # call mySynthGroup
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@devaloop/devalang",
3
3
  "private": false,
4
- "version": "0.0.1-alpha.14",
4
+ "version": "0.0.1-alpha.15",
5
5
  "description": "Write music like code. Devalang is a domain-specific language (DSL) for sound designers and music hackers. Compose, automate, and control sound — in plain text.",
6
6
  "main": "out-tsc/index.js",
7
7
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.0.1-alpha.14",
2
+ "version": "0.0.1-alpha.15",
3
3
  "channel": "alpha",
4
- "lastCommit": "e9243d1e7ec612d0d4d31307bcfbf28c5e912b11",
5
- "build": 13
4
+ "lastCommit": "31dad63ed5eb76bdb5ada9177685ccea2ae06bdc",
5
+ "build": 14
6
6
  }
package/rust/cli/bank.rs CHANGED
@@ -1,6 +1,6 @@
1
1
  use std::fs;
2
2
 
3
- use serde::{ Deserialize, Serialize };
3
+ use serde::Deserialize;
4
4
  use crate::{
5
5
  common::cdn::get_cdn_url,
6
6
  config::loader::{ load_config, remove_bank_from_config, update_bank_version_in_config },
@@ -102,7 +102,7 @@ pub async fn handle_update_bank_command(name: Option<String>) -> Result<(), Stri
102
102
  );
103
103
  }
104
104
 
105
- let mut config = load_config(Some(&config_path)).ok_or_else(||
105
+ let config = load_config(Some(&config_path)).ok_or_else(||
106
106
  format!("Failed to load config from '{}'", config_path.display())
107
107
  )?;
108
108
 
@@ -255,8 +255,8 @@ pub async fn handle_remove_bank_command(name: String) -> Result<(), String> {
255
255
  pub async fn handle_bank_available_command() -> Result<(), String> {
256
256
  let bank_list = match list_external_banks().await {
257
257
  Ok(list) => list,
258
- Err(err) => {
259
- eprintln!("❌ Error fetching bank list: {}", err);
258
+ Err(_err) => {
259
+ eprintln!("❌ Error fetching bank list");
260
260
  return Err("Failed to fetch bank list".into());
261
261
  }
262
262
  };
@@ -283,7 +283,7 @@ pub async fn handle_bank_info_command(
283
283
 
284
284
  let response = match reqwest::get(&url).await {
285
285
  Ok(resp) => resp,
286
- Err(err) => {
286
+ Err(_err) => {
287
287
  return Err("Failed to fetch bank info".into());
288
288
  }
289
289
  };
@@ -294,8 +294,8 @@ pub async fn handle_bank_info_command(
294
294
 
295
295
  let bytes = match response.bytes().await {
296
296
  Ok(b) => b,
297
- Err(err) => {
298
- eprintln!("❌ Error reading response body: {}", err);
297
+ Err(_err) => {
298
+ eprintln!("❌ Error reading response body");
299
299
  return Err("Failed to read response body".into());
300
300
  }
301
301
  };
@@ -314,8 +314,8 @@ pub async fn handle_bank_info_command(
314
314
  pub async fn handle_bank_list_command() -> Result<(), String> {
315
315
  let bank_list = match list_installed_banks().await {
316
316
  Ok(list) => list,
317
- Err(err) => {
318
- eprintln!("❌ Error fetching bank list: {}", err);
317
+ Err(_err) => {
318
+ eprintln!("❌ Error fetching bank list");
319
319
  return Err("Failed to fetch bank list".into());
320
320
  }
321
321
  };
@@ -325,11 +325,10 @@ pub async fn handle_bank_list_command() -> Result<(), String> {
325
325
  for bank_toml in bank_list {
326
326
  let latest_version = match fetch_latest_version(bank_toml.bank.name.clone()).await {
327
327
  Ok(version) => version,
328
- Err(err) => {
328
+ Err(_err) => {
329
329
  eprintln!(
330
- "❌ Error fetching latest version for '{}': {}",
331
- bank_toml.bank.name,
332
- err
330
+ "❌ Error fetching latest version for '{}'",
331
+ bank_toml.bank.name
333
332
  );
334
333
  continue;
335
334
  }
@@ -441,8 +440,8 @@ async fn list_installed_banks() -> Result<Vec<BankFile>, String> {
441
440
 
442
441
  match toml::from_str::<BankFile>(&content) {
443
442
  Ok(bank_info) => banks.push(bank_info),
444
- Err(err) => {
445
- eprintln!("❌ Error parsing bank info for '{}': {}", bank_name, err);
443
+ Err(_err) => {
444
+ eprintln!("❌ Error parsing bank info for '{}'", bank_name);
446
445
  }
447
446
  }
448
447
  } else {
package/rust/cli/check.rs CHANGED
@@ -12,7 +12,7 @@ use crate::{
12
12
  utils::path::{ find_entry_file, normalize_path },
13
13
  },
14
14
  utils::{
15
- collect_errors_recursively,
15
+ error::collect_errors_recursively,
16
16
  logger::{ LogLevel, Logger },
17
17
  spinner::with_spinner,
18
18
  watcher::watch_directory,
package/rust/cli/play.rs CHANGED
@@ -134,7 +134,7 @@ pub fn handle_play_command(
134
134
  }
135
135
  }
136
136
 
137
- fn begin_play(config: &Option<Config>, entry_file: &str, output: &str, debug: bool) {
137
+ fn begin_play(_config: &Option<Config>, entry_file: &str, output: &str, debug: bool) {
138
138
  let spinner = with_spinner("Building...", || {
139
139
  thread::sleep(Duration::from_millis(800));
140
140
  });
@@ -1,4 +1,4 @@
1
- pub async fn handle_update_command(only: Option<String>) -> Result<(), Box<dyn std::error::Error>> {
1
+ pub async fn handle_update_command(_only: Option<String>) -> Result<(), Box<dyn std::error::Error>> {
2
2
  println!("Updates are not yet implemented. This is a placeholder function.");
3
3
  Ok(())
4
4
  }
@@ -1,8 +1,5 @@
1
1
  pub fn get_api_url() -> String {
2
- let api_url = std::env
3
- ::var("API_URL")
4
- .unwrap_or_else(|_| "https://api.devalang.com".to_string());
5
- // .unwrap_or_else(|_| "http://127.0.0.1:8989".to_string());
6
-
7
- api_url
2
+ let api_url = "https://api.devalang.com";
3
+ // let api_url = "http://127.0.0.1:8989";
4
+ api_url.to_string()
8
5
  }
@@ -1,8 +1,5 @@
1
1
  pub fn get_cdn_url() -> String {
2
- let cdn_url = std::env
3
- ::var("CDN_URL")
4
- .unwrap_or_else(|_| "https://cdn.devalang.com".to_string());
5
- // .unwrap_or_else(|_| "http://127.0.0.1:8888".to_string());
6
-
7
- cdn_url
2
+ let cdn_url = "https://cdn.devalang.com";
3
+ // let cdn_url = "http://127.0.0.1:8888";
4
+ cdn_url.to_string()
8
5
  }
@@ -1,8 +1,5 @@
1
1
  pub fn get_sso_url() -> String {
2
- let sso_url = std::env
3
- ::var("SSO_URL")
4
- .unwrap_or_else(|_| "https://sso.devalang.com".to_string());
5
- // .unwrap_or_else(|_| "http://localhost:5174".to_string());
6
-
7
- sso_url
2
+ let sso_url = "https://sso.devalang.com";
3
+ // let sso_url = "http://localhost:5174";
4
+ sso_url.to_string()
8
5
  }