Imagine a calendar app that doesn't need a server to run. Sounds like science fiction, right? But years ago, a developer decided to build just that, using a programming language not usually known for web apps. It was a project born out of curiosity and a desire to try something new.
This is the story of Zerocal, a project that gained attention for its clever approach. It showed how powerful and flexible modern programming tools can be, even for something as common as a calendar. It's a reminder that sometimes, the most interesting ideas come from unexpected places.
Building Something Different
The developer behind Zerocal, known online as Endler, wanted to create a calendar. But not just any calendar. They wanted it to be serverless. This means it wouldn't rely on a constantly running server to store data or handle requests.
This was a big challenge. Most web applications need a server. Think about email, social media, or even online shopping. They all use servers to work. Building an app without one meant finding a completely different way to store and access information.
Why Rust for a Web App?
The choice of programming language was also unusual. Endler decided to use Rust. Rust is known for being fast and safe, making it great for system programming, like operating systems or game engines. It's not typically the first language people think of for building a web application.
But Rust has a lot of potential. Its focus on memory safety without a garbage collector makes it very efficient. This efficiency could be a big advantage for a serverless app, where every bit of performance counts. It was a bold choice that raised some eyebrows.
The Serverless Challenge
How do you make a calendar app work without a server? The main problem is storing the calendar data. Usually, this data sits on a server. When you add an event, it gets saved there. When you view your calendar, the app fetches the data from the server.
Zerocal's solution was to store the data directly on your device. This is possible using modern browser technologies. Instead of a remote server, the app uses your own computer or phone to keep track of your events. This makes the app much more private and potentially faster.
How Zerocal Works
Zerocal uses a few key technologies to achieve its goal. The calendar data is stored using IndexedDB. This is a built-in browser database. It allows web applications to store significant amounts of data locally.
The application itself is compiled into WebAssembly (Wasm). WebAssembly is a way to run code written in languages like Rust directly in the web browser at near-native speeds. This is what allows the Rust code to power the web application.
"The idea was to create a calendar that was fast, private, and didn't require any backend infrastructure."
This combination of local storage and WebAssembly was quite innovative for its time. It meant the entire application could run entirely in your browser. There was no need for a company's servers to be involved.