Inlägg taggade ”rust”
Skriverier då och då, på webben sedan 1994.
Posted 2023-02-05 23:25. Tagged rust, web, project.
I wrote a little command-line interface for sending a http request and
getting the response.
I call the package url-cli, and the command itself is url
.
It has sub-commands for the different http methods.
If you have a rust toolchain installed, you can get it by cargo install.
I haven’t made any binary packages yet.
:; cargo install url-cli
[... building, installing ...]
:; url get https://rasmus.krats.se/2023/url-cli.en
<!doctype html>
[... and all the rest of the html for this web page ...]
Read whole Command line interface url
with 2 comments.
Posted 2023-01-17 21:06. Tagged rust, rsass, sass, project, css.
Again, after almost four months since the last
release, it is time to announce rsass 0.27.0.
There is a bunch of breaking changes and a bunch of improvements.
This time, one change may seem drastic: The rsass
crate no longer
contains the command-line program rsass.
Instead, that is now provided by a separate rsass-cli
crate.
So you no longer have to enable a “commandline” feature, instead you can
install the command line interface with:
:; cargo install rsass-cli
There is also a new rsass-macros crate.
Read on into the Macros section for that.
Read whole Rsass 0.27.0 released
.
Posted 2022-09-18 20:04. Tagged rust, rsass, sass, project, css.
More than three months after the last release, is is now the time to
announce rsass 0.26.0.
There is a bunch of breaking changes and a bunch of improvements.
The changelog has
the whole (too long) list.
But this time, some of the changes may go a bit deeper.
As usual, the breaking changes is breaking mainly to users who in some way
modify the global context from rust code, maybe by providing their own
builtin functions or maybe just by inserting a global variable.
Also this time, there is an improved way of calling ructe from a cargo
build.rs
program, see the Cargo section below.
Read whole Rsass 0.26.0 released
.
Posted 2022-04-03 18:04. Tagged r4s, web, meta, kakor, gdpr, rust.
Sometimes I want to embed a video on my site.
Most of the videos I want to embed are on youtube.
Klicking “share” on a video and choosing embed, I get a bunch of html
code I can copy into a post.
Something like this, for example:
<iframe width="560" height="315" src="https://www.youtube.com/embed/3St1CoH1rKU"
title="YouTube video player" frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
allowfullscreen>
</iframe>
Read whole Tracker-free youtube embedding
.
Publicerad 2022-03-01 22:56. Taggat rust, KTH.
I går fick jag hålla en gästföreläsning om programspråket Rust på
kursen programmeringsparadigm på
KTH.
Jag är inte en van föreläsare (och helt klart inte
på-minuten-deltagare), så det är ganska mycket tvekan och stakningar i
början, men jag lämnar i alla fall inte rummet förrän efter
föreläsningen, och så småningom kommer jag igång lite.
Läs hela Gästföreläsning om Rust
.
Publicerad 2022-01-16 22:07. Taggat r4s, css, meta, rust, web.
Jag har skrivit ny blogmjukvara igen!
Den förra hette r5, som i Rasmus (utan 5
bokstäver). Den nya är skriven i Rust (källkodsfilerna heter .rs
),
så det kändes naturligt att kalla den r4s,
också som i Rasmus (men utan 4 bokstäver 😎).
Nu får vi se om ett nytt kul blogprogram får mig att skriva fler blogposter.
Läs hela Ny blogmjukvara
med 1 kommentarer.
Posted 2020-09-09 20:48. Tagged rust, web, development.
When doing a web application server, one of the first things to decide
is which “web application framework” or “request handler library” to
use.
In Rust, there are more alternatives for that question than in most
programming languages, and anyone who has ported some code from tomcat
jsp to play framework or from flask to django may dread making the
wrong choice.
On the other hand, Rust being very strict on static typing makes it
very easy to do major refactorings, and I have switched existing
projects from iron to nickel to gotham to warp myself without too big
problems.
Read whole Web frameworks in Rust
.
Posted 2019-07-26 19:12. Tagged rust, fractal, wasm, demo, javascript.
I like to write programs to render fractals, and especially Julia set
fractals.
I also like the Rust programming language.
Among other advantages it happens to be great for compiling to wasm,
the new format for executing code in a web browser.
And I like to code stuff for the webb.
So how come I haven’t written a wasm Julia renderer in Rust yet?
Well, now I have.
Read whole Julia fractals in Rust wasm
with 2 comments.
Posted 2019-01-26 16:25. Tagged rust, web, rust2019, development.
There is A Call for Community Blog
posts
over at the
Rust Programming Language Blog.
This is my entry, briefly describing my hopes and expectations for
Rust, it’s eco-system and my own participation in 2019.
Read whole Rust and me in 2019
.
Publicerad 2018-02-11 21:10. Taggat cykel, bild, foto, trafik, Stockholm, rust, web, propagandacykling.
Jag har inte lagt upp någon propagandacykling här på bloggen på ganska
länge.
Naturligtvis cyklar jag fortfarande till jobbet de flesta av de dagar
jag inte jobbar hemifrån, och jag brukar ta en bild och
lägga ut på twitter.
Men jag har ett projekt för att organisera mitt
bildarkiv på gång också.
Det har kommit så långt att det är smidigare att lägga upp mina
bilder där än här.
Så vill du se mina samlade cykelbilder så finns de
där!
Men jag får väl inkludera tre ganska färska bilder här också.
Bli först att kommentera.
Posted 2018-01-07 22:50. Tagged rust, web, Rust2018, development.
There is A Call for Community Blogposts
over at the
Rust Programming Language Blog.
This is my entry.
I mainly do “server-based” web service development.
The server sends html, css, images, and javascript to the browser.
The javascript implements progressive enhancement for the content,
but the site should be usable and as nice as possible even with
javascript disabled.
So while I certainly do RESTful json API:s, I also do
server-side html templateing, css (and scss) minification, etc.
I think Rust has great potential here, partly because of optimization and
execution speed, but mainly because the type safety and fearless concurrency
make it easy to actually get things right and avoid unpleasant surprises at
runtime.
Read whole Rust and the web in 2018
.
Posted 2016-10-07 18:32. Tagged rust, project, web, development.
When developing web applications, it is often useful to have a
template system.
Something that lets you write generic versions of web pages, that the
application can fill with the specific content for each page it should
show.
There exists lots of “languages” to write such templates, such as
mustache,
jinja2, and
play 2 scala templates (twirl).
Most fits very well with a dynamic language, where you can get
properties from an object, or even call a method, by its name in a
plain string.
In a statically compiled language, the actual names of fields and
methods are not relevant, and generally not present, after
compilation.
This makes a “dynamic” template language a hard match for a compiling
language such as rust.
So why not try to create a better match?
Read whole A compiling template system in Rust
with 3 comments.