Граф коммитов

1682 Коммитов

Автор SHA1 Сообщение Дата
bendk 0d38fc51ec
Merge pull request #2300 from bendk/release-v0.28.x
Changes for the v0.28.3 release
2024-11-09 12:43:36 -05:00
Ben Dean-Kawamura 69a08c575d chore: Release 2024-11-08 16:11:36 -05:00
Ben Dean-Kawamura f7a0ba703b chore: Release 2024-11-08 16:11:11 -05:00
Ben Dean-Kawamura efffb9b5a6 Fix metadata extraction for large ELF files (#2285)
Symbol table entries store a 16-bit index for their section header.  If
the index overflows 16-bits then it's stored in a separate section
instead.

References:

- https://refspecs.linuxbase.org/elf/gabi4+/ch4.symtab.html
- https://docs.oracle.com/cd/E19683-01/817-3677/chapter6-94076/index.html
2024-11-08 16:09:18 -05:00
bendk 8f4ecaf6ff
Merge pull request #2260 from bendk/push-mqrvxxntltwr
Changes for the 0.28.2 release
2024-10-08 10:09:51 -04:00
Ben Dean-Kawamura 128097a03d chore: Release 2024-10-08 09:30:15 -04:00
Ben Dean-Kawamura deae161be8 chore: Release 2024-10-08 09:29:39 -04:00
Ben Dean-Kawamura c5d48556e4 Merge remote-tracking branch 'upstream/main' into release-v0.28.x 2024-10-08 09:29:08 -04:00
Mark Hammond 8caac8e67c
Removed the old and outdated diplomat comparison doc (fixes #2135) (#2258) 2024-10-07 12:50:49 -04:00
bendk 72ff1ec3dc
Merge pull request #2254 from wesprint-io/alexkirsz/force-const-evaluation
Force const evaluation to avoid leaking metadata buffers to the binary
2024-10-07 11:29:06 -04:00
Alex Kirszenberg a557c25fd0 Force const evaluation to avoid leaking metadata buffers to the binary 2024-10-05 17:19:19 +02:00
bendk 69ecfbd7fd
Merge pull request #2249 from bendk/push-tnsvklnxuxkw
Hide internal classes generated docs
2024-10-03 12:32:59 -04:00
bendk 3662c84b46
Merge pull request #2248 from bendk/push-uunuklpxuxzo
uniffi-bindgen-swift
2024-10-03 11:30:07 -04:00
Ben Dean-Kawamura 5c4409a3e6 Add `uniffi-bindgen-swift`
This is a `uniffi-bindgen` variant dedicated to Swift code, with options
specialized for Swift.  I'm currently thinking that we should consider
doing this for all languages.  In addition to allowing specialized
options, it also makes the in-tree bindings less special-cased compared
to external bindings.
2024-10-01 16:47:17 -04:00
Ben Dean-Kawamura 3043009f68 Hide internal classes generated docs
Some of these could be made internal, but most could not.  The reason is
that UniFFI code needs to import them from other modules in order to
support external types.  This change mostly adds docstrings/annotations
to hide them from the generated docs.

For swift, this needed to behind an `#if` statement to keep
compatability with 5.5.  Maybe we can up the minimum version with the
next breaking release.
2024-10-01 16:22:15 -04:00
Ben Dean-Kawamura e73347cd6b Revert "Generate a single modulemap in library mode"
This reverts commit fe710083ed.
2024-09-26 13:13:15 -04:00
bendk 305454d6a4
Merge pull request #2246 from bendk/push-sqzxuxorosyq
Fix for Mach-O symbol extraction
2024-09-26 09:48:33 -04:00
Ben Dean-Kawamura ac3c9a7da7 Fix for Mach-O symbol extraction
The `n_sect` field is 1-based with `0` meaning `NO_SECT` meaning the
symbol is not present in any section in the library.  This change fixes
the index mismatch.

Reference: https://github.com/aidansteele/osx-abi-macho-file-format-reference#nlist_64, 

The code was mostly working before because of the way we calculate the
offset (2e3b59cf6d/uniffi_bindgen/src/macro_metadata/extract.rs (L106)).  Because of this, even if we were off by one when picking the section, things would still work as long as the two sections involved lined up correctly.

Thanks to 0c0w3 for pointing this out and sending me the patch.
2024-09-25 16:47:06 -04:00
Samuel Tardieu 2e3b59cf6d
Do not use `.as_bytes().len()` on strings (#2243) 2024-09-22 12:01:13 +02:00
bendk 0328b45d90
Merge pull request #2240 from bendk/push-nlslvovtvqxq
Fix Python error name regression
2024-09-20 12:39:03 -04:00
bendk d5daea1368
Merge pull request #2242 from bendk/push-nrurqworyqpu
Re-export library mode items in uniffi
2024-09-20 12:38:50 -04:00
Ben Dean-Kawamura 07c15cd04d Re-export library mode items in uniffi
I want to use this in a CLI tool that I'm building.  The uniffi crate
currently re-exports `generate_bindings`, but not
`library_mode::generate_bindings`.
2024-09-20 11:56:29 -04:00
Ben Dean-Kawamura 811976cda4 Fix Python error name regression 2024-09-20 10:47:05 -04:00
bendk 6062a36ca0
Merge pull request #2241 from cschramm/main
Do not ignore uniffi.toml for crates without a lib type
2024-09-20 10:01:11 -04:00
Christopher Schramm d63ed66420 Do not ignore uniffi.toml for crates without a lib type
See https://github.com/mozilla/uniffi-rs/pull/2175/files#r1749374986. That PR added a filter on `cargo_metadata`'s `is_lib`. While it makes sense to ignore non-library targets here, `is_lib` only returns `true` if the crate has the `lib` type, but not e.g. for `staticlib`, `cdylib` etc. In that case none of the targets match and the crate's `uniffi.toml` gets ignored.
2024-09-20 13:28:33 +02:00
bendk 8aec9dfff0
Merge pull request #2235 from bendk/push-szzsnwnoozpz
Generate a single modulemap in library mode
2024-09-16 10:56:13 -04:00
Ben Dean-Kawamura fe710083ed Generate a single modulemap in library mode
I don't believe multiple modulemaps are useful at all.  At Mozilla, we
end up deleting all the generated module maps and hand-writing one of
our own.  Once this lands, I think we will be able to delete that code
and use the single generated modulemap.
2024-09-13 11:04:24 -04:00
Bastian Gruber 35140607dc
Merge pull request #2233 from mozilla/remove-swift-docstrings 2024-09-06 11:41:58 -03:00
Bastian Gruber e4ea54ea7d
Remove docstrings in Swift templates 2024-09-06 11:14:07 -03:00
bendk 0bddc32a2d
Merge pull request #2230 from NordSecurity/kristupas/test-callback-lifetime
Test callback lifetime
2024-09-03 10:16:25 -04:00
Kristupas Antanavičius 0fa66636f7 Test callback lifetime 2024-09-02 14:43:56 +03:00
Jan-Erik Rediger 74c065a6dd Remove panic logging
It was migrated from ffi-support back in 2021,
but never actually worked because the used cargo features are undefined.

Fixes #2203
2024-08-28 12:22:11 +02:00
Yury Yarashevich 045a4543eb
Remove camino dependency from uniffi_core. (#2218) 2024-08-16 08:15:34 -04:00
bendk 38383ef690
Merge pull request #2215 from bendk/main
Merge changes from 0.28.1 to main
2024-08-15 10:44:35 -04:00
bendk 2296746b33
Merge pull request #2213 from bendk/release-v0.28.x
Changes for v0.28.1
2024-08-13 12:34:11 -04:00
Ben Dean-Kawamura 1cdf56b98b chore: Release 2024-08-09 15:30:23 -04:00
Ben Dean-Kawamura e31172fb75 chore: Release 2024-08-09 15:29:51 -04:00
bendk a99d26e3d8
Merge pull request #2205 from bendk/push-svlokzmovmpv
Expose the find_components function
2024-08-07 15:19:20 -04:00
Ben Dean-Kawamura 06f10d09da Expose the find_components function
The generate_bindings docs mentioned wanting to expose a function that
just finds ComponentInterface and config tables for each component and
leaves the rest to the external bindings generator.  This is exactly
what I want to use for uniffi-bindgen-gecko-js.

The `find_components` function was pretty much exactly what we wanted.
I made some minor changes to it and exposed it as a pub function.
2024-08-07 13:18:03 -04:00
Mark Hammond 33a24e6cfe
Future cancellation docs and other minor doc tweaks. (#2206) 2024-08-07 09:28:28 -04:00
Mark Hammond 7ff7584ce0
Allow UDL to avoid the `[Rust=...]` attribute by using a plain-old typedef (#2199) 2024-08-02 16:18:45 -04:00
bendk 740102f760
Merge pull request #2202 from bendk/0.28.1-changlog-entries
Adding changelog entries for merges since 0.28.0
2024-08-02 11:45:56 -04:00
Ben Dean-Kawamura 4f97413c73 Adding changelog entries for merges since 0.28.0
I'm hoping to do a 0.28.1 release and these would be good to have in it.
I also considered adding an entry for the work that mgeisler has been
doing, but I couldn't think of a good wording for that.
2024-08-01 16:47:38 -04:00
Bastian Gruber 106f0b2d8a
Merge pull request #2191 from mozilla/transform-ci
Replace templating filters for Python
2024-08-01 12:53:27 -03:00
Bastian Gruber 2d16dd49cb
fix: cargo fmt 2024-08-01 12:34:53 -03:00
Bastian Gruber 1f0e0f7867
fix: pr review cleanup 2024-08-01 12:32:09 -03:00
Murph Murphy 3cb19d8600
Provide more external type information to `FfiType::RustBuffer` (#2195)
* Thread `ExternalType` metadata into RustBuffer

In service of Java bindgen being able to generate fully qualified
`RustBuffer`s when necessary.

* Switch to `test --no-run` from `build` for cdylib

`uniffi-bindgen-java` is external to the uniffi repo, so the
fixtures/examples are all `dev-dependencies`, which aren't built on a
call to `cargo build`. `cargo test --no-run` causes them to be built but
doesn't cause a run of tests in place.
2024-08-01 10:06:22 -04:00
Bastian Gruber d3c55fa69f
fix: fix missing return type name change, clippy 2024-08-01 10:35:42 -03:00
Bastian Gruber 8db50e6ca0
fix: cleanup 2024-07-31 22:08:34 -03:00
Bastian Gruber ca3593262c
fix: add doc comments 2024-07-31 22:04:54 -03:00