As a proof of concept and an application of this WebAssembly port, I create 
a cordova/electron offline wrapper of SageMath-in-Browser for Windows x64.

You can download it from google drive: 
SageMath-Cordova-Wrapper-0.1.0-win-x64.zip 
<https://drive.google.com/file/d/1D1DNChwGY8yMyYJ7Nxe3w_59s5Jx7TSP/view?usp=sharing>
 or 
download the split zipped files from github release 
<https://github.com/wangyenshu/sagemath-cordova-wrapper/releases>. 

This should be the easiest way to install sagemath on windows: just unzip 
it and you can launch sagemath by executing "SageMath-Cordova-Wrapper.exe". 
No WSL, no 
Administrator privileges needed and completely portable. However, similar 
to SageMath-in-Browser, its performance is worse than a native installation.

Souce:
https://github.com/wangyenshu/sagemath-cordova-wrapper

On Sunday, February 15, 2026 at 9:22:32 AM UTC+8 Yanshu Wang wrote:

> > Alternatively, one could try to see if 
> https://github.com/container2wasm/container2wasm works to get a 
> 64bit-based version.
>
> Unfortunately, container2wasm will not work for image with size greater 
> than 2GB (like SageMath). See this discussion (
> https://github.com/container2wasm/container2wasm/issues/230). Also 64-bit 
> wasm can be even slower than 32-bit.
>
> > By the way, WebAssembly-built sympy, https://www.sympy.org/en/shell.html, 
> seems to be considerably faster.
>
> I think this is because WebAssembly-built sympy uses pyodide, which is 
> compiled to wasm directly, so it runs almost natively in your CPU. However, 
> SageMath-in-Browser runs code in the CPU emulated by v86. I think in order 
> to achieve the same performance as WebAssembly-built sympy, SageMath must 
> be compiled directly to wasm using tools like emscripten 
> <https://emscripten.org/index.html>. But that is far more challenging 
> than the current SageMath-in-Browser approach.
> On Sunday, February 15, 2026 at 2:12:16 AM UTC+8 [email protected] wrote:
>
>> Alternatively, one could try to see if 
>> https://github.com/container2wasm/container2wasm works to get a 
>> 64bit-based version.
>>
>> On Saturday, February 14, 2026 at 7:09:54 PM UTC+1 [email protected] wrote:
>>
>>> This is cool! Thanks for your work.
>>>
>>> Just as shot in the dark: perhaps the 32-bit version of archlinux allows 
>>> to install all up-to-date sage dependencies. If that's the case, you could 
>>> just build sage using `pip install .`, which is then non-editable.
>>>
>>> @others: what do you think about adding this to the website as "Try 
>>> SageMath", so that potential users can see if they like sage enough to 
>>> install it on their PC?
>>>
>>> On Saturday, February 14, 2026 at 3:28:10 PM UTC+1 parisse wrote:
>>>
>>>> Thanks for the confirmation.  
>>>> It’s a fascinating technical milestone, but if we are looking to 
>>>> resources conservation,  this is clearly not the right direction...
>>>>
>>>> On Saturday, February 14, 2026 at 1:36:39 PM UTC+1 [email protected] 
>>>> wrote:
>>>>
>>>>> SageMath-in-Browser is about 2 orders of magnitude slower than native 
>>>>> sage code.
>>>>> I ran the following bench mark:
>>>>> 'from sage.misc.benchmark import *'
>>>>> '_ = benchmark()'
>>>>>
>>>>> Output of SageMath-in-Browser:
>>>>> [image: benchmark.png]
>>>>> Output of native sage:
>>>>> [image: bench_native.png]
>>>>> On Saturday, February 14, 2026 at 4:55:39 PM UTC+8 Georgi Guninski 
>>>>> wrote:
>>>>>
>>>>>> > I don't know the expected performance penalty. 
>>>>>>
>>>>>> To measure the time, create `file.sage` with fast code. 
>>>>>> In bash run: time sage file.sage # for native sage 
>>>>>> and: time emulated_sage file.sage #for JS sage 
>>>>>>
>>>>>> To benchmark inside sage, one possibility is: 
>>>>>> sage: timeit("code") 
>>>>>>
>>>>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/cbcb4840-2521-4b86-af3a-8df3eab38adfn%40googlegroups.com.

Reply via email to