In 2024, Rust is becoming more and more popular

In 2024, Rust is becoming more and more popular

On February 19th, Rust released its 2023 survey report. This survey has been conducted continuously for eight years, attracting many maintainers, contributors, and people interested in the future development of Rust projects to participate.

The 2023 Rust Status Survey began on December 18, 2023 and will continue until January 15, 2024. The Rust team is exploring a more efficient and sustainable process to collect and analyze data faster, providing deeper and more valuable insights to the community.

# Rust Usage

In 2023, the proportion of respondents who identify themselves as Rust users will increase slightly, from 91% in 2022 to 93% in 2023.

img

Among the population using Rust in 2023, 49% are using Rust every day, an increase of 2 percentage points compared to last year, showing a slight upward trend.

img

Among respondents who were non-Rust users , 31% said the difficulty of Rust was the main reason they didn’t use it, while 67% noted that they haven’t had the opportunity to prioritize learning Rust, which remains the most common reason they don’t use Rust.

img

Among former Rust users surveyed in 2023, 46% said they stopped using Rust due to factors beyond their control (down 1 percentage point from 2022), 31% gave up Rust due to a preference for other programming languages (up 9 percentage points from 2022), and 24% cited difficulty as the main reason they gave up Rust (down 6 percentage points from 2022).

img

In the past year, the level of Rust skills among respondents has generally improved! 23% of people can write simple Rust programs (a decrease of 6 percentage points compared to 2022), 28% of people can write code that can be used in actual production (an increase of 1 percentage point), and 47% of people believe that they are quite efficient when using Rust - this proportion has increased from 42% in 2022. Although this survey is only one of many tools to measure changes in Rust skill levels, these numbers are still encouraging because they reflect the increasing knowledge and skills of Rust users who participate in the survey year after year.

img

From the perspective of the operating system used by Rust users, the current situation is roughly the same as the survey results in 2022. Linux is still the most popular choice among Rust users, followed closely by macOS and Windows, with similar usage rates among the three.

img

While Linux machines remain the favorite platform for Rust programmers, they are also developing Rust programs for a variety of other platforms. Notably, the number of users for WebAssembly, embedded, and mobile platforms has increased slightly, further highlighting Rust’s Cross-Platform Capability.

img

From the current situation, Visual Studio Code seems to still be the most popular editor among Rust developers, and RustRover, launched last year, has also won the favor of many developers.

img

# Rust work

The trend of using Rust in work continues to rise year by year. In the 2023 survey, 34% of respondents said they use Rust for most of their coding work, an increase of 5 percentage points from 2022. Among this group, 39% of people’s organizations have a significant application of Rust.

img

It is worth noting that the top reason for employers to invest in Rust among respondents is still the ability to build relatively accurate and defect-free software, accounting for as high as 86%. This proportion has increased by 4 percentage points compared to the survey results in 2022. Rust’s performance characteristics ranked second, accounting for 83%.

img

We are also pleased to see that 79% of respondents stated that Rust has helped their company achieve its established goals, an increase of 7 percentage points compared to 2022. In addition, 77% of respondents expect their organization to continue using Rust in the future, an increase of 3 percentage points from the previous year. It is worth mentioning that the proportion of respondents who believe that Rust is challenging for their organization has decreased, from 34% in 2023 to 39% in 2022. At the same time, the proportion of respondents who believe that Rust’s investment value for money has also increased, from 60% in 2022 to 64% in 2023.

img

The formation of this trend is influenced by various factors, but the continuous improvement of Rust’s popularity may have led to the abundance of resources, which in turn provides better support for new teams using Rust. In terms of technology, Rust has shown obvious advantages in building server backends, web and network services, and cloud technology, and has been widely welcomed.

img

# Rust Challenge

The Ruts team has been working to reveal the challenges, concerns, and priorities Rustaceans have faced throughout the year through the Rust Status Survey.

Among the 9,374 respondents who shared their concerns about the future of Rust, we noticed that the majority (43%) are concerned that Rust will become too complex, an increase of 5 percentage points from 2022. In addition, 42% of respondents are concerned about the insufficient popularity of Rust in the technology industry. It is particularly noteworthy that in 2023, 32% of respondents are most concerned that Rust developers and maintainers will not receive sufficient support, an increase of 6 percentage points from 2022.

It is gratifying that the proportion of respondents who are not worried about the future of Rust has significantly decreased, from 30% in 2022 to 18% in 2023.

img

The features that Rust users want to implement, stabilize, or improve are mainly in the following areas: features (such as trait aliases, associated type defaults, etc.), constant execution (such as generic constant expressions, constant attribute methods, etc.), and asynchronous programming (such as asynchronous closures, coroutines, etc.). These areas are all important areas of improvement that the Rust community is currently focusing on and expecting.

img

It is worth noting that 20% of respondents said they hope Rust can slow down the development of new features, which is likely related to the concerns mentioned earlier about Rust becoming too complex.

