Skip to content

Comments

Simplify web setup related to libolm#2487

Open
zatteo wants to merge 1 commit intomainfrom
zatteo-patch-1
Open

Simplify web setup related to libolm#2487
zatteo wants to merge 1 commit intomainfrom
zatteo-patch-1

Conversation

@zatteo
Copy link
Member

@zatteo zatteo commented Jul 31, 2025

During a setup of Twake Chat for web, I ran into the section about libolm.

It seems to be working when downloading olm.js and olm.wasm from here https://gitlab.matrix.org/matrix-org/olm/-/packages/2190 instead of building it with Docker.

Why do you think ? It seems a lot simpler for me to setup, but I lack the necessary background and maybe it will not work everywhere/everytime ?

@github-actions
Copy link
Contributor

This PR has been deployed to https://linagora.github.io/twake-on-matrix/2487

During a setup of Twake Chat for web, I ran into the section about libolm.

It seems to be working when downloading olm.js from here https://gitlab.matrix.org/matrix-org/olm/-/packages/2190 instead of building it with Docker.

Why do you think ? It seems a lot simpler for me to setup, but I lack the necessary background and maybe it will not work everywhere/everytime ?
If you only plan to work on the `web` target we recommend installing Google Chrome as it is the default supported target *(Flutter being developped by Google)*.

It is also **required** to have a web ready version of libolm available in the `assets/js/package` folder. You can build a version using:
It is also **required** to have a web ready version of libolm available in the `assets/js/package` folder. You can download it [here](https://gitlab.matrix.org/matrix-org/olm/-/packages/2190) and copy olm.js and olm.wasm in `assets/js/package`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, we should keep both guideline for user.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it so we have both. But is there any good reason to the Docker way? Even if I have no background to this library, I do not see the purpose of building it locally if its a web library?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why close @hoangdat ? Keeping both can be a safe solution, but it was easier and it worked on my local setup by just downloading it from the link. I can create a new PR with both solution.

@Crash--
Copy link
Contributor

Crash-- commented Dec 3, 2025

I tried to follow the Readme but I didn't manage to get the docker running.

I run docker run -v ./assets/js/package:/package nixos/nix:2.22.1 and it's ok, but then the readme say:

# within the docker
...

But I can't go within the docker. Whenever I try to launch the docker, it exited in 2 secondes, without any notice.

This closed PR saves my life.

@Crash--
Copy link
Contributor

Crash-- commented Dec 3, 2025

I also have to:

# change flutter version because the one described in the readme is not the same used in gh actions

# install rustup 
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# add to my path
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

# install yq 
brew install yq

And then I had to run :

./scripts/prepare-web.sh

And then, I was able to run the web app.

@hoangdat
Copy link
Member

okie, will look on it next week, because we did not use libolm anymore

@Crash--
Copy link
Contributor

Crash-- commented Dec 12, 2025

Yeah I think it's safe to remove this part about lobolm but we absolutely need to add the step to install rust toolchain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants