Commit Graph

209 Commits

Author SHA1 Message Date
Patrick Quist
b99653804c Update SupportedEmulators.md 2025-05-24 19:29:25 +02:00
Patrick Quist
6fb3ab38e7 Add Game Boy emulator support using WasmBoy (#7717) 2025-05-24 18:43:41 +02:00
Matt Godbolt
74e5f237eb Update all the things (#7699)
All minor updates, commander was one major update but only to support
node 20 (which we're already past).

Tests pass, everything loaded up locally.
2025-05-19 06:51:21 -05:00
Matt Godbolt
1dab667564 Support hostnameForLogging too, more out of date refences 2025-05-12 12:59:57 -05:00
Matt Godbolt
54c942ba76 Replace nopt with commander.js for argument parsing (#7673)
- Replace nopt with commander.js for better command-line argument parsing
- Add automatic help generation with detailed descriptions
- Maintain backward compatibility with existing arguments
- Remove unused nopt dependency from package.json

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-12 12:49:28 -05:00
Matt Godbolt
fac3bf59c1 Documentation improvements (#7672)
This PR includes various documentation improvements:

- Fix grammar in README.md introduction
- Update Node.js version references to consistently indicate 'Node.js 20
or higher'
- Enhance macOS installation and setup guide with detailed instructions
- Fix broken link in API.md
- Fix formatting inconsistencies in WhatIsCompilerExplorer.md

🤖 Generated with [Claude Code](https://claude.ai/code)

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-05-11 16:46:05 -05:00
partouf
2597939d56 short osx readme 2025-05-08 17:23:48 +02:00
Matt Godbolt
54e2dae21f Add comprehensive Configuration.md documentation (#7626)
This PR adds a detailed Configuration.md document that comprehensively
explains the Compiler Explorer configuration system. It covers:

- Configuration file structure and hierarchical loading
- Property types and automatic conversions
- List separators and specialized formats
- Group inheritance and compiler configuration
- Variable substitution mechanisms
- Advanced features like remote compilers and property debugging

Additionally, it updates all related documentation to reference this
central document for configuration details, reducing duplication and
ensuring consistency.

This document will serve as the foundation for future configuration
system improvements by providing clear documentation of the current
implementation.
2025-04-26 18:12:58 -05:00
Matt Godbolt
993b8ec7a7 Cleanup post bootstrap 5 (#7608)
Remove some unnecessary functions and clarify docs.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-24 18:41:55 -05:00
Matt Godbolt
e6de1495df Fix the embedded iframe buttons. Note to future selves: try and avoid… (#7606)
… styles as code indicators ... mea culpa
2025-04-24 15:06:45 -05:00
Matt Godbolt
82eff66c49 Handle items that don't exist in embedded mode; fix iframe generation (#7605)
Checked locally. Have no idea how the heck the quotes got changed....
2025-04-24 14:09:02 -05:00
Matt Godbolt
9e5fd3d377 Update Bootstrap5Migration.md with completed tasks and issue references
- Mark documentation update tasks as complete
- Add a comprehensive documentation section for custom component implementations
- Document key changes between Bootstrap 4 and 5 for each component type
- Add sections on event handling, CSS class changes, and special integration notes
- Track remaining tasks with GitHub issues (#7602, #7603, #7604)
- Update references from "beta site" to "live site"

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-04-24 12:42:09 -05:00
Matt Godbolt
637564f389 Migrate to Bootstrap 5 (#7582)
This PR completes the migration from Bootstrap 4 to Bootstrap 5.3.5
following the plan outlined in
[docs/Bootstrap5Migration.md](https://github.com/compiler-explorer/compiler-explorer/blob/mg/bootstrap5/docs/Bootstrap5Migration.md).

## Migration Process

We followed a phased approach as documented in the migration plan:

1. **Phase 1: Dependency Updates and Basic Setup**
   - Updated Bootstrap from 4.6.2 to 5.3.5
   - Added @popperjs/core dependency (replacing Popper.js)
   - Updated Tom Select theme from bootstrap4 to bootstrap5

2. **Phase 2: Global CSS Class Migration**
   - Updated directional utility classes (ml/mr → ms/me)
- Updated floating utility classes (float-left/right → float-start/end)
   - Updated text alignment classes (text-left/right → text-start/end)

3. **Phase 3: HTML Attribute Updates**
- Updated data attributes to use Bootstrap 5 prefixes (data-bs-toggle,
data-bs-target, etc.)
   - Fixed tab navigation issues

4. **Phase 4: JavaScript API Compatibility Layer**
   - Created bootstrap-utils.ts compatibility layer
- Updated component initialization for modals, dropdowns, popovers, etc.

5. **Phase 5: Component Migration**
- Updated and tested specific components (modals, dropdowns, toasts,
etc.)
   - Fixed styling issues in cards and button groups

6. **Phase 6: Form System Updates**
   - Updated form control classes to Bootstrap 5 standards
   - Updated checkbox/radio markup patterns
   - Simplified input groups

7. **Phase 7: Navbar Structure Updates**
   - Updated navbar structure with container-fluid
   - Fixed responsive behavior

8. **Phase 8: SCSS Variables and Theming**
   - Added custom CSS fixes for navbar alignment
   - Verified theme compatibility

9. **Phase 9: Accessibility Improvements**
   - Updated sr-only to visually-hidden
   - Added proper ARIA attributes
   - Enhanced screen reader support

## Key Changes

- No more jQuery dependency in Bootstrap 5
- New prefix for data attributes (data-bs-*)
- Improved accessibility with ARIA attributes
- Updated positioning classes (start/end instead of left/right)
- Simplified input group structure

## Test Plan

1. **Navigation Testing**
   - Verify all dropdown menus open and close properly
   - Test mobile menu responsiveness
   - Check tab navigation in settings dialog

2. **Component Testing**
- Verify all modals open and close correctly (settings, share,
load/save)
   - Test tooltips and popovers
   - Check form controls in different dialogs

3. **Layout Testing**
   - Test responsiveness on different screen sizes
   - Verify proper alignment of elements
   - Check dark mode compatibility

4. **Specific Features to Test**
   - Compiler selection and options
   - Share dialog functionality
   - Settings dialog
   - Tree view (IDE mode)
   - Font selection dropdown

5. **Browser Testing**
   - Test in Chrome, Firefox, Safari
   - Test in mobile browsers

## Note on Further Improvements

After this migration is stable, we could consider Phase 12: removing
jQuery dependency entirely, as Bootstrap 5 no longer requires it. This
would be a separate effort.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-24 12:10:37 -05:00
Matt Godbolt
03fb43066a More library hacking notes (cc @partouf in case I made any obvious blunders) 2025-04-23 10:51:05 -05:00
Matt Godbolt
58fec88694 Add a little more clarity on how libraries work 2025-04-15 10:34:06 -05:00
Patrick Quist
26c6f8eb95 Update SupportedEmulators.md 2025-04-08 18:12:04 +02:00
Stephen Heumann
5a72fa0659 Add support for ORCA/C (#7368)
[ORCA/C](https://github.com/byteworksinc/ORCA-C) is a C compiler that
natively runs on and targets the Apple IIGS. ORCA/C and the programs it
generates can be run on modern Linux systems by using an emulation tool
called [Golden Gate](https://goldengate.gitlab.io).

This adds support for ORCA/C (run via Golden Gate) in Compiler Explorer.
It uses its own assembly format and objdumper (provided by Golden Gate),
so support for those is added. An extra configuration option was also
added to support execution via an emulator, bypassing the usual check
that executables can run natively. Asm docs for the WDC 65C816 processor
were also added.

ORCA/C and Golden Gate are not Free Software, but their rights holders
have given permission for them to be used on Compiler Explorer. Tarballs
for them can be supplied privately. See infra PR:
compiler-explorer/infra#1521

---------

Co-authored-by: Matt Godbolt <matt@godbolt.org>
2025-02-18 10:28:10 -06:00
Mats Jun Larsen
bcd6394435 Ensure that content type for formatting requests is JSON (#7327)
Ideally I'd add a middleware or something else that requires JSON, but I
suppose this is fine for now.

cc @dkm
2025-01-29 10:46:56 -06:00
Alex Sweet
a0bdab9f13 Set demanglerType=win32 in Windows sample props (#7270) 2025-01-15 06:35:28 +01:00
Ofek
a101e2d9f2 Fix MSVC's handling of /link options, fix and modernize some docs (#7260)
<!-- THIS COMMENT IS INVISIBLE IN THE FINAL PR, BUT FEEL FREE TO REMOVE
IT
Thanks for taking the time to improve CE. We really appreciate it.
Before opening the PR, please make sure that the tests & linter pass
their checks,
  by running `make check`.
In the best case scenario, you are also adding tests to back up your
changes,
  but don't sweat it if you don't. We can discuss them at a later date.
Feel free to append your name to the CONTRIBUTORS.md file
Thanks again, we really appreciate this!
-->
2025-01-11 18:16:04 +02:00
Mats Jun Larsen
d9093faf18 Replace ts-node with tsx (#7205)
Migrates tooling to TSX (as advised by nodejs) until we are on Node 22
where we can `--watch --experimental-strip-types`
2024-12-10 00:18:46 +09:00
Mats Jun Larsen
c256b922f7 Migrate site templates to yaml config (#7189)
Does some winter cleaning on the site-template stuff :)

1. Migrated away from the custom conf format to plain old yaml
2. Made the images and image files match with the name from the yaml
file. (It's not a problem to have spaces in file paths, nor urls so I
don't see why we shouldn't)
3. Updated the relevant documentation

There is a small breakage in the api response for the meta field. It now
returns `{"screenshot_dimensions":{"width":1000,"height":800}}` which I
believe is a lot more useful than
`{"meta.screenshot_dimensions":"1000x800"}`

Besides, I don't believe this endpoint has any third-party consumers
that rely on the metadata since it's a rarely known feature anyways
2024-12-08 00:59:58 +09:00
Ofek Shilon
407e0f9e83 Unhide another word in markdown 2024-10-27 08:40:25 +02:00
Alcaro
910f35e1d8 Unhide secret words (#7026) 2024-10-26 23:23:05 +02:00
goto40
03ce528a0a feat: added ability to receive a base64 with compressed clientstate, #6918 (#6919)
I encountered a problem with large URLs when using the "clientstate" API
with base64 strings: see #6918

* I found that it was quite easy to include this feature, just by
searching for `/clientstate/`.
* I "tested" my feature interactively with `npm run dev` and this
[link](http://localhost:10240/zclientstate/eNq1VduK2zAQ/ZXBhWITJc6lVye7sBT6uIWl9CUOiyJPYm1syUjyZsOSf+/Idm5tWuhD7YCs0cyZM5doXgOL1kqtbJDA/DWQGa0jBkHB1brma6RtIHq9gERW10Y0glTFMYiqMrhCg0pgArlzlU3iGNXg/GAgdBlvYxLFQivHpUITl5mtuErVG6lEUWcIM6mtM8jL23PhAdLw7WAtXV4va4vGw6ByDfBGbzbadnixlWpdYD9Hnh2dDPKqIlDFS6StQLAuwxe48es0Vf51WFYFdzgTBbcW7m6BgpNrpQ2Cy6WFNDiopAHkFBeDlTZ0hlDqkrik6lnLDCojlRtnITG0Du7e8ghegR6Cu/KEN1ztwO0qhLsoVV5EqCFBgCR+wyktM+ADfPHhhsNoCr2eJMhW91z/qdV/OtcfNfpPF/r+obiTROjawYy0Q8lIhb4osjSYeqpfer3xJAE+p6PFyXZ/+ryASIOUkhhM22PS2v8WKYHeawc211uVwE7XILgCX0ejC9jmUuSQyRIo1dmOKiXFJeUjClfZb+ZNFbDUZgcF33lS4ddvD98f7u7jL5RWn56Sui48JsJLMu74fHHzOmJjNmHv2Hv2gX1kn9jnfRcHr50G3rYJviRJ20yhtyODSdRkKke5zh2Drcxc3todWoBHTXN1vG299OaWwXxldAmDwQCcjs5ckcbo5I12nUPOOtGqLorHtrSsyX/JN/hYcWnCIYNR1DKyWKBwYPQWhlSZecKGyWhBJVJX6tbv989Ld6DuqUTTS27jP3K7JDKKfpXRVTK5JEe0iBQbJZN/Jzb2xPY+s4RnkP6TApsOKOheoTq4nMyPtaM0U1vzpX5uz5LG7HppZ7JNrJe0abaN6KDVNeahBNfFtweEthMfC1y52783zb8TmtDvV0fGY7ae/qOXUzhXnPgBQVdyJQs0zSxZkABfUJBf0w2XwzntukkTCD9nHp2p1cYjFHJ5NNaV6+ZS0CciNzSFxsNgf+bnW+2q2v2QVi4LP5cIBvcLen8CkW8rEQ==).

I have no insights in the underlying architecture, but I already have
**some comments on my PR** (and I am willing to work on these, if I get
some feedback/hints):

* the **decompression happens synchronously** (`zlib.inflateSync`). This
can be changed easily, once I understand how async operations are done
for the compiler explorer software.
* the link is `/zclientstate/` (in addition to `/clientstate/`) - I am
open for alternatives...
* I have **not added automated tests** (could be done, give me a
hint/example)

The modified SW worked for me! I hope to get some feedback... **This
would enable larger code-examples to be sent via clientstate as before
with smaller URLs**.
2024-10-02 07:58:51 -05:00
Matt Fowles Kulukundis
2a8ceb9b51 docs: include the type entry required for language-key (#6869) 2024-09-18 16:46:31 -05:00
Matt Godbolt
2c6f042b68 Ahem formatting 2024-09-18 14:25:09 -05:00
Matt Fowles Kulukundis
802998513c docs: update variable name for fs.remove arg (#6867) 2024-09-18 13:31:51 -05:00
Matt Godbolt
e91b5d12da Comply with some MS terms (#6627)
- Ensure MSVC license terms are clearly shown to the user.
- Simplify config of vc and vcpp slightly by extracting common stuff
into a group.
- Remove reference to MS privacy policy
2024-06-19 18:09:59 -05:00
Michał Krzywkowski
de22d191f1 docs/API.md: Document /api/asm/<instructionSet>/<opcode> (#6339) 2024-04-10 11:34:25 +02:00
Matt Godbolt
fd3dd917f5 Vitest (#6219)
Port to vitest. Port everything to typescript. Remove chai, mocha and
chai-as-promised. Adds some docs.
2024-03-08 22:25:09 -06:00
Patrick Quist
2e197afab8 Doc update (#6172) 2024-02-21 22:08:19 +01:00
Matt Godbolt
613d7f688a Unify the way tmp dir is used (#6052)
Instead of having several globals, set via environment variables,
explicitly set the "correct" env var if passed `--tmpDir` and then
consistently use it in the rest of the program.

See @apmorton's comments in #1707
2024-01-28 18:50:46 -06:00
Vadim Zaliva
0781e2b1be Compilers for exectuable Cerberus CHERI C and ISO C semantics (#5864)
# Cerberus

[Cerberus](https://www.cl.cam.ac.uk/~pes20/cerberus/) offers executable
semantics for a substantial fragment of C and
CHERI-C languages. It is implemented via an elaboration into a simpler
Core language, which is displayed as the compiler
output in the Compiler Explorer. Evaluation of C programs (execution) is
also supported.

## Prerequisites

The easiest way to install both the Cerberus and Cerberus-CHERI
compilers is by using Docker:

`docker pull vzaliva/cerberus-cheri`

Then, for example, you can print the _Core_ elaboration for `test.c`
using ISO C semantics:

`docker run -v $HOME/tmp:/mnt -it vzaliva/cerberus-cheri cerberus
--pp=core --exec /mnt/test.c`

## Configuration

The file `etc/config/c.defaults.properties` defines a group of two
compilers: 'cerberus' for ISO C and 'cerberus-cheri'
for CHERI-C. It assumes that the corresponding executables are in the
path.

## Limitations and Future Improvement

Presently, only simple Core output is shown. It is not syntactically
highlighted nor linked to C source code locations.
Some potential future improvements include:

1. Error location handling in warning and error messages
2. Specifying execution flags
3. Core syntax highlighting
4. Display of AST
5. Display of other intermediate languages (Cabs, Ail)
6. Tooltips/links to the ISO C document from Core annotations

## See also:

- [Cerberus (project page)](https://www.cl.cam.ac.uk/~pes20/cerberus/)
- [Cerberus (GitHub
repository)](https://github.com/rems-project/cerberus)
- ["Formal Mechanised Semantics of CHERI C: Capabilities, Undefined
Behaviour, and Provenance" (paper,
preprint)](https://zaliva.org/cheric-asplos24.pdf)
- ["CHERI C semantics as an extension of the ISO C17 standard" (tech
report)](https://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-988.html)
2023-12-23 18:05:35 -06:00
Matt Godbolt
aa786bd0ef Update deps, format, lint, bump workaround version 2023-12-03 17:30:50 -06:00
J. Ryan Stinnett
c3e1b04c31 Rename opt pipeline without LLVM prefix (#5828)
This prepares for future work that will reuse the opt pipeline view
outside of the LLVM ecosystem by renaming related components to remove
the LLVM prefix.

The pass dumper keep its LLVM prefix, as it is assumed this part is
likely to be customised for each compiler ecosystem.

The historical component name has been preserved in the component list
as an alias to keep old links working.
2023-12-03 11:33:42 -05:00
Patrick Quist
455d92916a Execution with heaptrack (#5644) 2023-11-07 23:59:40 +01:00
David Spickett
1516d22d39 Fix compilers language file template in "Adding a Language" doc (#5628)
This needs to import `base-compiler.js` not `base-compiler`. All the
existing files import `.js`.
2023-10-19 09:48:33 -05:00
Matt Godbolt
1fc878d7a2 Bump all the things forward (#5563)
also run the lint and format nonsense
2023-10-05 21:43:33 -05:00
Rupert Tombs
83e06b0424 Update .js to .ts in documentation (#5558)
While reading the (excellent) documentation here, I noticed a few stale
references to `.js` files that are now implemented in TypeScript.

* Update `*.js` to `*.ts` in Markdown documentation.

* Update `app.js` to `out/dist/app.js` in
`docs/SystemdSocketActivation.md`.
_I managed to follow these instructions and locally run Compiler
Explorer through socket activation after that change._

* Update `*.js` to `*.ts` in the GitHub labeller config
`.github/labeler.yml`.
_Also correct some misnamed files here. I have checked the new version
with `ls $(grep -E "^ - " .github/labeler.yml | sed "s/ - //g")`. If I
were more familiar here, I would have liked to add a similar check to
the automated tests._

- Sheepishly add myself to the contributors list, despite this being a
tiny find-and-replace change.

---------

Co-authored-by: Jeremy Rifkin <51220084+jeremy-rifkin@users.noreply.github.com>
2023-10-04 20:27:06 -04:00
Matt Godbolt
5d776aaae3 Replace ts-node-esm with direct calls to node to support node 20 (#5521)
- works both v18 and v20
- see https://github.com/TypeStrong/ts-node/issues/1997
2023-09-27 21:57:18 -05:00
AliG
1efe5a3eaf Add ForCompile project to API.md. (#5516) (#5522)
ForCompile - A Fortran library to access the API

by @gha3mi.
2023-09-26 07:07:32 -05:00
Jeremy Rifkin
fb147126e8 Fix WSL for systems that don't have windows paths (#5480)
Attempt to fix #5476. As far as I can tell `process.env.winTmp` is
needed just for windows executables and WslVcCompiler. It should be
possible to just ignore the exec error and continue. If for some reason
the user doesn't have windows paths in their WSL but does want to run
windows executables they can pass `-tmpDir`.
2023-09-16 15:59:26 -04:00
Matt Godbolt
316992bfe7 Fix up formatting 2023-09-06 21:28:33 -05:00
Marcus Tillmanns
783f09a7c0 Fix link to formatter section (#5437)
Changed Link
"https://github.com/compiler-explorer/compiler-explorer/blob/main/etc/config/compiler-explorer.amazon.properties#L43"
to a relative link and fixed the display to be less huge.
2023-08-29 19:34:00 -05:00
Marcus Tillmanns
16d838186c Fix clientstate.ts link (#5436) 2023-08-29 15:39:05 +02:00
Matt Godbolt
5620f29d54 Format fixes 2023-07-31 18:32:32 -05:00
Elecia White
62fd203700 Wordsmithing "What is compiler explorer?" (#5316)
I like the new "what is compiler explorer" very much. Thank you for
doing it. I did a little bit of wordsmithing as I thought the intro
needed some ironing out.
2023-07-31 18:32:02 -05:00
Matt Godbolt
f06fa60eee Tweak size 2023-07-30 18:06:09 -05:00
Matt Godbolt
075a04621f Add an intro for why/where/how/when etc (#5302)
Hopefully a decentish overview of the why and how of using Compiler Explorer. Prompted by a conversation with @eleciawhite.
2023-07-30 18:02:08 -05:00