From the survey results, it seems that Rustaceans are most likely to encounter challenges in asynchronous Rust, feature and generic systems, and borrow checkers. These areas require more support and improvement to meet the needs and expectations of the community.

img

The respondents who participated in the survey expect Rust maintainers to mainly focus on the following aspects: the top priority is to fix vulnerabilities in the compiler (68%), followed by improving the runtime performance of Rust programs (57%) and improving compile time (45%). Improvements in these key areas will help improve the overall quality and User Experience of Rust.

img

Similar to the situation in recent years, respondents generally believe that compile time is one of the key areas that urgently needs improvement. However, it is worth noting that respondents seem to value the importance of runtime performance more when weighing runtime performance against compile time. This indicates that optimizing runtime performance is also an important issue of concern in the Rust community.

So the question is, will you embrace Rust?

2024 Rust Developer Roadmap

2024 Rust Developer Roadmap

In the past five years, Rust has become one of the 15 most popular and beloved programming languages with its incredible development experience and flexibility. It has powerful features, transparent documentation, and a participatory and supportive community of contributors.

Rust prioritizes safety, performance, and concurrency. It allows programmers to use the control of low-level languages to create applications, while also possessing the powerful abstraction of high-level languages. Overall, with Rust, you can do many things, so every developer should at least give it a try.

img

The core content of this article is as follows:

# 1. Rust Core Features

Below we will explore some core features of Rust

Memory safety:

The main design goal of Rust is to ensure memory safety without relying on the garbage collector. This is achieved through transparent data ownership, a powerful type system, and strict compile-time checks. The data ownership paradigm stipulates that each piece of data in Rust has a unique owner. When ownership is transferred (called “moved”), the previous owner can no longer access the data. This can prevent duplicate release operations and eliminate double deletion errors. This method eliminates a class of errors during the compile phase.

By using the Option < T > type in Rust, errors such as null pointer backreferences that are common in many languages can be eliminated. It explicitly handles the situation where a value may not exist.

Due to Rust’s borrowing and ownership system, it can also prevent data races and buffer overflows. If a piece of code may be unsafe, Rust will not compile it unless it is wrapped in an unsafe block to remind developers to operate with caution.

Concurrency model:

Concurrency in Rust is built on the same principles that provide memory safety: ownership and borrowing. By utilizing these principles, Rust ensures thread safety.

The language provides several concurrency primitives such as Arc (atomic reference counting) for shared state and Mutex or RwLock for mutable access. Channels in Rust provide a way for communication between threads.

The async/await syntax introduced 1.39.0 Rust allows you to write asynchronous code that looks like synchronous code, simplifying complex concurrency scenarios.

Excellent performance:

Rust’s “zero-cost abstraction” means that using advanced constructs does not incur runtime overhead. You can reap the benefits of abstraction without sacrificing performance.

As a systems language, Rust provides extensive control over hardware resources. This makes it as efficient as C and C++ in many benchmarks, with added security guarantees.

Since Rust is explicit and has no runtime, it can perform internal connections, loop unwinding, and other aggressive optimizations.

# 2. Advantages of Rust

img

Rust combines various programming styles: procedural, Actor-based concurrency, Object Oriented, and pure function. It also supports general and metaprogramming in static and dynamic forms. Here is an overview of the main advantages of Rust.

Easy to deploy:

Without active use, Rust’s powerful security and integrity tools are meaningless. The creators and community of Rust make it easy for beginners to master this language. The software packages required to generate Rust binary files are unified. Only when working with components outside the Rust system (such as compiling C libraries from source code), external compilers like GCCO are needed.

Powerful type system:

Using Rust, compiling code with detectable errors is not allowed. This feature allows developers to focus on the core logic of the program rather than correcting the problem.

Cross-platform compatibility:

Although Rust is compatible with most modern platforms, its developers did not aim to make it a universal language, but focused on popular platforms. Rust can run on three main operating systems: Linux, Windows, and MacOS. If cross-compiling or generating binary files for another platform or architecture is required, Rust is also relatively easy to implement.

Powerful features:

Rust has a set of native features comparable to C++: macros, generics, pattern matching, and composition through “features”.

Comprehensive standard library:

One of Rust’s broader goals is to provide alternatives comparable to C and C++. Therefore, it provides a wide range of standard libraries including containers, collections, iterators, string operations, process and thread management, etc. As Rust aims to be cross-platform, its standard library only includes general portable features. Platform-specific functions can be obtained through third-party libraries. In addition, Rust can run without a standard library, which is particularly useful when developing platform-independent binaries such as embedded systems.

Selection of third-party libraries:

The versatility of a language often depends on the third-party support it receives. Rust’s official repository Cargo hosts over 60,000 “crates”, many of which are API bindings of popular libraries or frameworks. However, these crates do not have a comprehensive ranking system based on quality, so you must rely on personal experience or community advice.

