Announcing the HTTP certification library for Rust

are there plans to bring this feature to other languages as well

There was BNT-13 for the community to bring some support for Motoko but I’m unsure of the current status.

For TypeScript/Azle, ideally, Azle would add support for using WASM modules so that we can use wasm-bindgen to generate a TypeScript version without needing to write it again from scratch.

In the longer term, supporting the WASM component model would make it much easier for libraries to be shared with other languages and I’m cautious about spending time writing libraries in other languages with the hope that we’ll have the component model sooner than later.

how much effort do you expect this to be?

The hardest thing about writing the library was trying to get the right interface design. There’s a lot of complexity that this library is trying to hide. I made multiple attempts before settling on the current design and I’m still not sure if I did it right yet :sweat_smile:

So if someone was to transpose the library into a new language and follow the same patterns then I think it would take significantly less time, but there’s still a lot to learn in terms of understanding what’s going on under the hood. I suspect that someone already familiar with the protocol could probably transpose the library in several weeks.

Regarding serving frontend and backend from a single canister: I might be missing something here, but isn’t that already possible today (modulo the certification)?

You’re right, the difference with the library is the certification. I’ll update the original post to say: “Serve certified assets from the same canister as their primary “backend” canister”.

Having said that, serving uncertified assets (or any uncertified query response from the IC for that matter) is extremely dangerous. It would allow a malicious replica to respond with anything it likes and expose a virtually unlimited number of attack vectors, depending on the canister being targeted. Disregarding certification reduces the security of your static asset serving down to the same level as a single replica subnet.