Open source · Rust · MIT / Apache-2.0Open source · Rust · MIT / Apache-2.0
Un navegador web desde cero. Especificación a especificación.A web browser built from scratch. Spec by spec.
Un navegador web independiente, escrito desde cero en Rust. Sin copiar Chrome, Firefox ni Safari: su propio motor avanza paso a paso y comprueba cada logro contra los estándares oficiales de la web.An independent web browser, written from scratch in Rust. No copying Chrome, Firefox or Safari: its own engine moves forward step by step and checks every milestone against the web's official standards.
Pre-alpha: sin releases publicadas ni binarios oficiales; se compila desde el código fuente.Pre-alpha: no published releases or official binaries; build it from source.
TestsTests
1046
MódulosModules
14
Parser HTML5HTML5 parser
100 %
UnsafeUnsafe
0
Proyecto pre-alpha: aún no hay releases ni instalador. Datos de la última ronda, verificados en el repositorio.A pre-alpha project: no releases or installer yet. Figures from the latest round, verified in the repository.
Una página real, convertida en imagen por Megi. Sin capturas de otros navegadores y sin retoques.A real page, turned into an image by Megi. No other browser involved, no retouching.
HTML → PNGHTML → PNGsin otro navegador detrásno other browser insideresultado deterministadeterministic output
Construido sobreBuilt on
WHATWG HTML
W3C CSS
Web Platform Tests
html5lib-tests
Rust
Boa
El proyectoThe project
Un navegador hecho a manoA browser built by hand
Megi construye su propio motor web desde cero: descarga las páginas, lee el HTML y el CSS, coloca cada caja y dibuja el resultado. El objetivo es un navegador independiente, abierto y verificable, sin atajos.Megi builds its own web engine from the ground up: it downloads pages, parses HTML and CSS, lays out every box and draws the result. The goal is an independent, open and verifiable browser, with no shortcuts.
Independiente de verdadTruly independent
No es una copia de Chrome, Firefox ni Safari. El motor se escribe desde cero en Rust, sin reutilizar el código de otro navegador.It is not a copy of Chrome, Firefox or Safari. The engine is written from scratch in Rust, without reusing another browser's code.
Fiel a los estándaresTrue to the standards
Cada comportamiento sigue las especificaciones oficiales de la web y se comprueba con sus pruebas públicas. El parser HTML5 ya pasa el 100 % de las pruebas de referencia.Every behaviour follows the web's official specifications and is checked with their public tests. The HTML5 parser already passes 100% of the reference tests.
Pensado para durarBuilt to last
Rust aporta seguridad de memoria sin recolector de basura. El proyecto prohíbe el código unsafe y somete el motor a pruebas automáticas de robustez frente a entradas hostiles.Rust brings memory safety without a garbage collector. The project forbids unsafe code and continuously stress-tests the engine against hostile input.
Abierto para sumarOpen to everyone
Licencia MIT/Apache, hoja de ruta pública y tareas de uno o dos días. Hay sitio para código, pruebas, documentación y diseño.MIT/Apache licence, a public roadmap and one-to-two-day tasks. There is room for code, tests, documentation and design.
De un enlace a una imagen, sin atajosFrom a link to an image, no shortcuts
Megi recorre el camino completo de la web: descarga, lee, maqueta y dibuja. No delega en otro navegador para fingir que sabe hacerlo.Megi walks the entire web path: fetch, parse, lay out and paint. It does not delegate to another browser to pretend it knows how.
01EnlaceLinkdirección webweb address
→
02DescargaFetchHTTP · TLS
→
03HTML · CSSlectura y estilosparse and styles
→
04MaquetaciónLayoutcajas y textoboxes and text
→
05ImagenImagePNG
La ventana del navegador usa exactamente este mismo camino. La imagen que ves en la galería es lo que produce.The browser window uses this exact same path. The image you see in the gallery is what it produces.
Estado actualCurrent status
Dónde estamos, sin adornosWhere we are, plainly
Megi está en pre-alpha: ya convierte páginas reales en imágenes y ejecuta su JavaScript, pero todavía no es un navegador para el día a día. Esto es lo que hay hoy, sin promesas de calendario.Megi is in pre-alpha: it already turns real pages into images and runs their JavaScript, but it is not an everyday browser yet. This is what exists today, with no calendar promises.
Sin releases todavía: no hay instalador ni binarios oficiales; el motor se compila desde el código fuente. La ventana nativa ya compila y el modo sin pantalla está probado, pero aún no se ha verificado visualmente en un escritorio real.No releases yet: there is no installer or official binary; the engine is built from source. The native window compiles and headless mode is tested, but it has not been visually verified on a real desktop yet.
0código unsafe0 bloques unsafe en todo el motorunsafe code0 unsafe blocks across the engine
Además en verde: tokenizador 7.050/7.050, serializador 230/230 y sintaxis CSS 30/30. Todos los datos son de la última ronda y se pueden reproducir desde el repositorio.Also green: tokenizer 7,050/7,050, serializer 230/230 and CSS syntax 30/30. All figures are from the latest round and reproducible from the repository.
Por fasesBy phase
Fundamentos y parser HTML5Foundations and HTML5 parserListoDone · 100 %
CSS, maquetado y pintadoCSS, layout and paintingListoDone · 100 %
Red y descargasNetwork and fetchingEn marchaIn progress · ≈95 %
JavaScriptJavaScriptEn marchaIn progress · ≈90 %
Ventana de escritorioDesktop windowEn marchaIn progress · ≈70 %
Lo que falta está claro y ordenado. Si quieres ver el detalle —o ayudar con una pieza—, la hoja de ruta es pública: ver la hoja de rutaWhat is missing is clearly listed. If you want the details —or want to help with one piece— the roadmap is public: see the roadmap
Prueba visualVisual proof
Así se ve el motorThis is what the engine renders
Todas las imágenes de esta página las ha generado Megi, de principio a fin. Sin capturas de otros navegadores y sin retoques: son la prueba de lo que el motor ya sabe hacer.Every image on this page was produced by Megi end to end. No other browser screenshots and no retouching: they are the proof of what the engine can already do.
showcase · 1024×768Una página real con estilos, imágenes y tablas, renderizada por Megi.A real page with styles, images and tables, rendered by Megi.render · 640×400El mismo motor que abre la ventana, aplicando estilos externos.The same engine that opens the window, applying external styles.images · 800×600Imágenes cargadas, decodificadas y escaladas por el propio motor.Images fetched, decoded and scaled by the engine itself.typography · 800×600Tipografía real, bordes y capas con transparencia.Real typography, borders and transparent layers.
Sin trucos: cada imagen es el resultado exacto del motor y se comprueba contra un resultado de referencia. Si un cambio altera un píxel, un test lo detecta.No tricks: every image is the engine's exact output and is checked against a reference. If a change alters one pixel, a test catches it.
Hoja de rutaRoadmap
Qué viene despuésWhat comes next
Sin fechas prometidas. Esto es lo que ya funciona, lo que está en el taller y lo que viene; la hoja de ruta completa está en el repositorio, con tareas de uno o dos días para quien quiera ayudar.No promised dates. Here is what already works, what is in the workshop and what comes next; the full roadmap lives in the repository, with one-to-two-day tasks for anyone who wants to help.
Ya funcionaAlready works
El motor hace su trabajoThe engine does its job
Convierte HTML, CSS y JavaScript reales en imágenes PNG.Turns real HTML, CSS and JavaScript into PNG images.
Abre páginas locales en una ventana con scroll, enlaces e historial.Opens local pages in a window with scroll, links and history.
Carga hojas de estilo, imágenes y fuentes desde la red.Fetches stylesheets, images and fonts from the network.
Todo verificado con 1046 tests y las suites oficiales.All of it verified with 1046 tests and the official suites.
En marchaIn progress
El taller abiertoThe open workshop
Red más completa: HTTP/2, streaming y cookies modernas.A more complete network: HTTP/2, streaming and modern cookies.
JavaScript más cercano al de la web: módulos, memoria y ciclo de eventos en la ventana.JavaScript closer to the real web: modules, memory and a live event loop in the window.
Ventana con formularios, pestañas y zoom.A window with forms, tabs and zoom.
Lo siguienteUp next
De «renderiza» a «navega»From “renders” to “browses”
Verificar la ventana nativa en un escritorio de verdad.Verify the native window on a real desktop.
El CSS que aún falta: flex, grid, esquinas redondeadas, sombras…The CSS still missing: flex, grid, rounded corners, shadows…
Accesibilidad, rendimiento y más pruebas.Accessibility, performance and more tests.
Todavía no hay instalador: el motor se compila desde el código fuente. Si sabes usar una terminal, en un par de minutos tienes tu primera imagen generada por Megi.There is no installer yet: the engine is built from source. If you can use a terminal, you will have your first Megi-made image in a couple of minutes.
Tu primera imagenYour first image
Necesitas Rust 1.88+ y Git. Clona el repositorio y renderiza la página de ejemplo:You need Rust 1.88+ and Git. Clone the repository and render the sample page:
bash
git clone https://github.com/juanpimg/Megi.git
cd Megi
cargo run -p render -- tests/fixtures/render/showcase/index.html \
/tmp/megi.png --width 1024 --height 768
Obtendrás un PNG de 1024×768: el mismo que ves en la galería. La primera compilación tarda un poco.You will get a 1024×768 PNG: the same one you see in the gallery. The first build takes a while.
¿Y la ventana? En Linux con X11/Wayland, tools/megi.sh abre cualquier página. El modo sin pantalla también genera imágenes, sin abrir ventana.And the window? On Linux with X11/Wayland, tools/megi.sh opens any page. Headless mode also produces images, without opening a window.
Sin instalador ni releases: hay que compilar.No installer or releases: you must build it.
ComunidadCommunity
Súmate al proyectoJoin the project
No hace falta ser experto en navegadores. Cada tarea viene con lo que hay que conseguir y cómo comprobarlo, y hay hueco para código, pruebas, documentación y diseño.You do not need to be a browser expert. Every task comes with what to achieve and how to check it, and there is room for code, tests, documentation and design.
1
Lee cómo trabajamosRead how we work
Cinco minutos en CONTRIBUTING.md y ya sabes la filosofía, el flujo y las reglas: especificación, pruebas y cero atajos.Five minutes with CONTRIBUTING.md and you know the philosophy, the flow and the rules: specifications, tests and no shortcuts.
2
Elige una tareaPick a task
La hoja de ruta tiene paquetes de uno o dos días, cada uno con su prueba. ¿Tienes otra idea? Abre un issue y lo hablamos.The roadmap has one-to-two-day packages, each with its test. Have another idea? Open an issue and let's talk.
3
Comprueba y abre el PRCheck and open the PR
Pasa la puerta de calidad completa y abre un pull request con Conventional Commits. La CI tiene que quedar en verde.Run the full quality gate and open a pull request with Conventional Commits. CI must stay green.
bash
./tools/dev.sh all
Dónde hace falta ayuda ahoraWhere help is needed now
Si es tu primera contribución, abre un issue contando lo que te gustaría hacer: te orientamos antes de que escribas código.If this is your first contribution, open an issue describing what you would like to do: we will point you in the right direction before you write code.
Preguntas frecuentesFAQ
Lo que la gente preguntaWhat people ask
¿Puedo usar Megi como mi navegador ya?Can I use Megi as my browser yet?
Todavía no. Es un proyecto en pre-alpha, sin releases ni instalador: ya convierte páginas reales en imágenes y abre páginas locales en una ventana, pero le faltan formularios, pestañas, zoom y partes de CSS. La ventana nativa aún no se ha verificado visualmente. Hoy sirve para ver cómo avanza un motor desde dentro y para contribuir.Not yet. It is a pre-alpha project with no releases or installer: it already turns real pages into images and opens local pages in a window, but forms, tabs, zoom and parts of CSS are still missing. The native window has not been visually verified yet. Today it is for watching an engine grow from the inside and for contributing.
¿Es un fork de Chrome, Firefox o Safari?Is it a fork of Chrome, Firefox or Safari?
No. El motor se escribe desde cero en Rust y no reutiliza el código de otro navegador. El núcleo usa solo la biblioteca estándar de Rust; JavaScript corre sobre Boa, un motor de lenguaje independiente. Las pocas dependencias externas están documentadas y aprobadas una a una.No. The engine is written from scratch in Rust and does not reuse another browser's code. The core uses only the Rust standard library; JavaScript runs on Boa, an independent language engine. The few external dependencies are documented and approved one by one.
¿Qué significa el «100 %» del parser?What does the parser's “100%” mean?
Que Megi pasa el corpus público de pruebas del parser HTML5 (3.904 de 3.904 casos), además del tokenizador (7.050/7.050), el serializador (230/230) y la sintaxis CSS (30/30). Es conformidad de parser y estilos, no de toda la web: cosas como flex, grid o formularios aún están en la lista.That Megi passes the public HTML5 parser test corpus (3,904 out of 3,904 cases), plus the tokenizer (7,050/7,050), the serializer (230/230) and CSS syntax (30/30). That is parser and style conformance, not the whole web: things like flex, grid or forms are still on the list.
¿Cómo lo pruebo?How do I try it?
Necesitas Rust 1.88+ y Git. Clona el repositorio y usa cargo run -p render para convertir una página en PNG, o tools/megi.sh para abrir la ventana en Linux. Los comandos exactos están en la sección «Pruébalo» y en el README.You need Rust 1.88+ and Git. Clone the repository and use cargo run -p render to turn a page into a PNG, or tools/megi.sh to open the window on Linux. The exact commands are in the “Try it” section and in the README.
¿Puedo ayudar si nunca he escrito un motor?Can I help if I have never written an engine?
Sí. Las tareas están pensadas para uno o dos días y explican qué hay que conseguir y cómo comprobarlo. Hay trabajo de código, pruebas, documentación, diseño, rendimiento y fuzzing. Lo más fácil es leer CONTRIBUTING.md, elegir una tarea y abrir un issue para coordinarnos.Yes. Tasks are designed for one or two days and explain what to achieve and how to check it. There is work in code, tests, documentation, design, performance and fuzzing. The easiest path is to read CONTRIBUTING.md, pick a task and open an issue to coordinate.
¿Qué licencia tiene y qué pasa con la seguridad?What licence does it use, and what about security?
Doble licencia MIT OR Apache-2.0, a tu elección; las contribuciones se aceptan con los mismos términos. Los problemas de seguridad se reportan en privado mediante un GitHub Security Advisory, nunca en un issue público. El proyecto es pre-1.0 y solo la rama main recibe correcciones.Dual-licensed MIT OR Apache-2.0, at your option; contributions are accepted under the same terms. Security issues must be reported privately through a GitHub Security Advisory, never in a public issue. The project is pre-1.0 and only main receives fixes.
El motor ya funcionaThe engine already works
Ayúdanos a navegarlaHelp us navigate it
Estrella el repositorio, abre un issue con tu idea o elige tu primera tarea. Cada prueba que pasa acerca a Megi a ser un navegador real, libre y escrito desde cero.Star the repository, open an issue with your idea or pick your first task. Every passing test brings Megi closer to being a real, free browser written from scratch.