IDE support:

The Rust team developed rust-analyzer, which can provide real-time feedback from Rust compilers to IDEs, such as Microsoft Visual Studio Code.

Open source:

As an open-source language, Rust benefits from the contributions of a global developer community, constantly improving its performance. It is especially friendly for beginners. It also regularly updates detailed and transparent language documentation.

# 3. Rust ecosystem

img

One important advantage of Rust is its extensive ecosystem of tools, frameworks, and libraries.

Cargo:

Cargo is the official package manager and compiler for Rust. It handles project building, dependency management, and test execution. Developers use crates.io as the official regedit for Rust packages, managed by the Rust community and integrated with Cargo.

Rustup:

Rustup is a tool that simplifies Rust version management, allowing you to switch and update between different Rust toolchains.

Development Environment:

Many Integrated Development Environments (IDEs) and text editors now support Rust development, including Visual Studio Code, Atom, and IntelliJ IDEA.

Libraries and Frameworks:

Rust’s library and framework ecosystem continues to expand, covering applications such as web development, gaming, and Machine Learning. Some popular libraries and frameworks include Rocket, Tokio, Serde, and Actix.

Rust-analyzer:

Rust-analyzer is an efficient and reliable language server that provides features such as code analysis and auto-completion for Rust code. It is easy to use and compatible with multiple text editors and IDEs.

Rustfmt is a formatting tool specifically designed to ensure uniform formatting of Rust code.

Rich learning resources:

Rust provides a lot of useful documentation. Here are some useful resources collected:

  • The Rust Programming Language Book (in-depth explanation of Rust and its core concepts)
  • Rust Language Cheat Sheet
  • Rust Atomics and Locks. Low-Level Concurrency in Practice by Mara Bos (book)
  • Programming Rust: Fast, Safe Systems Development by by Jim Blandy, Jason Orendorff, Leonora Tindall (book)
  • Rust by Example (collection of annotated code samples)
  • Rust Install documents
  • Rust Installer download page
  • Rust design patterns
  • Rust in Motion (paid video course)
  • Rust in blockchain (weekly newsletter)
  • Serokell’s selection of the best Rust learning resources

# 4. Rust development roadmap

img

# 5. Challenges of Rust development

Rust programming language provides many advantages, such as enhanced security, excellent performance, simplified concurrency programming, and ensuring memory safety. However, Rust is not without its drawbacks. Some common challenges when using Rust include:

  • Steep learning curve: For beginners, concepts such as ownership, borrowing, and lifecycle in Rust can be confusing, especially for those who have not been exposed to these concepts.
  • Lengthy syntax: Some people criticize the language’s verbose syntax, which can be seen as both an advantage (explicit rather than implicit) and a disadvantage (requiring verbose code to implement simple tasks).
  • Limited libraries: While the Rust ecosystem is growing rapidly, it lags behind more mature languages like Python, Java, or JavaScript in terms of the number and diversity of third-party libraries.
  • Compile time: A frequently mentioned disadvantage is the long compile time. This may slow down development speed, especially in larger projects.
  • Maturity: Although Rust is a stable language, it is still younger than many competitors. Therefore, certain features and best practices are still evolving.
  • Simplified runtime: This is both an advantage and a challenge. Although it allows Rust to be used in system programming and resource-constrained environments, it also means that the language does not have as many built-in features as languages with more complete runtimes.

# Finally

A survey shows that Rust is becoming more and more popular among developers. The 2023 Stack Overflow Developer Survey shows that 13% of people have extensive work experience on Rust recently, and from 2016 to 2023, this language has been the “most popular”. Rust also ranks sixth in the “most popular technology” in 2023.

The combination of advanced abstraction and fine grain control makes Rust the preferred choice for developing safe and efficient system software. With the increasing recognition of Rust in the developer community, it may become the dominant language in more fields.

Rust is fully invading the front-end

Rust is fully invading the front-end

# Rust is fully invading the front-end

I have studied the basics of Rust and some ecological technical solutions solidly and systematically. The original intention of learning it is because Rust can support the native-level development of HarmonyOS applications and provide technical reserves for advanced HarmonyOS developers.

But if you don’t learn, you won’t know, and you’ll be shocked when you learn. Only then did you realize that the Rust ecosystem is invading all aspects of front-end development with an unstoppable momentum, all-round and no dead ends . The most critical thing is that due to the latecomer advantage, these technical solutions are often more advanced, more scientific, and have higher performance than existing front-end solutions…

# Farm

img

Farm is an extremely fast build engine written in Rust. In its promotional documentation, it claims to be more than 10 times faster than Webpack and 5 times faster than Vite. Obviously, this is a front-end project build tool that wants to accurately target Vite.

Due to Vite adopting a compile-on-request strategy for modules in the project and not bundling the source code, according to the experience of the Byte Architecture team, when the project is huge, the first page loading time of Vite may be as long as tens of seconds “when the page is first loaded, a large number of modules are loaded”, it is extremely slow when refreshing, and the huge request volume may cause the browser to crash, affecting the development experience.

