Ukpai Ugochi
Feb 22, 2021 ⋅ 9 min read

Switching from Rust to TypeScript (and vice versa)

Ukpai Ugochi I'm a full-stack JavaScript developer on the MEVN stack. I love to share knowledge about my transition from marine engineering to software development to encourage people who love software development and don't know where to begin. I also contribute to OSS in my free time.

Recent posts:

Leveraging Wasp For Full-Stack Development

Leveraging Wasp for full-stack development

Learn how the Wasp, Web Application Specification, framework simplifies full-stack development by offloading repetitive code tasks.

Wisdom Ekpotu
May 27, 2024 ⋅ 11 min read
Developing Web Extensions With Wxt

Developing web extensions with the WXT library

Browser extensions are an important part of the web ecosystem. They make our lives easier and enhance our web browsing […]

Debjyoti Banerjee
May 24, 2024 ⋅ 8 min read
Bulma Css Adoption Guide: Overview, Examples, And Alternatives

Bulma CSS adoption guide: Overview, examples, and alternatives

Explore how Bulma CSS simplifies frontend development with its ease of use and customizable, responsive, pre-designed UI elements.

Timonwa Akintokun
May 23, 2024 ⋅ 10 min read
Using Mountaineer To Develop A React App With Python

Using Mountaineer to develop a React app with Python

Develop a React app with Python using the Mountaineer framework for building a simple app with integrated your frontend and backend database.

Rosario De Chiara
May 23, 2024 ⋅ 7 min read
View all posts

3 Replies to "Switching from Rust to TypeScript (and vice versa)"

  1. “You don’t need to install any runtime environment to execute TypeScript code.” That’s not really true… you first need a TypeScript to Javascript, compiler, and then you need a Javacript interpreter runtime (embedded in a browser or in nodejs) to run your program. Granted, for many people they already have a runtime installed on their system, but for some applications this could be a deal-breaker.

  2. Good read for primer. Thanks

    “Rust has the const keyword. However, you can only set the variable value at runtime alone, not at compile time.

    fn another_function(x: i32) -> i32 {
    return x + 1;

    fn main() {
    // RUN-TIME ASSIGNMENT, if you replace const with let, there’s no compile error
    const z = another_function(5);
    println!(“The value of z is: {}”, z); // 6
    Because let can be set at compile time and const can’t, the code throws an error at compile time. Although Rust variables are immutable by default, you can redefine or shadow variables of type let:

    I’m pretty sure you meant run-time and compile-time the other way around for this section (the typo is in the text, not in the code).

Leave a Reply