And vite in the Development Environment using esbuild pre-compile, in the generation environment using bundler rollup, the processing is different, occasionally there may be Development Environment and online behavior inconsistent situation , once inconsistent, it means a huge troubleshooting cost.

In response to the pain points of Vite, Farm uses Rust to re-implement the compile capability of CSS/TS/JS/Sass , which can achieve millisecond-level project launch. For most cases, it can control the HMR time within 10ms.

# Turbopack

img

Compared to Farm, Turbopack is more trustworthy and has received more attention due to the support of next.js.

img

Turbopack is also a front-end project building tool based on Rust. Turbopack is built on a new incremental architecture, and only focuses on the minimum resources required for development when packaging, so whether it is startup speed or HMR speed, it has far better performance than Vite.

On an application with 3000 modules, Turbopack only takes 1.8 seconds, while Vite takes 11.4 seconds.

img

Turbopack is provided by the Vercel team, focusing on improving the speed of Next.js packaging tool. And the future goal is to replace webpack and become the new generation of front-end packaging tool. Therefore, the maturity and popularity of Next.js will also drive Turbopack to become a more reliable packaging tool.

# Rspack

img

Rspack is a project packaging tool provided by the Byte team. Like Turbopack, it fully utilizes the performance advantages of the Rust language and has significantly improved packaging speed.

However, unlike Turbopack, Rspack has chosen a route that prioritizes compatibility with the webpack ecosystem. On the one hand, these compatibility may bring certain performance overhead, but in actual business implementation, this performance overhead is acceptable. On the other hand, these compatibility also enable Rspack to better integrate with upper-level frameworks and ecosystems, enabling gradual business migration.

Currently, the development team of Rspack is also actively recruiting. Obviously, they have a very clear plan for future development.

img

# Vite is refactoring with rust

Vite, as a new generation of high-performance packaging tool, really amazed everyone when it first appeared. But it couldn’t resist the various crazy roll kings using Rust to overtake. Instead, Vite became the background board, being pressed on the ground and rubbed crazily. Therefore, in order not to be suppressed too much in performance, the Vite team is developing various alternative solutions based on Rust to solve Vite’s current pain points.

Rolldown

img

The Vite team is developing Rolldown and has open-sourced it. It is an alternative to Rollup developed using Rust. Its focus will be on local-level performance while maintaining compatibility with Rollup. The ultimate goal is to quietly switch to Rolldown in Vite with minimal impact on Vite users.

However, at present, there is a lot of pressure for Vite to achieve the goal of rust refactoring. Therefore, the Vite team has planned four stages to promote this

\1. Replace esbuild 2. Replace Rollup 3. Use Rust to achieve built-in conversion of common requirements, such as compile ts , JSX, etc 4. Refactor Vite completely with Rust

# Leptos

img

Leptos is a Rust-based React/Solid framework. It also implements fine grain-level reactive updates based on signal.

The basic grammar is as follows:

1
2
3
4
5
6
7
8
9
10
11
12
13
#[component]
fn App() -> impl IntoView {
let (count, set_count) = create_signal(0); view! {
<button
on:click=move |_| set_count.update(|n| *n += 1)
>
"click me"
</button> <p>
<strong>"Reactive"</strong>
{count}
</p>
}
}

It is very similar to Solid in terms of grammar. However, in terms of grammar details, it is designed more reasonably than Solid. It has more intuitive thinking in semantics. This means that Leptos does a better job of compiling based on rust.

1
2
3
4
5
6
7
8
9
10
11
#[component]
fn ProgressBar(
#[prop(default = 100)]
max: u16,
#[prop(into)]
progress: Signal<i32>
) -> impl IntoView {
view! {
<progress max=max value=progress />
}
}

Although Leptos is designed to be advanced and has strong performance, it is based on Rust and has a very high cost to get started, so it may encounter a lot of difficulties in promotion. However, this still cannot stop the enthusiasm of many programmers for it.

I am also one of the developers who really like Leptos, and I regard it as one of the main projects to familiarize myself with Rust syntax learning. Because this is a field that we front-end developers are more familiar with, mastering Rust through it can achieve twice the result with half the effort.

Of course, there is still a lot of potential in the tool that I have not fully explored, such as the official documentation claiming to be a full Stack framework, but because I have not yet digested it, I need to further learn to understand it.

# dioxus

img

Dioxus is a more ambitious cross-platform client development framework, and at the same time, it can achieve full stack development. It has some similarities with Leptos in implementation principles and syntax design, but it is completely different in UI syntax performance

A simple example can be seen

1
2
3
4
5
6
7
fn app() -> Element {
let mut count = use_signal(|| 0); rsx! {
h1 { "High-Five counter: {count}" }
button { onclick: move |_| count += 1, "Up high!" }
button { onclick: move |_| count -= 1, "Down low!" }
}
}

From this grammar design, it can be seen that it aims to unify the world. It attempts to cover all scenarios such as web development, mobile end app development, and desktop app development.

img

The simple and practical feeling is that the framework has the suspicion of over-imitating React, so that I, who is familiar with React, can learn it more easily than Leptos.

# Tauri

img

Tauri is an alternative to Electron.

Electron has two main pain points, one is that the package size is too large, and the other is that memory consumption is severe. Therefore, its alternative solutions are endless. Unlike the several Rust frameworks introduced earlier, Tauri’s development has become mature and has been applied in many commercial projects.

Most importantly, I have started to let my students learn it and use it as a core project highlight to cope with the increasingly competitive interview scene. And the effect is not bad. Judging from the interview results in the past six months, many domestic companies have begun to pay attention to the benefits brought by Tauri.

Due to Rust abandoning the huge size of Chromiun and Node.js, for the same project, the packaging size can be reduced from 60M in Electron to 4M, and memory consumption can also be reduced from 500M to around 150M.

# Servo

img

This is a browser project based on Rust development and aimed at replacing Chrome. The project was an experimental project developed by Mozilla in the early days. Due to limited funds, it was put on hold for a long time. Now, with Rust becoming popular, it is ready to step up its efforts and the recent version iteration is very fast. At this time, Servo has been taken over by the Linux Foundation.

Servo attempts to create a large-scale parallel computing page rendering mode to accelerate rendering, layout, HTML parsing, image decoding, etc. Tests on the Arm architecture show that Servo’s performance is significantly better than Chromium.

Then I downloaded this browser to play with it, but found out that it was still a rudimentary version. Basic UI functions had not been developed yet, and many page layouts still had problems with disorder.

It can only be said that it is temporarily worth paying attention to and has great development potential. If used, it may still be early.

# Deno

img

Deno is a JavaScript runtime built on Rust. It comes from the same boss as Node.js. The latest version of Deno is also developed on Rust.

Personally, the biggest charm of Deno lies in its direct native support for TypeScript and support for JSX/TSX. Therefore, I am very optimistic about the future development of Deno, which is getting better and better, although the current ecosystem is not yet sufficient to compete with Node.

# Summary

It is obvious that Rust is invading every aspect of the front-end. Although it is not mature enough in some aspects, it has shown potential, and in some aspects, it has already established clear advantages.

I think front-end development can no longer ignore the existence of Rust . Due to its ultra-high performance and security, Rust has been highly recognized in various fields such as “operating system level, AI, game development, server level, Inter-App communications solutions, high-performance web applications…” The community has a very high active level and the ecological development is very rapid.

Therefore, from the end of last year until now, I have been immersed in learning Rust. Overall, I feel that learning Rust from the perspective of front-end development is relatively easy. It takes about a day to learn all the basic syntax, but we need to have a very accurate understanding of memory. If you are confused about memory, it may be difficult to learn Rust.

Then we need to spend more time learning the development mindset and ecosystem of Rust. For front-end development, Leptos is a good learning and practice project.

What happened when Fortran entered the top 10 programming language rankings in May 2024?

What happened when Fortran entered the top 10 programming language rankings in May 2024?

TIOBE’s programming language rankings for May 2024 have been released. The official title is: Fortran in the top 10, what is going on?

Fortran, a veteran language in the programming world, has once again entered the Top 10 list of programming languages after more than 20 years of silence.

This makes people curious, what made this “old guy” radiate a second spring?

img

Since its birth in 1957, Fortran has never stopped innovating itself. The latest ISO Fortran 2023 standard is proof of its continuous progress.

Fortran has won a place in the field of numerical and mathematical computing with its excellent performance and mature technology, beating many competitors.

The free and open source feature of Fortran gives it an advantage in cost-effectiveness.

img

Official website address: https://fortran-lang.org/

On Amazon, the number of search results for “Fortran programming” far exceeds that of emerging languages Kotlin and Rust, reflecting the market’s continued interest and demand for Fortran.

Comparative analysis with other languages:

  • Although Python is widely popular, it lacks speed.
  • MATLAB is user-friendly, but expensive.
  • C/C++ fast, but lacks native support for mathematical calculations.
  • R is similar to Python, but slightly less popular and faster.
  • Julia, as a rising star, has great potential, but her maturity still needs time to be verified.
  • Fortran is fast, supports native mathematical calculations, has mature technology, and is completely free. These features have enabled Fortran to steadily advance in the jungle of programming languages.

The revival of Fortran is an indisputable fact. It proves that in the continuous evolution of technology, classics and innovation can coexist, and veterans can also radiate new vitality.

img

Fortran, short for “Formula Translation”, is a high-level programming language originally designed for numerical and scientific computing.

  • ** Origin: ** Fortran language was developed by a team led by John W. Backus of IBM in 1957 and is one of the earliest high-level programming languages.
  • The original design goal of Fortran was to help scientists and engineers write programs for scientific computing more easily.
  • ** Syntax Features: ** Fortran has a concise syntax and direct support for mathematical expressions, which makes it very popular in the fields of science and engineering.
  • ** Compiler: ** Fortran programs are usually translated into machine code through a compiler for execution on a computer.
  • Fortran has undergone multiple standardization and upgrades, including Fortran IV, Fortran 66, Fortran 77, Fortran 90, Fortran 95, Fortran 2003, Fortran 2008, and the latest version of Fortran 2018.
  • Parallel computing: Fortran 90 and later versions have added support for parallel computing, maintaining its importance in the high-performance computing (HPC) field.
  • Fortran has a wide range of applications in scientific computing, engineering simulation, numerical analysis, weather forecasting, quantum physics simulation and other fields.
  • ** Cross-platform: ** Fortran compiler supports a wide range of operating systems, including Windows, Linux and macOS.

This month, the top ten rankings are:

# Python,C,C++,Java,C#,JavaScript,Visual Basic,Go,SQL,Fortran

img

# Python,C,C++,Java,C#,JavaScript,Visual Basic,Go,SQL, Fortran historical change curve:

img

Ranked 11-20 programming languages, PHP fell to 16, up one place from last month :

img

Programming languages ranked 21-50:

img

51-100 programming languages:

ABC, ActionScript, Algol, Apex, APL, bc, Boo, Carbon, CIL, CL (OS/400), CLIPS, Clojure, Common Lisp, Curl, DiBOL, Erlang, Factor, Groovy, Hack, Icon, Inform, Io, J, JScript, Ladder Logic, Lingo, LiveCode, LPC, MQL5, NATURAL, Nim, OCaml, OpenEdge ABL, Oxygene, Paradox, PL/I, PowerShell, Pure Data, Q, Ring, RPG, Scheme, Smalltalk, SPARK, Standard ML, WebAssembly, Wolfram, X++, Xojo, XPL

Historical rankings of major programming languages (1988-2024):

img

Programming Language “Celebrity List” (2003-2023):

img

TIOBE publishes a monthly ranking of programming languages based on the number of global technical engineers, courses, and third-party suppliers, including popular search engines and technical communities such as Google, Baidu, Wikipedia, Lingo, etc.

The data reflects the changing trend of mainstream programming languages, which can serve as a reference for our learning and work. However, each language has its own suitable application scenarios, so there is no need to pay too much attention to it. After all, the quality of a language depends on how it is used.

The following video shows the changing trends of programming languages in the past 20 years.

Reference: https://www.tiobe.com/tiobe-index/

 Rust writes the new generation web framework Teo, which supports both Node and Python, with amazing speed!

Rust writes the new generation web framework Teo, which supports both Node and Python, with amazing speed!

Today I will share the topic. With the rapid development of web technology, development has become increasingly complex and requires more time and effort. Today, I will introduce this new generation web framework written in Rust.

Web project development is becoming increasingly complex, which also brings many challenges to developers. It is necessary to flexibly use the latest web development frameworks to improve development efficiency and respond to constantly changing needs.

Recently, while browsing Github, I came across a new generation of web framework with structure as its core - TEO, a web framework suitable for Rust, Node.js, and Python , which can greatly improve the work efficiency of application developers when using web servers and databases. It is worth mentioning that this project has now become GVP project of Gitee.

img

What is TEO?

Teo is a new generation web framework. It consists of the following parts:

  • Teo schema: an intuitive and innovative schema language that is descriptive and readable
  • Teo Server: High-performance core written in Rust and API bindings for Node.js, Python, and Rust
  • Teo CLI: A CLI tool for reading schemas and performing tasks, including database migration, running servers, and seeding data
  • Teo Query Client: Automatically generated type-safe query builder for multiple platforms and languages

Why use TEO?

Traditional web frameworks

  • Many boilerplate codes : developers need to write duplicate code for each route, which is not only time-consuming but also error-prone.
  • Lack of built-in features : Traditional frameworks often do not provide common functions such as filtering, sorting, and pagination, and developers need to implement these functions themselves.
  • Debugging Difficulty : Debugging SQL queries and MongoDB aggregation is complex, error-prone, and time-consuming.
  • Type and interface duplication : In front-end development, developers need to re-declare the data types and interfaces of the back-end model, resulting in duplication of work.

Teo Modern Web Framework:

  • Reduce boilerplate code : The new generation of frameworks reduces the amount of boilerplate code developers need to write by providing more abstraction and automation tools.
  • Built-in common features : Modern frameworks often have common features such as filtering, sorting, and pagination built in, making it easy for developers to implement these features without having to write them from scratch.
  • The new generation framework provides better tools and interfaces to simplify the debugging process of database queries and aggregation, reducing the possibility of errors.
  • Unified data types and interfaces : Modern frameworks allow developers to define data models and interfaces on the server side, and then automatically generate Client code, reducing duplication of effort and improving consistency between front-end and back-end code.

More information about Teo can be found on the official website.

Functions and features

Let’s take a look at what features Teo provides.

  • Innovative structural definition inspired by GraphQL and Prisma
  • Automatic database migration
  • Supports Rust, Node.js, and Python
  • Supports MySQL, PostgreSQL, SQLite, and MongoDB.
  • Generated ORM types and interfaces
  • Query Client generated for frontend
  • Very efficient and high performance
  • Data cleaning, transformation, and validation
  • Built-in user sessions
  • Built-in permission check
  • First in, last out Middleware
  • Custom routes and handlers

img

Quick Start

A typical Teo workflow consists of the following parts:

1. Select your language stack

Teo supports three server-side programming languages: Node.js, Python, and Rust. You can choose a language you are familiar with to work with.

  • Node.js works well with web technologies.
  • Python is great for interacting with artificial intelligence infrastructures.
  • Aimed for the Highest Performance, Rust is hard to write.

Teo cares about code repetition and productivity. Therefore, the front-end Client is generated by Teo. Teo supports 5 front-end languages: TypeScript, Swift, Kotlin, C #, and Dart. This almost covers mainstream front-end technologies. Easily use these generated Clients or share them with front-end developers.

Note: Currently, Swift, Kotlin, C #, and Dart are not yet supported, but the Teo team has set a goal for 2024, and I believe it should be supported soon.

2. Structure your data

Teo has an innovative and easy-to-read schema language inspired by GraphQL and Prisma. Database configuration, server configuration, models and enumerations, and routing handlers are all declared in it. What you write is what you think, what you see is what you get, which is really great.

Teo adopts the pattern you described in detail and performs database migration, input validation, and transformation for you.

3. ORM entity and server code

Automatically generated routing handlers can meet 80% of business needs. There are always some custom requirements that require developers to write code to handle. Teo is a mature web framework, not a no-code or low-code tool. Let Teo do the heavy lifting and generate ORM entities. Use Teo’s programming API to write code in any server language supported by Teo.

4. Generate Client for Front-end

Issues with traditional front-end development:

  • Developers repeatedly write interface request and parameter processing code in multiple front-end projects, which is inefficient and error-prone.

Teo framework solution:

  • Teo automatically generates type-safe front-end code, reducing repetitive work and improving development efficiency.
  • Supports multiple programming languages to adapt to different development needs.
  • Integrate into existing projects or create new packages to provide flexibility.

Interested partners can go and experience it now!

Reference materials:

Rust and Go in 2024

Rust and Go in 2024

Which is better, Rust or Go? Which language should you choose for your next project and why? How do they compare in terms of performance, simplicity, security, features, scalability, and concurrency? What do they have in common and what are their fundamental differences? Let’s find the answer through a friendly and fair comparison of Rust and Go.

# 1. Rust and Go are both great

Firstly, it is very important to note that Go and Rust are both absolutely excellent programming languages. They are modern, powerful, widely adopted, and provide excellent performance.

Rust is a low-level statically typed multi-paradigm programming language that focuses on safety and performance - Gints Dreimanis [2]

However:

Go is an open-source programming language that makes it easy to build simple, reliable, and efficient software golang.org [3]

In this article, I will try to briefly outline which scenarios I think Go is the ideal choice and which scenarios Rust may be a better choice.

# 2. Similarities

What is the common goal of the two languages?

# 2.1 Memory safety

Historically, one of the biggest causes of software errors and security bugs is unsafe or incorrect access to memory.

Rust and Go handle this problem in different ways, but both aim to be smarter and safer in managing memory than other languages.

# 2.2 Fast and compact executable files

They are all compile languages, which means your program will be directly compiled into executable machine code so that you can deploy the program as a single binary file. Compared with interpreted languages such as Python or Ruby, this also makes Rust and Go programs have extremely fast execution speed.

# 2.3 Common language

Rust and Go are both powerful and extensible general-purpose programming languages that you can use to develop various modern software. Both have excellent standard libraries and thriving third-party ecosystems, as well as strong commercial support and a large user base.

# 2.4 Pragmatic programming style

Although Go and Rust both have functional features related to functional and Object Oriented Programming (OOP), they are both pragmatic languages designed to solve problems in the most appropriate way.

# 2.5 Suitable for large-scale development

Rust and Go both have some useful features that make them suitable for large-scale programming, whether it is for large teams, large codebases, or both.

For example, both Rust and Go use standard code formatting tools (Go’s gofmt, Rust’s rustfmt), which puts an end to useless arguments about the placement of parentheses.

Both also have excellent built-in high-performance standard build and dependency management tools; no more struggling with complex third-party build systems or learning a new one every few years.

# 3. Differences

Although Rust and Go share many similarities, in some areas, rational people may prefer one language over the other to meet specific project needs.

# 3.1 Performance

Go and Rust are both very fast. However, Go’s design is more conducive to fast compilation, while Rust is optimized for fast execution.

Rust’s runtime performance is also more consistent because it does not use garbage collection mechanism. On the other hand, Go’s garbage collector reduces some of the burden on programmers, making it easier to focus on solving the main problems rather than memory management details.

For areas where execution speed outweighs all other considerations (such as game programming, operating system kernels, web browser components, and real-time control systems), Rust is a better choice.

# 3.2 Simple

From a design perspective, Go is a small language with very few syntax, keywords, and language structures. You can quickly learn the basics of Go and use the language to improve work efficiency.

This gives Go an advantage in projects with short time spans or teams that need to quickly introduce a large number of new programmers, especially when they are relatively inexperienced.

# 3.3 Functional features

On the other hand, Rust has almost all the features of programming languages you can imagine, as well as some features that you may not be able to imagine. This makes it a powerful and expressive language that can accomplish the same thing in multiple different ways.

If you’re transitioning to Rust from another language, you can probably find Rust equivalents for most of the features you’re used to. This gives Rust an advantage when large projects need to migrate from legacy languages like C++ or Java.

# 3.4 Concurrency

Unlike most languages, Go is designed with built-in support for concurrent programming, such as goroutines (a lightweight version of threads) and channels (a safe and efficient way to communicate data between concurrent tasks).

These make Go the perfect choice for large-scale concurrent applications such as network servers and microservices.

# 3.5 Security

Rust is carefully designed to ensure that programmers cannot do unsafe things they do not want to do, such as overwriting shared variables. The compiler requires you to specify the way data is shared between different parts of the program and can detect many common errors and bugs.

Therefore, the so-called “battle with borrow checkers” is a common complaint among new Rust programmers. Implementing programs with safe Rust code often means fundamentally rethinking their design, which can be frustrating, but when reliability is your top priority, the benefits of doing so are worth it.

# 3.6 Scale

Go aims to make it easy for you to expand projects and development teams. Its minimalist design brings a certain consistency, and the existence of a clearly defined standard style means that any Go programmer can read and understand new code libraries relatively quickly.

When it comes to large-scale software development, clarity is better than intelligence. For large organizations, especially many distributed teams, Go is a good choice. Its fast build time is also conducive to rapid testing and deployment.

# Step 4 Trade-offs

The design teams of Rust and Go made some very different choices, so let’s take a look at some areas where these trade-offs make these two languages very different from each other.

# 4.1 Garbage collection

Generally speaking, languages with garbage collection and automatic memory management functions (such as Go) can quickly and easily develop reliable and efficient programs, which is the most important for some people.

However, garbage collection, due to its performance overhead and stop-the-world pauses, can make program behavior unpredictable at runtime, and some people find this inconsistency unacceptable.

Programmers must clarify that the language responsible for allocating and releasing each byte of memory (such as Rust) is more suitable for real-time or ultra-high-performance applications.

# 4.2 Abstract

The history of computer programming is an increasingly complex and abstract story that allows programmers to solve problems without worrying too much about how the underlying machines actually work.

This makes the program easier to write and possibly more portable. However, for many programs, accessing hardware and precisely controlling the execution of the program is more important.

Rust’s goal is to make programmers “closer to metal” and have more control, while Go abstracts architectural details and brings programmers closer to problems.

# 4.3 Speed

Rust has made many design trade-offs to achieve the best execution speed. In contrast, Go cares more about simplicity and is willing to sacrifice some (runtime) performance for it.

At this point, whether you prefer Rust or Go depends on whether you are willing to spend more time waiting for the program to build or wait for the program to run.

# 4.4 Correctness

Go and Rust both aim to help you write correct programs, but in different ways: for example, Go provides an excellent built-in unit test framework and a rich standard library, while Rust focuses on eliminating runtime errors using its borrow checker mechanism.

To be fair, it is easier to write a given program in Go, but the result may contain errors more easily than the Rust version. Rust imposes disciplinary constraints on programmers, but Go lets programmers choose the level of discipline they want to apply to specific projects.

# 5. Conclusion

I hope this article can make you believe that both Rust and Go are worth considering seriously. You should reject the dilemma of this mistake: you can only learn one of them. In fact, the more languages you know, the higher your value as a software developer.

Every new language you learn will give you a new way of thinking, which can only be a good thing. The most important factor for the quality and success of any software project is not the choice of language, but the skills of the programmer.

When using the language that suits you best, you become most proficient and can enjoy the most programming pleasure. Therefore, if the question is “Should I learn Rust or Go?”, the only correct answer is “Yes”.

References

[1] 《Rust vs Go in 2024》: https://bitfieldconsulting.com/golang/rust-vs-go

[2] Gints Dreimanis: https://serokell.io/blog/rust-guide

[3] golang.org: https://go.dev/